route路由中的UGH意思

这个是我Ubuntu 20.04下的路由,太久没有看了,今天突然看到flag标志中的UGH,不知道具体意思,然后查询了一番资料。

#这是连接对端路由器的路由表
route -n
内核 IP 路由表
目标            网关            子网掩码        标志  跃点   引用  使用 接口
0.0.0.0         192.168.43.1    0.0.0.0         UG    600    0        0 wlp3s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp3s0
172.16.1.1      127.0.0.1       255.255.255.255 UGH   0      0        0 lo
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-86bc5ef1b054
172.20.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-316db4c7baa9
183.6.5.184     192.168.43.1    255.255.255.255 UGH   0      0        0 wlp3s0
192.168.5.0     172.16.1.1      255.255.255.0   UG    0      0        0 cnem_vnic
192.168.43.0    0.0.0.0         255.255.255.0   U     600    0        0 wlp3s0
192.168.43.1    0.0.0.0         255.255.255.255 UH    0      0        0 wlp3s0

U : This flag signifies that the route is up
G : This flag signifies that the route is to a gateway. If this flag is not present then we can say that the route is to a directly connected destination
H : This flag signifies that the route is to a host which means that the destination is a complete host address. If this flag is not present then it can be assumed that the route is to a network and destination would be a network address.
D : This flag signifies that this route is created by a redirect.
M : This flag signifies that this route is modified by a redirect.

精简解析

       Flags  Possible flags include
              U (route is up)
              H (target is a host)
              G (use gateway)
              R (reinstate route for dynamic routing)
              D (dynamically installed by daemon or redirect)
              M (modified from routing daemon or redirect)
              A (installed by addrconf)
              C (cache entry)
              !  (reject route)

再次查看路由

#这个是正常普通的路由表
route -n
内核 IP 路由表
目标            网关            子网掩码        标志  跃点   引用  使用 接口
0.0.0.0         192.168.1.1     0.0.0.0         UG    600    0        0 wlp3s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp3s0
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-86bc5ef1b054
172.20.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-316db4c7baa9
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp3s0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

少陽君

谢谢老板的拿铁

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值