OSPF關於再發布的排錯
一 實驗覈心
Subnets關鍵字告訴OSPF再分佈所有子網路由。沒有這個關鍵字,OSPF只會再發布未劃分子網的網絡,那就是爲什麼沒有一個RIP網絡被正確地再分佈。
實驗:Westasmanping不通遠端網絡
Berlin:
router ospf 1
redistribute rip
network 192.168.10.8 0.0.0.3 area 0
network 192.168.10.12 0.0.0.3 area 0
!
router rip
version 2
network 10.0.0.0!
Frankful:
router ospf 1
redistribute rip
network 192.168.10.8 0.0.0.3 area 0
network 192.168.10.4 0.0.0.3 area 0
!
router rip
version 2
network 10.0.0.0
Westasman:
router ospf 1
network 192.168.72.0 0.0.0.255 area 0
network 192.168.10.12 0.0.0.3 area 0
network 192.168.10.4 0.0.0.3 area 0
二 排錯步驟
Westasman# ping 10.0.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Router#ping 192.168.10.13
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.13, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/19/92 ms
Westasman#ping 192.168.10.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/6/20 ms
Westasman#ping 192.168.10.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/35/104 ms
Westasman#ping 192.168.10.9
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.9, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/7/32 ms
Westasman#ping 10.0.4.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.4.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Westasman#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
192.168.10.0/30 is subnetted, 3 subnets
C 192.168.10.4 is directly connected, Serial0/1
O 192.168.10.8 [110/128] via 192.168.10.13, 02:38:33, Serial0/0
[110/128] via 192.168.10.6, 02:38:33, Serial0/1
C 192.168.10.12 is directly connected, Serial0/0
C 192.168.72.0/24 is directly connected, FastEthernet0/0
Frankful#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.0.4.1 YES manual up up
Serial0/0 192.168.10.6 YES manual up up
Serial0/1 192.168.10.9 YES manual up up
FastEthernet1/0 unassigned YES unset administratively down down
Frankful#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.0.4.0 is directly connected, FastEthernet0/0
192.168.10.0/30 is subnetted, 3 subnets
C 192.168.10.4 is directly connected, Serial0/0
C 192.168.10.8 is directly connected, Serial0/1
O 192.168.10.12 [110/128] via 192.168.10.5, 00:10:38, Serial0/0
[110/128] via 192.168.10.10, 00:10:38, Serial0/1
O 192.168.72.0/24 [110/65] via 192.168.10.5, 00:10:38, Serial0/0
Berlin#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.0.1.1 YES manual up up
Serial0/0 192.168.10.13 YES manual up up
Serial0/1 192.168.10.10 YES manual up up
FastEthernet1/0 unassigned YES unset administratively down down
Loopback0 10.0.2.1 YES manual up up
Loopback1 10.0.3.1 YES manual up up
Berlin#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 3 subnets
C 10.0.1.0 is directly connected, FastEthernet0/0
C 10.0.2.0 is directly connected, Loopback0
C 10.0.3.0 is directly connected, Loopback1
192.168.10.0/30 is subnetted, 3 subnets
O 192.168.10.4 [110/128] via 192.168.10.9, 00:11:59, Serial0/1
[110/128] via 192.168.10.14, 00:11:59, Serial0/0
C 192.168.10.8 is directly connected, Serial0/1
C 192.168.10.12 is directly connected, Serial0/0
O 192.168.72.0/24 [110/65] via 192.168.10.14, 00:11:59, Serial0/0
Berlin#
Berlin#sh ip pro
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 14 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive 2
Interface Send Recv Triggered RIP Key-chain
Loopback0 2 2
Loopback1 2 2
FastEthernet0/0 2 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Passive Interface(s):
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 120)
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.0.3.1
It is an autonomous system boundary router
Redistributing External Routes from,
rip
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.10.8 0.0.0.3 area 0
192.168.10.12 0.0.0.3 area 0
Routing Information Sources:
Gateway Distance Last Update
10.0.3.1 110 00:01:53
192.168.10.9 110 00:01:53
192.168.72.1 110 00:01:53
Distance: (default is 110)
Frankful#sh ip pro
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 14 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive 2
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 2 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Passive Interface(s):
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 120)
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.10.9
It is an autonomous system boundary router
Redistributing External Routes from,
rip
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.10.8 0.0.0.3 area 0
192.168.10.4 0.0.0.3 area 0
Routing Information Sources:
Gateway Distance Last Update
10.0.3.1 110 00:02:14
192.168.10.9 110 00:02:13
192.168.72.1 110 00:02:14
Distance: (default is 110)
Frankful#sh ip ospf data
OSPF Router with ID (192.168.10.9) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
192.168.10.9 192.168.10.9 166 0x8000000f 0x005625 4
10.0.3.1 10.0.3.1 167 0x80000010 0x00597f 4
192.168.72.1 192.168.72.1 167 0x80000010 0x001962 5
Berlin#sh ip ospf data
OSPF Router with ID (10.0.3.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
192.168.10.9 192.168.10.9 191 0x8000000f 0x005625 4
10.0.3.1 10.0.3.1 191 0x80000010 0x00597f 4
192.168.72.1 192.168.72.1 191 0x80000010 0x001962 5
Berlin#
Frankful(config)#router ospf 1
Frankful(config-router)#res
Frankful(config-router)#red
Frankful(config-router)#redistribute rip subnets
Berlin(config)#router ospf 1
Berlin(config-router)#red
Berlin(config-router)#redistribute rip subnets
Berlin#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 4 subnets
C 10.0.1.0 is directly connected, FastEthernet0/0
C 10.0.2.0 is directly connected, Loopback0
C 10.0.3.0 is directly connected, Loopback1
O E2 10.0.4.0 [110/20] via 192.168.10.9, 00:00:38, Serial0/1
192.168.10.0/30 is subnetted, 3 subnets
O 192.168.10.4 [110/128] via 192.168.10.9, 00:04:59, Serial0/1
[110/128] via 192.168.10.14, 00:04:59, Serial0/0
C 192.168.10.8 is directly connected, Serial0/1
C 192.168.10.12 is directly connected, Serial0/0
O 192.168.72.0/24 [110/65] via 192.168.10.14, 00:04:59, Serial0/0
Frankful#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 4 subnets
O E2 10.0.1.0 [110/20] via 192.168.10.10, 00:02:00, Serial0/1
O E2 10.0.2.0 [110/20] via 192.168.10.10, 00:02:00, Serial0/1
O E2 10.0.3.0 [110/20] via 192.168.10.10, 00:02:00, Serial0/1
C 10.0.4.0 is directly connected, FastEthernet0/0
192.168.10.0/30 is subnetted, 3 subnets
C 192.168.10.4 is directly connected, Serial0/0
C 192.168.10.8 is directly connected, Serial0/1
O 192.168.10.12 [110/128] via 192.168.10.5, 00:06:11, Serial0/0
[110/128] via 192.168.10.10, 00:06:11, Serial0/1
O 192.168.72.0/24 [110/65] via 192.168.10.5, 00:06:11, Serial0/0
Westasman#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 4 subnets
O E2 10.0.1.0 [110/20] via 192.168.10.13, 00:00:29, Serial0/0
O E2 10.0.2.0 [110/20] via 192.168.10.13, 00:00:29, Serial0/0
O E2 10.0.3.0 [110/20] via 192.168.10.13, 00:00:29, Serial0/0
O E2 10.0.4.0 [110/20] via 192.168.10.6, 00:00:02, Serial0/1
192.168.10.0/30 is subnetted, 3 subnets
C 192.168.10.4 is directly connected, Serial0/1
O 192.168.10.8 [110/128] via 192.168.10.13, 00:13:32, Serial0/0
[110/128] via 192.168.10.6, 00:13:32, Serial0/1
C 192.168.10.12 is directly connected, Serial0/0
C 192.168.72.0/24 is directly connected, FastEthernet0/0
Westasman#sh ip ospf data
OSPF Router with ID (192.168.72.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
192.168.10.9 192.168.10.9 810 0x8000000f 0x005625 4
192.168.72.1 192.168.72.1 810 0x80000010 0x001962 5
10.0.3.1 10.0.3.1 810 0x80000010 0x00597f 4
Summary ASB Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.10.9 192.168.72.1 211 0x80000001 0x00f43a
192.168.10.9 10.0.3.1 211 0x80000001 0x008b48
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
10.0.1.0 10.0.3.1 44 0x80000001 0x00c6e0 0
10.0.2.0 10.0.3.1 44 0x80000001 0x00bbea 0
10.0.3.0 10.0.3.1 44 0x80000001 0x00b0f4 0
10.0.4.0 192.168.10.9 19 0x80000001 0x0092a3 0
Westasman#
Westasman#ping 10.0.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/13/58 ms
Westasman#ping 10.0.4.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.4.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/32/103 ms
Westasman#