飞机塞进菊花 发表于 2014-11-04 16:30

如何使用route命令添加到本机的路由

比如ip route add local 192.168.99.2 dev lo

如何使用route命令实现相同的效果

cryboy2001 发表于 2014-11-05 08:12

本帖最后由 cryboy2001 于 2014-11-05 08:12 编辑

# route
Kernel IP routing table
Destination   Gateway         Genmask         Flags Metric Ref    Use Iface
68.21.162.32   *               255.255.255.240 U   0      0      0 eth1
192.168.0.0   *               255.255.255.0   U   0      0      0 eth0
169.254.0.0   *               255.255.0.0   U   0      0      0 eth1
default         68.21.162.33   0.0.0.0         UG    0      0      0 eth1
# route add -net 192.168.10.0 netmask 255.255.255.0 dev eth0
# route
Kernel IP routing table
Destination   Gateway         Genmask         Flags Metric Ref    Use Iface
68.21.162.32   *               255.255.255.240 U   0      0      0 eth1
192.168.0.0   *               255.255.255.0   U   0      0      0 eth0
192.168.10.0    *               255.255.255.0   U   0      0      0 eth0
169.254.0.0   *               255.255.0.0   U   0      0      0 eth1
default         68.21.162.33   0.0.0.0         UG    0      0      0 eth1

yestreenstars 发表于 2014-11-05 09:59

可以看一下我这篇文章
http://blog.chinaunix.net/uid-26669282-id-3972445.html
页: [1]
查看完整版本: 如何使用route命令添加到本机的路由