Ticker

6/recent/ticker-posts

Advertisement

Routing Table in Ubuntu

 How to add and show Routing Table in Ubuntu


All operating system have a routing table for connect with another computers. When computer Forwarding IP packets to the destinations server and computers,  its depend on ip route, which interface to use to forward the packet to the destination server or computer based on the information in its routing table. if you to want to add and view routing table in ubuntu use the following steps.

1. Open terminal on Ubuntu and type following command to show ip route.

$ ip route show


You can also view route using following command.



2. If you need to know kernel routing table use the following command.

$ sudo route -n


You can also view route table using following command.




3. If you need to add the route use the following command.

$ sudo ip route add 172.16.16.0/24 via 10.0.0.129 dev ens160


4. verify the route add or not using following command.

sudo route -n



5. if you want to delete route use the following command.

Before adding the route use following command to device name and ethernet name using following command

$ ip r




$ sudo ip route delete 172.16.16.0/24 via 10.0.0.129 dev ens160


6. verify the route add or not using following command.

sudo route -n


Post a Comment

0 Comments