需求:
R1和R2配置为T-NSSA区域
R1上重发布直连路由
R3上RIP与OSPF路由的重分发
配置:
R1
R1#show run
Building configuration...
Current configuration : 1347 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R1
!
!
ip subnet-zero
ip cef
!
!
!
call rsvp-sync
!
!
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Loopback1
ip address 11.1.1.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/4
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/5
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/6
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/7
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
area 12 nssa
redistribute connected subnets route-map conn
network 1.1.1.1 0.0.0.0 area 12
network 11.1.1.1 0.0.0.0 area 12
network 12.1.1.1 0.0.0.0 area 12
!
ip classless
no ip http server
!
route-map conn permit 10
match interface Loopback1
!
!
dial-peer cor custom
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
line aux 0
line vty 0 4
!
end
R2
R2#show run
Building configuration...
Current configuration : 1209 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R2
!
!
ip subnet-zero
ip cef
!
!
!
call rsvp-sync
!
!
!
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 12.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 23.1.1.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/4
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/5
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/6
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/7
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
area 12 nssa no-summary
network 2.2.2.2 0.0.0.0 area 12
network 12.1.1.2 0.0.0.0 area 12
network 23.1.1.1 0.0.0.0 area 0
!
ip classless
no ip http server
!
!
dial-peer cor custom
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
line aux 0
line vty 0 4
!
end
R3
R3#show run
Building configuration...
Current configuration : 1258 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R3
!
!
ip subnet-zero
ip cef
!
!
!
call rsvp-sync
!
!
!
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 23.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 34.1.1.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/4
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/5
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/6
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/7
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
redistribute rip metric 300 subnets
network 3.3.3.3 0.0.0.0 area 0
network 23.1.1.2 0.0.0.0 area 0
!
router rip
version 2
redistribute ospf 1 metric 5
network 34.0.0.0
!
ip classless
no ip http server
!
!
dial-peer cor custom
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
line aux 0
line vty 0 4
!
end
R4
Building configuration...
Current configuration : 1062 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
!
ip subnet-zero
ip cef
!
!
!
call rsvp-sync
!
!
!
!
!
!
!
!
interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 34.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/4
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/5
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/6
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/7
no ip address
shutdown
serial restart-delay 0
!
router rip
version 2
network 34.0.0.0
!
ip classless
no ip http server
!
!
dial-peer cor custom
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
line aux 0
line vty 0 4
!
end
验证:
R1#show ip route
Gateway of last resort is 12.1.1.2 to network 0.0.0.0
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 12.1.1.2, 01:15:52, Serial1/0
11.0.0.0/24 is subnetted, 1 subnets
C 11.1.1.0 is directly connected, Loopback1
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial1/0
O*IA 0.0.0.0/0 [110/65] via 12.1.1.2, 01:15:52, Serial1/0
路由表中只有O路由和OIA默认路由,没有OIA域间路由和OE2的外部路由
查看R1的链路状态数据库
R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 12)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 1608 0x80000009 0x00ED45 4
2.2.2.2 2.2.2.2 1672 0x80000009 0x00F84F 3
Summary Net Link States (Area 12)
Link ID ADV Router Age Seq# Checksum
0.0.0.0 2.2.2.2 1672 0x80000003 0x00F833
这条3号类型的LSA是一条3号LSA的默认汇总路由而不是具体路由。
总结:
T-NSSA拒接LSA3,4,5 允许LSA1,2,7
NSSA与T-NSSA的区别就是前者拒绝LSA4,5 允许LSA1,2,3,7.而且需要在ABR上配置default-infornation-originate命令来生成一条O*N2默认路由
而T-NSSA拒接LSA3,4,5 允许LSA1,2,7 。 需要在ABR上指定关键字no-summary ,自动生成一条O*N2默认路由,因为是自动生成的所以就不需要参数default-infornation-originate