route 命令
命令用法
# 显示系统内核路由表
route [-nNvee] [-FC] [<AF>]
# 修改指定路由表信息
route [-v] [-FC] {add|del|flush} ...常用可选参数
结果参数解析
使用实例
Last updated
# 显示系统内核路由表
route [-nNvee] [-FC] [<AF>]
# 修改指定路由表信息
route [-v] [-FC] {add|del|flush} ...Last updated
gackle@machine:~$ route
Destination Gateway Genmask Flags Metric Ref Use Iface
link-local 0.0.0.0 255.255.0.0 U 256 0 0 eth0
... #增加一条到达 244.0.0.0 的路由
$ route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0 #增加一条屏蔽的路由,目的地址为 224.x.x.x 将被拒绝
$ route add -net 224.0.0.0 netmask 240.0.0.0 reject $ route del -net 224.0.0.0 netmask 240.0.0.0
$ route del -net 224.0.0.0 netmask 240.0.0.0 reject