Unix和类Unix系统
route
实质是操作内核 IP路由表。主要用途是:在 ifconfig(8)(页面存档备份,存于互联网档案馆) 程序配置好网络接口之后,通过网络接口为 相关的主机或网络 制作静态路由。(路由表由一条条路由组成的)[1]
当指定 add 或 del 选项时,route
指令会修改路由表。没有指定选项时候,该命令用于展示路由表现在的信息。
示例:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ens33
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 ens33
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.19.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-3410adeadbf2
172.23.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-b62346ca474b
172.24.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-9eb96136da5c
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens33
参考文献
Wikiwand in your browser!
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.