[root@batpc2 ~]# ip route
default via 192.168.0.1 dev enp63s0 proto static metric 100
35.188.59.75 via 127.0.0.1 dev lo                          ##block bad websiteÂ
192.168.0.0/24 dev enp63s0 proto kernel scope link src 192.168.0.22 metric 100
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1
|
|
---|
|
|
| ip route help |
Add a new route: | ip route add default via 192.168.0.1 dev eth0 |
add default | ip route add 10.0.0.0/8 via via 192.168.0.1 dev |
add a route | ip route add 10.10.0.0/16 dev eth0 or ip route add 10.1.0.0/16 dev eth0
|
|
|
Routing table |
|
---|
| route man: |
ip route | [root@centos66 ~]# ip route
192.9.200.0/24 dev eth1  proto kernel  scope link  src 192.9.200.1
169.254.0.0/16 dev eth1  scope link  metric 1003
|
Centos: | Â ( install net-tools on ubuntu ) |
---|
route -n | [root@centos66 ~]# route -n
Kernel IP routing table
Destination   Gateway     Genmask     Flags Metric Ref   Use Iface
192.9.200.0 Â Â 0.0.0.0 Â Â Â Â 255.255.255.0 Â U Â Â 0 Â Â Â 0 Â Â Â Â 0 eth1
169.254.0.0 Â Â 0.0.0.0 Â Â Â Â 255.255.0.0 Â Â U Â Â 1003 Â 0 Â Â Â Â 0 eth1
|
route -nee | [root@centos66 ~]# route -nee
Kernel IP routing table
Destination   Gateway     Genmask     Flags Metric Ref   Use Iface   MSS  Window irtt
192.9.200.0 Â Â 0.0.0.0 Â Â Â Â 255.255.255.0 Â U Â Â 0 Â Â Â 0 Â Â Â Â 0 eth1 Â Â 0 Â Â 0 Â Â Â 0
169.254.0.0 Â Â 0.0.0.0 Â Â Â Â 255.255.0.0 Â Â U Â Â 1003 Â 0 Â Â Â Â 0 eth1 Â Â 0 Â Â 0 Â Â Â 0
|
|
|