We can use ‘remove’ command to remove certain configuration.
But, we need ‘Item Number’ to use ‘remove’ command.
to get ‘Item Number’, we have to use another command ‘print’.
Or else, we can use ‘find’ command.
This will not be ‘OK’ for newbie.
In Cisco,
Just use ‘no’ to remove configuration.
Example,
In cisco,
interface FastEthernet 0/0
ip address 192.168.1.1 255.255.255.0
we want remove IP address, then,
no ip address 192.168.1.1 255.255.255.0
In Mikrotik,
/ip address
add address=192.168.1.1/24 interface=ether1
we want to remove IP address, then,
/ip address
print
Cisco works differently from MikroTik.
These routers are both not for newbies.
There are enough routers on the market that are much easier to configure than either Cisco or MikroTik.
I don’t think either of these manufacturers are focussing on the newbies market…
One thing that could be interesting was to remove the rule with the opposite command of its creation.
Example:
add chain=AP_intra comment=“AP usa DNS Intranet” dst-port=53 protocol=udp → This one create this rule
removechain=AP_intra comment=“AP usa DNS Intranet” dst-port=53 protocol=udp → This one would remove the rule. The number system is good, and should be kept. But this could simplify some scripts and whatnot.
Find is great, don’t get me wrong. It’s just that to declare it in a script, I would have to run a find to match the whole rule - or accept the risk of removing the wrong one.
Well, I could run a find to match the whole rule, couldn’t I? Mmmmm… Nevermind. Find works for me. Old habits and all.
what if you want to migrate and you want to remove some unnecessary configuration and add some configuration ?
we have to plan for “find”. which syntax would be appropriate. (we worry that if we remove wrongly?)
Or just print current configuration and copy to notepad.
In “add” command, replace it with “remove” and select all and paste in terminal.
which is better?