在FreeBSD和Linux路由表里标记的差异

对比一下FreeBSD和Linux的关于路由表Flags的定义 相同的有

U   Up: The route is active.
H   Host: The route destination is a single host.
G   Gateway: Send anything for this destination on to this remote system, which will figure out from there where to send it.

FreeBSD独有的:

S   Static: This route was configured manually, not automatically generated by the system.
C   Clone: Generates a new route based upon this route for machines we connect to. This type of route is normally used for local networks.
W   WasCloned: Indicated a route that was auto-configured based upon a local area network (Clone) route.
L   Link: Route involves references to Ethernet hardware.

Linux独有的:

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)

FreeBSD里常看到的是UC, UHLW, UGS, UGHS这几种。UC根据本地网络配置自动生成的,UHLW是由UC根据连接情况自动生成的,UGS是手工配置的段网关路由,UGHS是手工配置的主机网关路由。

Linux里常看到的是U, UG, UGH这几种。U和BSD的UC是一样的,UG和UGS一样,UGH和UGHS一样,没有UHLW。

BSD明确区别了手工添加和自动生成,Linux则没有。还是BSD强大呀,XD

Ref:


Last modified on 2009-01-09