Command to Show IP Route
Route -n
Command to Show IP Route Command Configuration
Route add
Adding and Removing Default Route in Ubuntu with gateway
ADD a route
sudo route add default gw 192.168.1.1
DELETE a route
sudo route del default gw 192.168.1.1
Adding and Removing Static Route in Ubuntu with gateway
ADD a route
sudo route add -net 10.244.252.0 netmask 255.255.255.0 gw 192.168.0.1
DELETE a route
sudo route del -net 10.244.252.0 netmask 255.255.255.0 gw 192.168.0.1
Adding and Removing Static Route in Ubuntu with Interface
ADD a route
sudo route add -net 10.244.252.0 netmask 255.255.255.0 dev eth1
DELETE a route
sudo route del -net 10.244.252.0 netmask 255.255.255.0 dev eth1
Example :
wachid@wachid-Inspiron-5437:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.88.1 0.0.0.0 UG 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
192.168.88.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
Please write here EmoticonEmoticon