关于路由表的整个数据结构,及这两张路由表的各个值的含义,我们留到下文再进行分析,先给出my_inet模块启动时,由内核初始化完成的两张路由表的内容,及生成该表的系统网络配置环境。周末了,早点结束,洗个澡,看会儿电视。:)
local表
: the fib table id: RT_TABLE_LOCAL, stamp: 0
: the array of zone in hash table:
: hash 8: have an fib_node list:
: entries: 1
: hash divisor: 16
: hash mask: f
: zone order: 8
: zone mask: ff
: hash 32: have an fib_node list:
: entries: 6
: hash divisor: 16
: hash mask: f
: zone order: 32
: zone mask: ffffffff
:
: the zone list:
: zone: hash 32
: the key ip: 172.16.48.255
: the alias:
: fa tos: 0 //一般服务
: fa type: RTN_BROADCAST
: fa scope: RT_SCOPE_LINK
: fa state: 0 //未设
: the fa info:
: tree ref: 3
: clnt ref: 1
: fib_dead: 0 //状态活
: fib flags: 0 //未设
: protocol: RTPROT_KERNEL
: pref src: 172.16.48.2
: priority: 0 //未设
: fib_mtu: 0 //均未设
: fib_window: 0
: fib_power: 0
: fib_nhs: 1 //未设,缺省为1。
: all the nhs:
: 0.16.48.2
:
: the key ip: 127.255.255.255
: the alias:
: fa tos: 0
: fa type: RTN_BROADCAST
: fa scope: RT_SCOPE_LINK
: fa state: 0
: the fa info:
: tree ref: 2
: clnt ref: 1
: fib_dead: 0
: fib flags: 0
: protocol: RTPROT_KERNEL
: pref src: 127.0.0.1.
: priority: 0
: fib_mtu: 0
: fib_window: 0
: fib_power: 0
: fib_nhs: 1
: all the nhs:
: 0.0.0.1
:
: the key ip: 172.16.48.0
: the alias:
: fa tos: 0
: fa type: RTN_BROADCAST
: fa scope: RT_SCOPE_LINK
: fa state: 0
: the fa info:
: tree ref: 3
: clnt ref: 1
: fib_dead: 0
: fib flags: 0
: protocol: RTPROT_KERNEL
: pref src: 172.16.48.2
: priority: 0
: fib_mtu: 0
: fib_window: 0
: fib_power: 0
: fib_nhs: 1
: all the nhs:
: 0.16.48.2
:
: the key ip: 172.16.48.2
: the alias:
: fa tos: 0
: fa type: RTN_LOCAL
: fa scope: RT_SCOPE_HOST
: fa state: FA_S_ACCESSED
: the fa info:
: tree ref: 1
: clnt ref: 1
: fib_dead: 0
: fib flags: 0
: protocol: RTPROT_KERNEL
: pref src: 172.16.48.2
: priority: 0
: fib_mtu: 0
: fib_window: 0
: fib_power: 0
: fib_nhs: 1
: all the nhs:
: 0.16.48.2
:
: the key ip: 127.0.0.0
: the alias:
: fa tos: 0
: fa type: RTN_BROADCAST
: fa scope: RT_SCOPE_LINK
: fa state: 0
: the fa info:
: tree ref: 2
: clnt ref: 1
: fib_dead: 0
: fib flags: 0
: protocol: RTPROT_KERNEL
: pref src: 127.0.0.1.
: priority: 0
: fib_mtu: 0
: fib_window: 0
: fib_power: 0
: fib_nhs: 1
: all the nhs:
: 0.0.0.1
:
: the key ip: 127.0.0.1
: the alias:
: fa tos: 0
: fa type: RTN_LOCAL
: fa scope: RT_SCOPE_HOST
: fa state: FA_S_ACCESSED
: the fa info:
: tree ref: 2
: clnt ref: 1
: fib_dead: 0
: fib flags: 0
: protocol: RTPROT_KERNEL
: pref src: 127.0.0.1.
: priority: 0
: fib_mtu: 0
: fib_window: 0
: fib_power: 0
: fib_nhs: 1
: all the nhs:
: 0.0.0.1
:
: zone: hash 8
: the key ip: 127.0.0.0
: the alias:
: fa tos: 0
: fa type: RTN_BROADCAST
: fa scope: RT_SCOPE_HOST
: fa state: 0
: the fa info:
: tree ref: 2
: clnt ref: 1
: fib_dead: 0
: fib flags: 0
: protocol: RTPROT_KERNEL
: pref src: 127.0.0.1.
: priority: 0
: fib_mtu: 0
: fib_window: 0
: fib_power: 0
: fib_nhs: 1
: all the nhs:
: 0.0.0.1
main表:
: the fib table id: RT_TABLE_MAIN, stamp: 0
: the array of zone in hash table:
: hash 24: have an object!
: entries: 1
: hash divisor: 16
: hash mask: f
: zone order: 24
: zone mask: ffffff
:
: the zone list:
: zone: hash 24
: the key ip: 172.16.48.0
: the alias:
: fa tos: 0
: fa type: RTN_UNICAST
: fa scope: RT_SCOPE_LINK
: fa state: 0
: the fa info:
: tree ref: 3
: clnt ref: 1
: fib_dead: 0
: fib flags: 0
: protocol: RTPROT_KERNEL
: pref src: 172.16.48.2.
: priority: 0
: fib_mtu: 0
: fib_window: 0
: fib_power: 0
: fib_nhs: 1
: all the nhs:
: 0.16.48.2
系统网络配置:
eth0 Link encap:Ethernet HWaddr 00:0C:29:80:D8:70
inet addr:172.16.48.2 Bcast:172.16.48.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe80:d870/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:487 errors:0 dropped:0 overruns:0 frame:0
TX packets:338 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46408 (45.3 KiB) TX bytes:55085 (53.7 KiB)
Interrupt:17 Base address:0x1400
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
阅读(542) | 评论(0) | 转发(0) |