Linux - Route add and delete, Add route and delete
Route add and delete
Before making any changes in route always have backup of existing route tables and output. Its always good to proceed it with change, be cautious when you change or add routes.Get route table information
# ip route show # ip route show table bond0 # ip route show table main # ip route get <ip-address> # route -n # netstat -r
# route add -net 10.x.x.x subnet 255.255.0.0 dev eth0
# route del -net 10.x.x.x subnet 255.255.0.0 dev eth0
# ip route show # ip route show table bond0 # ip route show table main
# ip route add 10.x.x.x/23 via 10.10.x.1 dev eth0
# ip route del 10.x.x.x/23 via 10.10.x.1 dev eth0
# route add -net 10.x.x.x netmask 255.255.255.0 gw 10.10.x.1 dev eth0
Add permanent route
# vim /etc/sysconfig/network/routes
# tcpdump -s0 -nvi eth0 src 10.1X1.21.1BX and port53
The topic on Linux - Route add and delete is posted by - Vaish
Hope you have enjoyed, Linux - Route add and deleteThanks for your time