[root@VM_139_74_centos ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default gateway 0.0.0.0 UG 0 0 0 eth0
10.0.0.10 10.139.128.1 255.255.255.255 UGH 0 0 0 eth0
10.139.128.0 0.0.0.0 255.255.224.0 U 0 0 0 eth0
link-local 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-0ab63c131848
172.19.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-bccbfb788da0
172.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-7485db25f958
[root@VM_139_74_centos ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.139.128.1 0.0.0.0 UG 0 0 0 eth0
10.0.0.10 10.139.128.1 255.255.255.255 UGH 0 0 0 eth0
10.139.128.0 0.0.0.0 255.255.224.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-0ab63c131848
172.19.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-bccbfb788da0
172.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-7485db25f958
各列字段说明:
含义
Destination 目标网络或目标主机。Destination 为 default(0.0.0.0)时,表示这个是默认网关,所有数据都发到这个网关(这里是 10.139.128.1)
Gateway 网关地址,0.0.0.0 表示当前记录对应的 Destination 跟本机在同一个网段,通信时不需要经过网关
Genmask Destination 字段的网络掩码,Destination 是主机时需要设置为 255.255.255.255,是默认路由时会设置为 0.0.0.0
Flags 标记,含义参考表格后面的解释
Metric 路由距离,到达指定网络所需的中转数,是大型局域网和广域网设置所必需的 (不在Linux内核中使用。)
Ref 路由项引用次数 (不在Linux内核中使用。)
Use 此路由项被路由软件查找的次数
Iface 网卡名字,例如 eth0
Flags 含义:
U 路由是活动的
H 目标是个主机
G 需要经过网关
R 恢复动态路由产生的表项
D 由路由的后台程序动态地安装
M 由路由的后台程序修改
! 拒绝路由
更多请查看原文https://blog.csdn.net/kikajack/article/details/80457841