- 论坛徽章:
- 0
|
A------switch---B
A, B 上都运行zebra(RIPv2)
我遇到的问题是A, B 上的路由表不能更新.
配置如下
A 机器
eth0.22 Link encap:Ethernet HWaddr 00:80:42:1D:33:66
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31102 errors:0 dropped:0 overruns:0 frame:0
TX packets:19652 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1858132 (1.7 Mb) TX bytes:2023100 (1.9 Mb)
eth0.22:0 Link encap:Ethernet HWaddr 00:80:42:1D:33:66
inet addr:10.55.1.90 Bcast:0.0.0.0 Mask:0.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0.22:1 Link encap:Ethernet HWaddr 00:80:42:1D:33:66
inet addr:10.55.1.74 Bcast:10.55.1.79 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0.22:2 Link encap:Ethernet HWaddr 00:80:42:1D:33:66
inet addr:10.55.101.74 Bcast:10.55.101.79 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0.22:3 Link encap:Ethernet HWaddr 00:80:42:1D:33:66
inet addr:10.55.101.75 Bcast:10.55.101.79 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
B机器
eth0.22 Link encap:Ethernet HWaddr 00:03:CC:39:00:E0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:24730 errors:0 dropped:0 overruns:0 frame:0
TX packets:12461 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1754446 (1.6 Mb) TX bytes:1055642 (1.0 Mb)
eth0.22:5 Link encap:Ethernet HWaddr 00:03:CC:39:00:E0
inet addr:10.55.1.78 Bcast:10.55.1.79 Mask:255.255.255.248
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
A ping B is OK
root@OMCP2-n4s40#ping 10.55.1.78
PING 10.55.1.78 (10.55.1.7 from 10.55.1.74 : 56(84) bytes of data.
64 bytes from 10.55.1.78: icmp_seq=1 ttl=64 time=0.251 ms
64 bytes from 10.55.1.78: icmp_seq=2 ttl=64 time=0.227 ms
64 bytes from 10.55.1.78: icmp_seq=3 ttl=64 time=0.202 ms
64 bytes from 10.55.1.78: icmp_seq=4 ttl=64 time=0.176 ms
64 bytes from 10.55.1.78: icmp_seq=5 ttl=64 time=0.149 ms
--- 10.55.1.78 ping statistics ---
5 packets transmitted, 5 received, 0% loss, time 3996ms
rtt min/avg/max/mdev = 0.149/0.201/0.251/0.036 ms
这是我在A上看到的消息, A上明明收到路由更新信息(10.55.1.78.route > 224.0.0.9.), 但是它就是不更新自己的路由表
(A 上的eth0.22:0 是我自己加的, 没加这个接口之前, 一切OK. 路由表更新正常)
root@A#tcpdump -i eth0.22
tcpdump: WARNING: eth0.22: no IPv4 address assigned
tcpdump: listening on eth0.22
tcpdump: WARNING: compensating for unaligned libpcap packets
09:47:19.275483 10.55.101.73.route > 224.0.0.9.route: RIPv2-resp [items 1]: {10.55.101.73/255.255.255.255}(2) (DF) [ttl 1]
09:47:20.925367 10.55.1.78.route > 224.0.0.9.route: RIPv2-resp [items 2]: {0.0.0.0}(2) {10.55.2.72/255.255.255.248}(2) (DF) [ttl 1]
09:47:23.048349 10.55.101.74.route > 224.0.0.9.route: RIPv2-resp [items 3]: {10.55.101.74/255.255.255.255}(2) {10.55.101.75/255.255.255.255}(2)[|rip] (DF) [ttl 1]
09:47:24.285353 10.55.101.73.route > 224.0.0.9.route: RIPv2-resp [items 1]: {10.55.101.73/255.255.255.255}(2) (DF) [ttl 1]
09:47:24.935887 10.55.1.78.route > 224.0.0.9.route: RIPv2-resp [items 2]: {0.0.0.0}(2) {10.55.2.72/255.255.255.248}(2) (DF) [ttl 1]
09:47:27.295273 10.55.101.73.route > 224.0.0.9.route: RIPv2-resp [items 1]: {10.55.101.73/255.255.255.255}(2) (DF) [ttl 1]
09:47:31.058337 10.55.101.74.route > 224.0.0.9.route: RIPv2-resp [items 3]: {10.55.101.74/255.255.255.255}(2) {10.55.101.75/255.255.255.255}(2)[|rip] (DF) [ttl 1]
09:47:31.305168 10.55.101.73.route > 224.0.0.9.route: RIPv2-resp [items 1]: {10.55.101.73/255.255.255.255}(2) (DF) [ttl 1]
09:47:31.936587 10.55.1.78.route > 224.0.0.9.route: RIPv2-resp [items 2]: {0.0.0.0}(2) {10.55.2.72/255.255.255.248}(2) (DF) [ttl 1]
09:47:34.315088 10.55.101.73.route > 224.0.0.9.route: RIPv2-resp [items 1]: {10.55.101.73/255.255.255.255}(2) (DF) [ttl 1]
09:47:36.168865 10.55.1.74 > 10.55.1.78: icmp: echo request (DF)
09:47:36.169115 10.55.1.78 > 10.55.1.74: icmp: echo reply
这是错误的A的路由表
Destination Gateway Genmask Flags Metric Ref Use Iface
10.55.101.78 * 255.255.255.255 UH 0 0 0 eth0.22
10.55.1.72 * 255.255.255.248 U 0 0 0 eth0.22
224.0.0.0 * 255.240.0.0 U 0 0 0 lo
(A 上的eth0.22:0 是我自己加的, 没加这个接口之前, 一切OK. 路由表更新正常)
下面是我在加eth0.22:0之前(正常的时候),看到的信息
root@A#tcpdump -i eth0.22
tcpdump: WARNING: eth0.22: no IPv4 address assigned
tcpdump: listening on eth0.22
tcpdump: WARNING: compensating for unaligned libpcap packets
23:09:33.948757 10.55.1.78.route > 224.0.0.9.route: RIPv2-resp [items 2]: {0.0.0.0}(2) {10.55.2.72/255.255.255.248}(2) (DF) [ttl 1]
23:09:39.097528 10.55.1.74.route > 224.0.0.9.route: RIPv2-resp [items 3]: {10.55.101.74/255.255.255.255}(2) {10.55.101.75/255.255.255.255}(2)[|rip] (DF) [ttl 1]
23:09:40.952889 10.55.1.78.route > 224.0.0.9.route: RIPv2-resp [items 2]: {0.0.0.0}(2) {10.55.2.72/255.255.255.248}(2) (DF) [ttl 1]
23:09:44.100020 10.55.1.74.route > 224.0.0.9.route: RIPv2-resp [items 3]: {10.55.101.74/255.255.255.255}(2) {10.55.101.75/255.255.255.255}(2)[|rip] (DF) [ttl 1]
23:09:47.957020 10.55.1.78.route > 224.0.0.9.route: RIPv2-resp [items 2]: {0.0.0.0}(2) {10.55.2.72/255.255.255.248}(2) (DF) [ttl 1]
23:09:48.102014 10.55.1.74.route > 224.0.0.9.route: RIPv2-resp [items 3]: {10.55.101.74/255.255.255.255}(2) {10.55.101.75/255.255.255.255}(2)[|rip] (DF) [ttl 1]
23:09:51.959453 10.55.1.78.route > 224.0.0.9.route: RIPv2-resp [items 2]: {0.0.0.0}(2) {10.55.2.72/255.255.255.248}(2) (DF) [ttl 1]
23:09:55.105545 10.55.1.74.route > 224.0.0.9.route: RIPv2-resp [items 3]: {10.55.101.74/255.255.255.255}(2) {10.55.101.75/255.255.255.255}(2)[|rip] (DF) [ttl 1]
23:09:55.961760 10.55.1.78.route > 224.0.0.9.route: RIPv2-resp [items 2]: {0.0.0.0}(2) {10.55.2.72/255.255.255.248}(2) (DF) [ttl 1]
这是正确A的路由表
10.55.101.78 * 255.255.255.255 UH 0 0 0 eth0.22
10.55.1.72 * 255.255.255.248 U 0 0 0 eth0.22
224.0.0.0 * 255.240.0.0 U 0 0 0 lo
default 10.55.1.78 0.0.0.0 UG 2 0 0 eth0.22
那位高手能分析一下为什么加上A 上的子接口eth0.22:0之后,
(1)我的路由表不能更新
(2)我在eth0.22上收到(发出)的消息,会以10.55.101.74(73)为原地址(正常情况下应该以10.55.1.74(73)为原地址,这样peer收到后会以它为网关来更新路由表).
谢谢帮忙! |
|