注意汇总信息并不会自动通告到area中.所以汇总的网段也是需要在 area内通告的.这样 汇总的条目才能在路由表中体现出来.
show run
Building configuration...
Current configuration : 1390 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$wH5v$KW08fDIwKneDU0FY5yoaW.
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
ip host r2 10.8.1.1
ip host r3 172.20.1.2
ip host r4 172.20.1.6
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
ip address 10.0.0.1 255.255.0.0
!
interface Loopback2
ip address 10.1.0.1 255.255.0.0
!
interface Loopback3
ip address 10.2.0.1 255.255.0.0
!
interface Loopback4
ip address 10.3.0.1 255.255.0.0
!
interface Loopback5
ip address 10.4.0.1 255.255.0.0
!
interface Loopback6
ip address 10.5.0.1 255.255.0.0
!
interface Loopback7
ip address 10.6.0.1 255.255.0.0
!
interface Loopback8
ip address 10.7.0.1 255.255.0.0
!
interface FastEthernet0/0
ip address 10.8.1.2 255.255.255.0
duplex half
!
interface FastEthernet1/0
no ip address
shutdown
duplex half
!
router ospf 1
log-adjacency-changes
area 15 range 10.0.0.0 255.248.0.0
network 1.1.1.1 0.0.0.0 area 15
network 10.1.0.0 0.0.255.255 area 15
network 10.8.1.0 0.0.0.255 area 0
!
ip classless
ip route 10.0.0.0 255.248.0.0 Null0
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
stopbits 1
line aux 0
line vty 0 4
password 123
login
!
!
end
r1#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 10.8.1.1, 00:10:16, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/3] via 10.8.1.1, 00:10:16, FastEthernet0/0
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/3] via 10.8.1.1, 00:10:16, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 10 subnets, 3 masks
C 10.8.1.0/24 is directly connected, FastEthernet0/0
C 10.2.0.0/16 is directly connected, Loopback3
C 10.3.0.0/16 is directly connected, Loopback4
C 10.0.0.0/16 is directly connected, Loopback1
S 10.0.0.0/13 is directly connected, Null0
C 10.1.0.0/16 is directly connected, Loopback2
C 10.6.0.0/16 is directly connected, Loopback7
C 10.7.0.0/16 is directly connected, Loopback8
C 10.4.0.0/16 is directly connected, Loopback5
C 10.5.0.0/16 is directly connected, Loopback6
O IA 172.16.0.0/12 [110/2] via 10.8.1.1, 00:10:19, FastEthernet0/0
r1#r2
Translating "r2"
Trying r2 (10.8.1.1)... Open
User Access Verification
Password:
r2>en
Password:
r2#show run
Building configuration...
Current configuration : 1118 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r2
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$EF19$mRaq6iuNiulip5dA59TwB.
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
ip host r1 10.8.1.2
ip host r3 172.20.1.2
ip host r4 172.20.1.6
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Loopback1
no ip address
!
interface FastEthernet0/0
ip address 10.8.1.1 255.255.255.0
duplex half
!
interface FastEthernet1/0
ip address 172.20.1.1 255.255.255.252
duplex half
!
interface FastEthernet2/0
ip address 172.20.1.5 255.255.255.252
duplex half
!
router ospf 1
log-adjacency-changes
area 25 range 172.16.0.0 255.240.0.0
network 2.2.2.2 0.0.0.0 area 0
network 10.8.1.0 0.0.0.255 area 0
network 172.20.1.0 0.0.0.3 area 25
network 172.20.1.4 0.0.0.3 area 25
!
ip classless
ip route 172.16.0.0 255.240.0.0 Null0
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
stopbits 1
line aux 0
line vty 0 4
password 123
login
!
!
end
r2#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/2] via 10.8.1.2, 00:13:00, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/2] via 172.20.1.2, 00:14:23, FastEthernet1/0
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/2] via 172.20.1.6, 00:14:23, FastEthernet2/0
172.16.0.0/32 is subnetted, 1 subnets
O 172.16.27.1 [110/2] via 172.20.1.2, 00:14:23, FastEthernet1/0
172.20.0.0/30 is subnetted, 2 subnets
C 172.20.1.0 is directly connected, FastEthernet1/0
C 172.20.1.4 is directly connected, FastEthernet2/0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.8.1.0/24 is directly connected, FastEthernet0/0
O IA 10.0.0.0/13 [110/2] via 10.8.1.2, 00:10:51, FastEthernet0/0
S 172.16.0.0/12 is directly connected, Null0
r2#r3
Translating "r3"
Trying r3 (172.20.1.2)... Open
User Access Verification
Password:
r3>en
Password:
r3#show run
Building configuration...
Current configuration : 946 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r3
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$QHpG$uqusRs2Au8ve6uJVanat2/
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
ip host r1 10.8.1.2
ip host r2 172.20.1.1
ip host r4 172.20.1.6
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Loopback1
ip address 172.16.27.1 255.255.255.128
!
interface FastEthernet0/0
ip address 172.20.1.2 255.255.255.252
duplex half
!
interface FastEthernet1/0
no ip address
shutdown
duplex half
!
router ospf 1
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 25
network 172.16.27.0 0.0.0.127 area 25
network 172.20.1.0 0.0.0.3 area 25
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
stopbits 1
line aux 0
line vty 0 4
password 123
login
!
!
end
r3#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/3] via 172.20.1.1, 00:15:14, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/2] via 172.20.1.1, 00:13:42, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/3] via 172.20.1.1, 00:15:14, FastEthernet0/0
172.16.0.0/25 is subnetted, 1 subnets
C 172.16.27.0 is directly connected, Loopback1
172.20.0.0/30 is subnetted, 2 subnets
C 172.20.1.0 is directly connected, FastEthernet0/0
O 172.20.1.4 [110/2] via 172.20.1.1, 00:15:14, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O IA 10.8.1.0/24 [110/2] via 172.20.1.1, 00:15:16, FastEthernet0/0
O IA 10.0.0.0/13 [110/3] via 172.20.1.1, 00:11:35, FastEthernet0/0
r3#r4
Translating "r4"
Trying r4 (172.20.1.6)... Open
User Access Verification
Password:
r4>en
Password:
r4#show run
Building configuration...
Current configuration : 946 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r4
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$wQYA$LIXMdT64Hkyd50o3.VN4M0
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
ip host r1 10.8.1.2
ip host r2 172.20.1.5
ip host r3 172.20.1.2
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Loopback1
ip address 172.16.27.195 255.255.255.248
!
interface FastEthernet0/0
ip address 172.20.1.6 255.255.255.252
duplex half
!
interface FastEthernet1/0
no ip address
shutdown
duplex half
!
router ospf 1
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 25
network 172.16.27.0 0.0.0.7 area 25
network 172.20.1.4 0.0.0.3 area 25
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
stopbits 1
line aux 0
line vty 0 4
password 123
login
!
!
end
r4#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/3] via 172.20.1.5, 00:15:43, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/2] via 172.20.1.5, 00:14:21, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/3] via 172.20.1.5, 00:15:43, FastEthernet0/0
4.0.0.0/32 is subnetted, 1 subnets
C 4.4.4.4 is directly connected, Loopback0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.27.192/29 is directly connected, Loopback1
O 172.16.27.1/32 [110/3] via 172.20.1.5, 00:15:43, FastEthernet0/0
172.20.0.0/30 is subnetted, 2 subnets
O 172.20.1.0 [110/2] via 172.20.1.5, 00:15:43, FastEthernet0/0
C 172.20.1.4 is directly connected, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O IA 10.8.1.0/24 [110/2] via 172.20.1.5, 00:15:45, FastEthernet0/0
O IA 10.0.0.0/13 [110/3] via 172.20.1.5, 00:12:13, FastEthernet0/0
r4#ping 10.1.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 140/176/236 ms
r4#ping 10.7.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.7.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 140/182/216 ms
r4#ping 172.16.27.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.27.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 120/183/224 ms
r4#