To reject a route but you want to keep it on the routing table, run the command with the reject option. If you no longer use a specific route and you want to delete it, you can simply run the following command: $ sudo route del -net gw įor example: $ sudo route del -net 192.168.1.0/24 gw 192.168.1.1 eth2 The following section is a quick explanation: In the Flags column, there are some values that are difficult to understand. To add a new route to a host, run the following command: $ sudo route add -host gw įor example: $ sudo route add -host 172.19.11.75 gw 172.19.11.1 You can use the route add command as below: $ sudo route add -net gw įor example: $ sudo route add -net 192.168.1.0/24 gw 192.168.1.1 eth2 If your computer has more than one network interface and you want to add a new route, the computer will send traffic through that new gateway. To show the current routing table, let’s run the following command $ route -nĪnother way to describe more detail about which network interface of routes is running the command: $ ip route show Route command can be used to show and modify the network routing table in a Linux system.īelow is the guide on how to use the route command in Linux. Thanks to the route command, the network administrators or Linux users can do this work in an easier way. In order to make your computers communicate with other devices on the network, you have to define the route for them. RX bytes:2079487 (1.9 Mb) TX bytes:2079487 (1.Routing is a difficult technique in the networking world. TX packets:17648 errors:0 dropped:0 overruns:0 carrier:0 RX packets:17648 errors:0 dropped:0 overruns:0 frame:0 TX packets:466135 errors:0 dropped:0 overruns:0 carrier:0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Ifconfig Looks like this eth0 Link encap:Ethernet HWaddr 52:54:00:E5:20:3C I am able to ping default gateway of V4, but I always need to restart the network to ping the default gateway on V6, which works for some time, and again it stops pinging. Is it possible to configure a default gateway to V6 too in the same file? The contents of my file are as below BOOTPROTO='static'Īs you see, IPv4 has a default gateway. I have configured IPv4 and IPv6 addresses on eth0 on OpenSuse 13.2 and edited /etc/sysconfig/network/ifcfg-eth0 to support IPv6
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |