linux 路由表

[root@centos6 ~]#route -n

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

192.168.27.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0

0.0.0.0 192.168.27.2 0.0.0.0 UG 0 0 0 eth0

linux 路由表主要字段说明

Destination: 目的地址,可以是主机地址、网络地址,常用的是网络地址

Gateway: 网关地址,所有未知地址都会找网关,有网关统一转发,只有边缘网络才会配置网关,并且直连网络不需要配置网关

Genmask:目的地址的子网掩码

Iface: 接口,去往目的地址的网络路径的出口(也就是从那个出口可以去往目的地址)

官方的原文

OUTPUT

The output of the kernel routing table is organized in the following columns

Destination

The destination network or destination host.

Gateway

The gateway address or '*' if none set.

Genmask

The netmask for the destination net; '255.255.255.255' for a host destination and '0.0.0.0' for the default route.

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)

Metric

The 'distance' to the target (usually counted in hops).

It is not used by recent kernels, but may be needed by routing daemons.

Ref

Number of references to this route. (Not used in the Linux kernel.)

Use

Count of lookups for the route.

Depending on the use of -F and -C this will be either route cache misses (-F) or hits (-C).

Iface

Interface to which packets for this route will be sent.

MSS

Default maximum segment size for TCP connections over this route.

Window

Default window size for TCP connections over this route.

irtt

Initial RTT (Round Trip Time).

The kernel uses this to guess about the best TCP protocol parameters without waiting on (possibly slow) answers.

HH (cached only)

The number of ARP entries and cached routes that refer to the hardware header cache for the cached route.

This will be -1 if a hardware address is not needed for the interface of the cached route (e.g. lo).

Arp (cached only)

Whether or not the hardware address for the cached route is up to date.

linux 路由配置示例

路由器 R1 路由表

网络ID

子网掩码

接口

网关

10.0.0.0

255.0.0.0

1

-

172.16.0.0

255.255.0.0

2

-

192.168.0.0

255.255.255.0

2

172.16.0.2

192.168.100.0

255.255.255.0

2

172.16.0.2

0.0.0.0

0.0.0.0

2

172.16.0.2

路由器 R2 路由表

连接互联网的路由信息省略 只有边界路由才有 默认路由 0.0.0.0/0.0.0.0 gateway_ip R2 不是边界路由,所以没有默认路由 只有 R1 R3 才有默认路由,可以进行路由合并

网络ID

子网掩码

接口

网关

10.0.0.0

255.0.0.0

3

172.16.0.1

172.16.0.0

255.255.0.0

3

-

192.168.0.0

255.255.255.0

4

-

192.168.100.0

255.255.255.0

4

192.168.0.2

路由器 R3 路由表

网络ID

子网掩码

接口

网关

10.0.0.0

255.0.0.0

5

192.168.0.1

172.16.0.0

255.255.0.0

5

192.168.0.1

192.168.0.0

255.255.255.0

5

-

192.168.100.0

255.255.255.0

6

-

0.0.0.0

0.0.0.0

5

192.168.0.1

边界路由linux,路由表构成简介(Destination/Gateway/Genmask/Iface)相关推荐

  1. 路由表构成简介(Destination/Gateway/Genmask/Iface)

    linux 路由表 路由表样例 [root@centos6 ~]#route -n Kernel IP routing table Destination Gateway Genmask Flags ...

  2. 关于Linux路由表的route命令(转)

    查看 Linux 内核路由表 使用下面的 route 命令可以查看 Linux 内核路由表. # route Destination  Gateway      Genmask          Fl ...

  3. linux路由表命令

    转自此大神http://www.cnblogs.com/gunl/archive/2010/09/14/1826234.html 留在好查阅 linux 路由表维护 查看 Linux 内核路由表 使用 ...

  4. linux 路由表 的一些相关资料

    =============================================================================== linux 路由表维护 查看 Linux ...

  5. 关于Linux路由表的route命令

    转自:http://www.cnblogs.com/gunl/archive/2010/09/14/1826234.html 查看 Linux 内核路由表 使用下面的 route 命令可以查看 Lin ...

  6. Linux 路由表说明

    写在前面: 本文章旨在总结备份.方便以后查询,由于是个人总结,如有不对,欢迎指正:另外,内容大部分来自网络.书籍.和各类手册,如若侵权请告知,马上删帖致歉. 目录 route 命令 字段分析 路由种类 ...

  7. linux 路由表设置 之 route 指令详解 -1

    转载:https://blog.csdn.net/vevenlcf/article/details/48026965 使用下面的 route 命令可以查看 Linux 内核路由表. # route D ...

  8. linux内核ip路由表逐条释义,Linux 路由表

    使用下面的 route 命令可以查看 Linux 内核路由表. # route Destination Gateway Genmask Flags Metric Ref Use Iface 192.1 ...

  9. Linux 路由表和静态路由

    路由表和静态路由 Linux 内核路由表 查看Linux内核路由表 使用下面的route 命令可以查看Linux 内核路由表. $ route Kernel IP routing table Dest ...

  10. linux 路由表设置 之 route 指令详解

    使用下面的 route 命令可以查看 Linux 内核路由表. [cpp] view plaincopy # route Destination     Gateway         Genmask ...

最新文章

  1. 基于TransformerFusion的单目场景重构
  2. Java:定时启动线程
  3. 黎曼猜想的1/2和质子自旋的1/2会不会是一个数?
  4. 在c语言中 十六进制转十进制,C语言中十六进制转十进制两种实现方法
  5. ubuntu无线网络开关
  6. 综合素质计算机考点,教师资格证小学综合素质考点及考试真题:信息处理能力...
  7. MYSQL 常用查询命令
  8. 设计模式 笔记 解释器模式 Interpreter
  9. Windows 10开机可以跳过锁屏界面的操作方法
  10. 严防ARP病毒的六个步骤
  11. jquery基础知识(一)
  12. js校验明细列表字段是否存在相同值(js循环嵌套初始值问题)
  13. 20线程测试cpu性能软件,cpu测试工具(wPrime Benchmark)
  14. 以《数据安全法》为背景的全息数据安全解决方案
  15. 连锁机构3D指纹考勤系统解决方案
  16. 高效人士的7个好习惯,由内而外全面造就自己
  17. 云计算与大数据复习题
  18. 打造数字化软件工厂 —— 一站式 DevOps 平台全景解读
  19. 电脑记账最简单的方法
  20. 水产品进口手续及报关清关注意事项2021-08-27

热门文章

  1. 制作双色调图像(RGB 颜色模式)
  2. Excel堆积柱形图制作过程
  3. uniapp实现APP微信登录流程
  4. 使用CentOS7搭建Nat64服务器实现IPv6网段访问IPv4地址
  5. 如何使用Veeam One默认安装出来的Sql Server数据库
  6. java使用POI导出Excel,下拉列表联动,单元格合并,日期校验,锁定指定列禁止修改
  7. Fundamental of 4G LTE - 学习笔记(1)Duplexing - TDD vs FDD
  8. npm : command not found 问题
  9. MSP430开发环境配置
  10. CnOpenData工商注册企业数量统计数据:省份-年度-企业数量信息表