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

你可能感兴趣的:(linux,route,linux,网络)