天天看點

OSPF 綜合實驗

<a href="http://blog.51cto.com/attachment/201105/104620988.png" target="_blank"></a>

要求:

1.區域0 實作區域驗證 區域23接口驗證

2.區域145 NSSA 掌握NSSA  和完全NSSA 差別

R1

interface Loopback0

 ip address 1.1.1.1 255.255.255.255

!

interface Loopback1

 ip address 20.1.1.1 255.255.255.0

interface Loopback2

 ip address 20.1.2.1 255.255.255.0

interface Loopback3

 ip address 20.1.3.1 255.255.255.0

interface Ethernet0/0

 ip address 192.168.12.1 255.255.255.0

 ip ospf message-digest-key 1 md5 cisco

 half-duplex

interface Ethernet0/1

 ip address 192.168.18.1 255.255.255.0

interface Ethernet0/2

 no ip address

 shutdown

!         

interface Ethernet0/3

interface Serial1/0

 ip address 192.168.145.1 255.255.255.0

 encapsulation frame-relay

 ip ospf network broadcast

 ip ospf priority 10

 serial restart-delay 0

 no fair-queue

 frame-relay map ip 192.168.145.1 103

 frame-relay map ip 192.168.145.4 104 broadcast

 frame-relay map ip 192.168.145.5 105 broadcast

 no frame-relay inverse-arp

interface Serial1/1

interface Serial1/2

interface Serial1/3

router ospf 10

 router-id 1.1.1.1

 log-adjacency-changes

 area 0 authentication message-digest

 area 18 virtual-link 8.8.8.8 authentication

 area 18 virtual-link 8.8.8.8 message-digest-key 1 md5 cisco

 area 145 nssa no-redistribution default-information-originate no-summary

 network 1.1.1.1 0.0.0.0 area 145

 network 20.1.1.0 0.0.0.255 area 0

 network 20.1.2.0 0.0.0.255 area 0

 network 20.1.3.0 0.0.0.255 area 0

 network 192.168.12.0 0.0.0.255 area 0

 network 192.168.18.0 0.0.0.255 area 18

 network 192.168.145.0 0.0.0.255 area 145

R2

 ip address 2.2.2.2 255.255.255.255

 ip address 172.16.2.2 255.255.255.0

 ip address 192.168.12.2 255.255.255.0

 ip address 192.168.23.2 255.255.255.0

 ip ospf authentication message-digest

 ip address 192.168.28.2 255.255.255.0

interface Ethernet1/0

interface Ethernet1/1

interface Ethernet1/2

interface Ethernet1/3

router eigrp 100

 network 172.16.2.0 0.0.0.255

 no auto-summary

 router-id 2.2.2.2

 area 23 stub no-summary

 area 28 virtual-link 8.8.8.8 authentication

 area 28 virtual-link 8.8.8.8 message-digest-key 1 md5 cisco

 redistribute eigrp 100 metric 120 subnets

 network 192.168.23.0 0.0.0.255 area 23

 network 192.168.28.0 0.0.0.255 area 28

R3

 ip address 3.3.3.3 255.255.255.255

 ip address 192.168.23.3 255.255.255.0

 router-id 3.3.3.3

 area 23 stub

R4

 ip address 4.4.4.4 255.255.255.255

interface Serial0/0

interface Serial0/1

 ip address 192.168.145.4 255.255.255.0

 ip ospf priority 0

 frame-relay map ip 192.168.145.1 401 broadcast

interface Serial0/2

interface Serial0/3

 router-id 4.4.4.4

 area 145 nssa

 network 4.4.4.4 0.0.0.0 area 145

R5

 ip address 5.5.5.5 255.255.255.255

 ip address 192.168.57.5 255.255.255.0

 ip address 192.168.145.5 255.255.255.0

 frame-relay map ip 192.168.145.1 501 broadcast

 router-id 5.5.5.5

 redistribute rip metric 100 subnets

 network 5.5.5.5 0.0.0.0 area 145

router rip

 version 2

 network 192.168.57.0

R6

 ip address 6.6.6.6 255.255.255.255

 ip address 192.168.68.6 255.255.255.0

 router-id 6.6.6.6

 network 6.6.6.6 0.0.0.0 area 68

 network 192.168.68.0 0.0.0.255 area 68

R7

 ip address 7.7.7.7 255.255.255.255

 ip address 10.1.1.7 255.255.255.0

 ip address 10.1.2.7 255.255.255.0

 ip address 10.1.3.7 255.255.255.0

 ip address 192.168.57.7 255.255.255.0

 network 10.0.0.0

R8

 ip address 8.8.8.8 255.255.255.255

 ip address 192.168.68.8 255.255.255.0

 ip address 192.168.18.8 255.255.255.0

 ip address 192.168.28.8 255.255.255.0

 router-id 8.8.8.8

 area 18 virtual-link 1.1.1.1 authentication

 area 18 virtual-link 1.1.1.1 message-digest-key 1 md5 cisco

 area 28 virtual-link 2.2.2.2 authentication

 area 28 virtual-link 2.2.2.2 message-digest-key 1 md5 cisco

 network 8.8.8.8 0.0.0.0 area 18

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

C    192.168.12.0/24 is directly connected, Ethernet0/0

     1.0.0.0/32 is subnetted, 1 subnets

C       1.1.1.1 is directly connected, Loopback0

O IA 192.168.28.0/24 [110/20] via 192.168.18.8, 00:00:57, Ethernet0/1

                     [110/20] via 192.168.12.2, 00:00:57, Ethernet0/0

     4.0.0.0/32 is subnetted, 1 subnets

O       4.4.4.4 [110/65] via 192.168.145.4, 00:00:57, Serial1/0

C    192.168.145.0/24 is directly connected, Serial1/0

     20.0.0.0/8 is variably subnetted, 4 subnets, 2 masks

C       20.1.1.0/24 is directly connected, Loopback1

O       20.1.0.0/22 is a summary, 00:00:57, Null0

C       20.1.3.0/24 is directly connected, Loopback3

C       20.1.2.0/24 is directly connected, Loopback2

     5.0.0.0/32 is subnetted, 1 subnets

O       5.5.5.5 [110/65] via 192.168.145.5, 00:00:58, Serial1/0

O N2 192.168.57.0/24 [110/100] via 192.168.145.5, 00:00:58, Serial1/0

     6.0.0.0/32 is subnetted, 1 subnets

O IA    6.6.6.6 [110/21] via 192.168.18.8, 00:00:58, Ethernet0/1

     172.16.0.0/24 is subnetted, 1 subnets

O E2    172.16.2.0 [110/120] via 192.168.12.2, 00:00:58, Ethernet0/0

     8.0.0.0/32 is subnetted, 1 subnets

O       8.8.8.8 [110/11] via 192.168.18.8, 00:00:58, Ethernet0/1

     10.0.0.0/24 is subnetted, 3 subnets

O N2    10.1.3.0 [110/100] via 192.168.145.5, 00:00:58, Serial1/0

O N2    10.1.2.0 [110/100] via 192.168.145.5, 00:00:58, Serial1/0

O N2    10.1.1.0 [110/100] via 192.168.145.5, 00:00:58, Serial1/0

O IA 192.168.23.0/24 [110/20] via 192.168.12.2, 00:00:58, Ethernet0/0

O IA 192.168.68.0/24 [110/20] via 192.168.18.8, 00:00:58, Ethernet0/1

C    192.168.18.0/24 is directly connected, Ethernet0/1

R5#show ip rou

R5#show ip route 

Gateway of last resort is 192.168.145.1 to network 0.0.0.0

O       1.1.1.1 [110/65] via 192.168.145.1, 00:58:58, Serial1/2

O       4.4.4.4 [110/65] via 192.168.145.4, 00:58:58, Serial1/2

C    192.168.145.0/24 is directly connected, Serial1/2

C       5.5.5.5 is directly connected, Loopback0

C    192.168.57.0/24 is directly connected, Ethernet0/0

R       10.1.3.0 [120/1] via 192.168.57.7, 00:00:04, Ethernet0/0

R       10.1.2.0 [120/1] via 192.168.57.7, 00:00:04, Ethernet0/0

R       10.1.1.0 [120/1] via 192.168.57.7, 00:00:04, Ethernet0/0

O*IA 0.0.0.0/0 [110/65] via 192.168.145.1, 00:36:37, Serial1/2

R6#show ip route 

O IA 192.168.12.0/24 [110/30] via 192.168.68.8, 00:33:29, Ethernet0/0

O IA    1.1.1.1 [110/21] via 192.168.68.8, 00:41:41, Ethernet0/0

O IA 192.168.28.0/24 [110/20] via 192.168.68.8, 00:42:47, Ethernet0/0

O IA    4.4.4.4 [110/85] via 192.168.68.8, 00:41:41, Ethernet0/0

O IA 192.168.145.0/24 [110/84] via 192.168.68.8, 00:41:41, Ethernet0/0

     20.0.0.0/32 is subnetted, 3 subnets

O IA    20.1.1.1 [110/21] via 192.168.68.8, 00:41:41, Ethernet0/0

O IA    20.1.2.1 [110/21] via 192.168.68.8, 00:41:41, Ethernet0/0

O IA    20.1.3.1 [110/21] via 192.168.68.8, 00:41:41, Ethernet0/0

O IA    5.5.5.5 [110/85] via 192.168.68.8, 00:41:41, Ethernet0/0

O E2 192.168.57.0/24 [110/100] via 192.168.68.8, 00:29:15, Ethernet0/0

C       6.6.6.6 is directly connected, Loopback0

O E2    172.16.2.0 [110/120] via 192.168.68.8, 00:29:15, Ethernet0/0

O IA    8.8.8.8 [110/11] via 192.168.68.8, 00:42:48, Ethernet0/0

O E2    10.1.3.0 [110/100] via 192.168.68.8, 00:29:15, Ethernet0/0

O E2    10.1.2.0 [110/100] via 192.168.68.8, 00:29:15, Ethernet0/0

O E2    10.1.1.0 [110/100] via 192.168.68.8, 00:29:15, Ethernet0/0

O IA 192.168.23.0/24 [110/30] via 192.168.68.8, 00:29:20, Ethernet0/0

C    192.168.68.0/24 is directly connected, Ethernet0/0

O IA 192.168.18.0/24 [110/20] via 192.168.68.8, 00:42:48, Ethernet0/0

有一點關于nssa區域說下

area 145 nssa no-redistribution default-information-originate no-summary

             抑制5      7                  起源條預設路由                      3 4

本文轉自q狼的誘惑 51CTO部落格,原文連結:http://blog.51cto.com/liangrui/564147,如需轉載請自行聯系原作者

繼續閱讀