描述:
area 0做ospf区域验证,area23做ospf接口认证。
R1#sh run
Building configuration...
Building configuration...
Current configuration : 2677 bytes
!
version 12.4
!
version 12.4
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 Loopback4
ip address 172.16.1.1 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.18.1 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
ip address 192.168.12.1 255.255.255.0
encapsulation frame-relay
ip ospf authentication-key cisco
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.12.2 102 broadcast
no frame-relay inverse-arp
!
interface Serial1/1.145 multipoint
ip address 192.168.145.1 255.255.255.0
snmp trap link-status
frame-relay map ip 192.168.145.5 115 broadcast
frame-relay map ip 192.168.145.4 114 broadcast
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
area 0 authentication message-digest
area 0 range 20.1.0.0 255.255.252.0
area 18 virtual-link 8.8.8.8 authentication authentication-key cisco
area 145 nssa no-redistribution default-information-originate metric 100 metric-type 1 no-summary
redistribute connected metric 100 metric-type 1 subnets route-map CONNECT
network 1.1.1.1 0.0.0.0 area 0
network 20.1.1.1 0.0.0.0 area 0
network 20.1.2.1 0.0.0.0 area 0
network 20.1.3.1 0.0.0.0 area 145
network 192.168.12.1 0.0.0.0 area 0
network 192.168.18.1 0.0.0.0 area 18
network 192.168.145.1 0.0.0.0 area 145
neighbor 192.168.12.2
neighbor 192.168.145.4
neighbor 192.168.145.5
!
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 Loopback4
ip address 172.16.1.1 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.18.1 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
ip address 192.168.12.1 255.255.255.0
encapsulation frame-relay
ip ospf authentication-key cisco
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.12.2 102 broadcast
no frame-relay inverse-arp
!
interface Serial1/1.145 multipoint
ip address 192.168.145.1 255.255.255.0
snmp trap link-status
frame-relay map ip 192.168.145.5 115 broadcast
frame-relay map ip 192.168.145.4 114 broadcast
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
area 0 authentication message-digest
area 0 range 20.1.0.0 255.255.252.0
area 18 virtual-link 8.8.8.8 authentication authentication-key cisco
area 145 nssa no-redistribution default-information-originate metric 100 metric-type 1 no-summary
redistribute connected metric 100 metric-type 1 subnets route-map CONNECT
network 1.1.1.1 0.0.0.0 area 0
network 20.1.1.1 0.0.0.0 area 0
network 20.1.2.1 0.0.0.0 area 0
network 20.1.3.1 0.0.0.0 area 145
network 192.168.12.1 0.0.0.0 area 0
network 192.168.18.1 0.0.0.0 area 18
network 192.168.145.1 0.0.0.0 area 145
neighbor 192.168.12.2
neighbor 192.168.145.4
neighbor 192.168.145.5
!
route-map CONNECT permit 10
match interface Loopback4
!
match interface Loopback4
!
end
R2#sh run
Building configuration...
Building configuration...
Current configuration : 2149 bytes
!
version 12.4
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Loopback1
ip address 172.16.2.1 255.255.255.0
interface FastEthernet0/1
ip address 192.168.28.2 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
ip address 192.168.12.2 255.255.255.0
encapsulation frame-relay
ip ospf authentication-key cisco
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.12.1 201 broadcast
no frame-relay inverse-arp
!
interface Serial1/1
ip address 192.168.23.2 255.255.255.0
encapsulation frame-relay
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 cisco
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.23.3 213 broadcast
no frame-relay inverse-arp
!
router eigrp 100
network 172.16.2.0 0.0.0.255
no auto-summary
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
area 0 authentication message-digest
area 0 range 20.1.0.0 255.255.252.0
area 23 stub no-summary
area 28 virtual-link 8.8.8.8 authentication authentication-key cisco
redistribute eigrp 100 metric 100 subnets
network 2.2.2.2 0.0.0.0 area 0
network 192.168.12.2 0.0.0.0 area 0
network 192.168.23.2 0.0.0.0 area 23
network 192.168.28.2 0.0.0.0 area 28
neighbor 192.168.23.3
!
version 12.4
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Loopback1
ip address 172.16.2.1 255.255.255.0
interface FastEthernet0/1
ip address 192.168.28.2 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
ip address 192.168.12.2 255.255.255.0
encapsulation frame-relay
ip ospf authentication-key cisco
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.12.1 201 broadcast
no frame-relay inverse-arp
!
interface Serial1/1
ip address 192.168.23.2 255.255.255.0
encapsulation frame-relay
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 cisco
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.23.3 213 broadcast
no frame-relay inverse-arp
!
router eigrp 100
network 172.16.2.0 0.0.0.255
no auto-summary
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
area 0 authentication message-digest
area 0 range 20.1.0.0 255.255.252.0
area 23 stub no-summary
area 28 virtual-link 8.8.8.8 authentication authentication-key cisco
redistribute eigrp 100 metric 100 subnets
network 2.2.2.2 0.0.0.0 area 0
network 192.168.12.2 0.0.0.0 area 0
network 192.168.23.2 0.0.0.0 area 23
network 192.168.28.2 0.0.0.0 area 28
neighbor 192.168.23.3
end
R3#sh run
Building configuration...
Building configuration...
Current configuration : 1619 bytes
!
version 12.4
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial1/1
ip address 192.168.23.3 255.255.255.0
encapsulation frame-relay
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 cisco
ip ospf priority 0
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.23.2 312 broadcast
no frame-relay inverse-arp
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
area 23 stub
network 3.3.3.3 0.0.0.0 area 23
network 192.168.23.3 0.0.0.0 area 23
!
version 12.4
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial1/1
ip address 192.168.23.3 255.255.255.0
encapsulation frame-relay
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 cisco
ip ospf priority 0
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.23.2 312 broadcast
no frame-relay inverse-arp
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
area 23 stub
network 3.3.3.3 0.0.0.0 area 23
network 192.168.23.3 0.0.0.0 area 23
!
end
end
R4#sh run
Building configuration...
Current configuration : 1594 bytes
!
version 12.4
!
version 12.4
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
ip address 4.4.4.4 255.255.255.255
!
interface Serial1/1
ip address 192.168.145.4 255.255.255.0
encapsulation frame-relay
ip ospf priority 0
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.145.5 411 broadcast
frame-relay map ip 192.168.145.1 411 broadcast
no frame-relay inverse-arp
ip address 192.168.145.4 255.255.255.0
encapsulation frame-relay
ip ospf priority 0
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.145.5 411 broadcast
frame-relay map ip 192.168.145.1 411 broadcast
no frame-relay inverse-arp
router ospf 1
router-id 4.4.4.4
log-adjacency-changes
area 145 nssa
network 4.4.4.4 0.0.0.0 area 145
network 192.168.145.4 0.0.0.0 area 145
!
end
router-id 4.4.4.4
log-adjacency-changes
area 145 nssa
network 4.4.4.4 0.0.0.0 area 145
network 192.168.145.4 0.0.0.0 area 145
!
end
R5#sh run
Building configuration...
Current configuration : 1822 bytes
!
version 12.4
!
version 12.4
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.57.5 255.255.255.0
duplex auto
speed auto
!
interface Serial1/1
ip address 192.168.145.5 255.255.255.0
encapsulation frame-relay
ip ospf priority 0
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.145.4 511 broadcast
frame-relay map ip 192.168.145.1 511 broadcast
no frame-relay inverse-arp
ip address 5.5.5.5 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.57.5 255.255.255.0
duplex auto
speed auto
!
interface Serial1/1
ip address 192.168.145.5 255.255.255.0
encapsulation frame-relay
ip ospf priority 0
serial restart-delay 0
no arp frame-relay
frame-relay map ip 192.168.145.4 511 broadcast
frame-relay map ip 192.168.145.1 511 broadcast
no frame-relay inverse-arp
router ospf 1
router-id 5.5.5.5
log-adjacency-changes
area 145 nssa
summary-address 10.1.0.0 255.255.252.0
redistribute rip metric 100 metric-type 1 subnets
network 5.5.5.5 0.0.0.0 area 145
network 192.168.145.5 0.0.0.0 area 145
!
router rip
version 2
redistribute ospf 1 metric 5
network 192.168.57.0
no auto-summary
router-id 5.5.5.5
log-adjacency-changes
area 145 nssa
summary-address 10.1.0.0 255.255.252.0
redistribute rip metric 100 metric-type 1 subnets
network 5.5.5.5 0.0.0.0 area 145
network 192.168.145.5 0.0.0.0 area 145
!
router rip
version 2
redistribute ospf 1 metric 5
network 192.168.57.0
no auto-summary
end
R6#sh run
Building configuration...
Current configuration : 1473 bytes
!
version 12.4
!
version 12.4
interface Loopback0
ip address 6.6.6.6 255.255.255.255
ip address 6.6.6.6 255.255.255.255
interface FastEthernet0/1
ip address 192.168.68.6 255.255.255.0
duplex auto
speed auto
ip address 192.168.68.6 255.255.255.0
duplex auto
speed auto
router ospf 1
router-id 6.6.6.6
log-adjacency-changes
area 68 stub
network 6.6.6.6 0.0.0.0 area 68
network 192.168.68.6 0.0.0.0 area 68
router-id 6.6.6.6
log-adjacency-changes
area 68 stub
network 6.6.6.6 0.0.0.0 area 68
network 192.168.68.6 0.0.0.0 area 68
end
R7#sh run
Building configuration...
Current configuration : 1576 bytes
!
version 12.4
!
version 12.4
interface Loopback0
ip address 7.7.7.7 255.255.255.255
!
interface Loopback1
ip address 10.1.1.1 255.255.255.0
!
interface Loopback2
ip address 10.1.2.1 255.255.255.0
!
interface Loopback3
ip address 10.1.3.1 255.255.255.0
!
interface FastEthernet0/1
no switchport
ip address 192.168.57.7 255.255.255.0
speed 10
ip address 7.7.7.7 255.255.255.255
!
interface Loopback1
ip address 10.1.1.1 255.255.255.0
!
interface Loopback2
ip address 10.1.2.1 255.255.255.0
!
interface Loopback3
ip address 10.1.3.1 255.255.255.0
!
interface FastEthernet0/1
no switchport
ip address 192.168.57.7 255.255.255.0
speed 10
router rip
version 2
network 10.0.0.0
network 192.168.57.0
no auto-summary
version 2
network 10.0.0.0
network 192.168.57.0
no auto-summary
end
R8#sh run
Building configuration...
Current configuration : 1828 bytes
!
version 12.4
interface Loopback0
ip address 8.8.8.8 255.255.255.255
!
interface FastEthernet0/1
ip address 192.168.18.8 255.255.255.0
!
interface FastEthernet0/2
ip address 192.168.28.8 255.255.255.0
interface FastEthernet0/3
ip address 192.168.68.8 255.255.255.0
!
version 12.4
interface Loopback0
ip address 8.8.8.8 255.255.255.255
!
interface FastEthernet0/1
ip address 192.168.18.8 255.255.255.0
!
interface FastEthernet0/2
ip address 192.168.28.8 255.255.255.0
interface FastEthernet0/3
ip address 192.168.68.8 255.255.255.0
!
router ospf 1
router-id 8.8.8.8
log-adjacency-changes
area 0 range 20.1.0.0 255.255.252.0
area 18 virtual-link 1.1.1.1 authentication authentication-key cisco
area 28 virtual-link 2.2.2.2 authentication authentication-key cisco
area 68 stub
network 8.8.8.8 0.0.0.0 area 18
network 192.168.18.8 0.0.0.0 area 18
network 192.168.28.8 0.0.0.0 area 28
network 192.168.68.8 0.0.0.0 area 68
!
end
router ospf 1
router-id 8.8.8.8
log-adjacency-changes
area 0 range 20.1.0.0 255.255.252.0
area 18 virtual-link 1.1.1.1 authentication authentication-key cisco
area 28 virtual-link 2.2.2.2 authentication authentication-key cisco
area 68 stub
network 8.8.8.8 0.0.0.0 area 18
network 192.168.18.8 0.0.0.0 area 18
network 192.168.28.8 0.0.0.0 area 28
network 192.168.68.8 0.0.0.0 area 68
!
end
转载于:https://blog.51cto.com/matthewyin/216850