您的位置:首页 > 其它

CCNP-13 OSPF试验9(BSCI)

2007-10-20 09:17 495 查看

CCNP-13 OSPF试验9

试验拓扑:


试验要求:R1 R2 R3全部起OSPF,并且按照拓扑划分区域,把AREA 1设置成为NSSA区域。
试验目的:掌握OSPF
NSSA的配置方法,并且知道和理解NSSA的作用以及NSSA区域中路由器的LSA的类型。

实验配置:
R1:
interface Loopback0
ip
address 1.1.1.1 255.255.255.0
ip
ospf network point-to-point
!
interface Loopback1
ip address
172.17.1.1 255.255.255.0
ip
ospf network point-to-point
!
interface Loopback2
ip
address 172.17.2.1 255.255.255.0
ip
ospf network point-to-point
!
interface Loopback3
ip
address 100.100.100.100 255.255.255.0
!
interface Serial1/0
ip
address 199.99.1.1 255.255.255.0
serial restart-delay 0
!
router ospf 100
router-id 1.1.1.1
log-adjacency-changes
redistribute rip subnets
network 172.17.1.0 0.0.0.255
area 0
network 172.17.2.0 0.0.0.255
area 0
network 199.99.1.0 0.0.0.255
area 0
!
router rip
version 2
network 100.0.0.0

R2:
interface Loopback0
ip
address 2.2.2.2 255.255.255.0
ip
ospf network point-to-point
!
interface Serial1/0
ip
address 199.99.1.2 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial1/1
ip
address 199.99.2.1 255.255.255.0
serial restart-delay 0
clock rate 64000
!
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
area 1 nssa
network 199.99.1.0 0.0.0.255
area 0
network 199.99.2.0 0.0.0.255
area 1

R3:
interface Loopback0
ip
address 3.3.3.3 255.255.255.0
ip
ospf network point-to-point
!
interface Loopback1
ip
address 172.16.1.1 255.255.255.0
!
interface Loopback2
ip
address 172.16.2.1 255.255.255.0
!
interface Loopback3
ip
address 172.16.3.1 255.255.255.0
!
interface Serial1/0
ip
address 199.99.2.2 255.255.255.0
serial restart-delay 0
!
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
area 1 nssa
redistribute rip subnets
network 199.99.2.0 0.0.0.255
area 1
!
router rip
version 2
network 172.16.0.0
以上为基本配置,注意用红颜色标记的部分。这样配置完成后就把AREA 1配置成为了NSSA区域,NSSA区域具有STUB区域的特性,并且STUB区域内部可以有ASBR,但是NSSA区域内可以有ASBR。下面在R2上查看一下路由表:
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

2.0.0.0/24
is subnetted, 1 subnets
C
2.2.2.0 is directly connected, Loopback0

100.0.0.0/24 is subnetted, 1 subnets
O E2
100.100.100.0 [110/20] via 199.99.1.1, 00:00:08, Serial1/0

172.17.0.0/24 is subnetted, 2 subnets
O
172.17.1.0 [110/65] via 199.99.1.1, 00:00:08, Serial1/0
O
172.17.2.0 [110/65] via 199.99.1.1, 00:00:08, Serial1/0

172.16.0.0/24 is subnetted, 3 subnets
O N2 172.16.1.0 [110/20] via 199.99.2.2,
00:00:08, Serial1/1
O N2 172.16.2.0 [110/20] via 199.99.2.2,
00:00:08, Serial1/1
O N2 172.16.3.0 [110/20] via 199.99.2.2,
00:00:08, Serial1/1
C
199.99.2.0/24 is directly connected, Serial1/1
C
199.99.1.0/24 is directly connected, Serial1/0
发现有三条O N2路由,这是NSSA独有的特性,他把5类LSA通过NSSA区域的ASBR转变为7类LSA后向区域内洪泛,查看一下LSDB:
R2#show ip ospf database

OSPF Router with ID (2.2.2.2) (Process ID
100)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 19 0x80000005 0x00494B 4
2.2.2.2 2.2.2.2 67 0x80000003 0x00E848 2

Summary Net Link States (Area
0)

Link ID ADV Router Age Seq# Checksum
199.99.2.0 2.2.2.2 186 0x80000001 0x00EBDB

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 62 0x80000004 0x00E43C 2
3.3.3.3 3.3.3.3 60 0x80000004 0x00819B 2

Summary Net Link States (Area
1)

Link ID ADV Router Age Seq# Checksum
172.17.1.0 2.2.2.2 68 0x80000002 0x00E04D
172.17.2.0 2.2.2.2 68 0x80000002 0x00D557
199.99.1.0 2.2.2.2 68 0x80000002 0x009A27

Type-7
AS External Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Tag
172.16.1.0 3.3.3.3 65 0x80000001 0x00DCC0 0
172.16.2.0 3.3.3.3 65 0x80000001 0x00D1CA 0
172.16.3.0 3.3.3.3 65 0x80000001 0x00C6D4 0

Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag
100.100.100.0 1.1.1.1 18 0x80000001 0x00ABC3 0
172.16.1.0 2.2.2.2 47 0x80000001 0x008F1C
0
172.16.2.0 2.2.2.2 47 0x80000001 0x008426 0
172.16.3.0 2.2.2.2 47 0x80000001 0x007930 0
看到LSDB中有7类的LSA出现。
再看一下R1的路由表:
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/24
is subnetted, 1 subnets
C
1.1.1.0 is directly connected, Loopback0

100.0.0.0/24 is subnetted, 1 subnets
C
100.100.100.0 is directly connected, Loopback3

172.17.0.0/24 is subnetted, 2 subnets
C
172.17.1.0 is directly connected, Loopback1
C
172.17.2.0 is directly connected, Loopback2
172.16.0.0/24
is subnetted, 3 subnets
O E2 172.16.1.0 [110/20] via 199.99.1.2,
00:00:33, Serial1/0
O E2 172.16.2.0 [110/20] via 199.99.1.2,
00:00:33, Serial1/0
O E2 172.16.3.0 [110/20] via 199.99.1.2,
00:00:33, Serial1/0
O IA 199.99.2.0/24 [110/128] via
199.99.1.2, 00:00:49, Serial1/0
C
199.99.1.0/24 is directly connected, Serial1/0
同样是这三条路由,但是在AREA
0区域内看到的是O E2路由,也就是说NSSA区域的ABR把7类LSA又转变为5类LSA后,再向其他区域洪泛。
下面在R3上show ip route看看路由表:
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

3.0.0.0/24
is subnetted, 1 subnets
C
3.3.3.0 is directly connected, Loopback0

172.17.0.0/24 is subnetted, 2 subnets
O IA
172.17.1.0 [110/129] via 199.99.2.1, 00:00:36, Serial1/0
O IA
172.17.2.0 [110/129] via 199.99.2.1, 00:00:36, Serial1/0

172.16.0.0/24 is subnetted, 3 subnets
C 172.16.1.0 is directly connected,
Loopback1
C
172.16.2.0 is directly connected, Loopback2
C
172.16.3.0 is directly connected, Loopback3
C
199.99.2.0/24 is directly connected, Serial1/0
O IA 199.99.1.0/24 [110/128] via
199.99.2.1, 00:00:36, Serial1/0
我们发现了3条区域间路由,但是并没有到100.100.100.0/24的路由,这与STUB区域的ABR把5类LSA转变为3类LSA后洪泛不太一样,在这里,NSSA区域的ABR默认是不会注入默认路由的,但是可以通过在NSSA区域的ABR的OSPF NSSA配置中添加default-information-originate
no-summary选项来解决这个问题,下面为添加了default-information-originate no-summary后路由表的变化:
R2(config-router)#area 1
nssa default-information-originate
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 199.99.2.1 to
network 0.0.0.0

3.0.0.0/24
is subnetted, 1 subnets
C
3.3.3.0 is directly connected, Loopback0

172.17.0.0/24 is subnetted, 2 subnets
O IA
172.17.1.0 [110/129] via 199.99.2.1, 00:00:49, Serial1/0
O IA
172.17.2.0 [110/129] via 199.99.2.1, 00:00:49, Serial1/0

172.16.0.0/24 is subnetted, 3 subnets
C
172.16.1.0 is directly connected, Loopback1
C
172.16.2.0 is directly connected, Loopback2
C
172.16.3.0 is directly connected, Loopback3
C
199.99.2.0/24 is directly connected, Serial1/0
O IA 199.99.1.0/24 [110/128] via
199.99.2.1, 00:00:49, Serial1/0
O*N2 0.0.0.0/0
[110/1] via 199.99.2.1, 00:00:00, Serial1/0
可以看到最后面有一条O*N2的默认路由,下一条地址是199.99.2.1,也就是ABR的地址。OK,这样的话就可以通过默认路由到达100.100.100.0/24了。
下面我们来把AREA 1配置成为完全NSSA区域。与完全STUB配置方法相同,只需在路由配置模式中输入:
area 1 nssa
default-information-originate no-summary
这样,AREA 1区玉酒杯配置成为了一个完全NSSA区域。完全NSSA区域也具有完全STUB区域的特性,查看一下R3的路由表就可以知道了:
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 199.99.2.1 to
network 0.0.0.0

3.0.0.0/24
is subnetted, 1 subnets
C
3.3.3.0 is directly connected, Loopback0

172.16.0.0/24 is subnetted, 3 subnets
C
172.16.1.0 is directly connected, Loopback1
C
172.16.2.0 is directly connected, Loopback2
C
172.16.3.0 is directly connected, Loopback3
C
199.99.2.0/24 is directly connected, Serial1/0
O*IA
0.0.0.0/0 [110/65] via 199.99.2.1, 00:00:36, Serial1/0
可以发现就剩下一条默认路由了,查看一下LSDB:
R3#show ip ospf database

OSPF Router with ID (3.3.3.3) (Process ID 100)

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 36 0x80000003 0x00E63B 2
3.3.3.3 3.3.3.3 38 0x80000002 0x008599 2

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum
0.0.0.0 2.2.2.2 49 0x80000001 0x00FC31

Type-7 AS External Link States
(Area 1)

Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 2.2.2.2 49 0x80000001 0x003744 0
172.16.1.0 3.3.3.3 45 0x80000001 0x00DCC0 0
172.16.2.0 3.3.3.3 45 0x80000001 0x00D1CA 0
172.16.3.0 3.3.3.3 45 0x80000001 0x00C6D4 0
可以看到R3的LSDB里面就剩下一条0.0.0.0的3类LSA了。

实验总结:掌握OSPF NSSA和完全NSSA的配置方法,并且知道和理解NSSA的主要特性:不会自动注入默认路由,NSSA区域中的ASBR将5类LSA转变为7类LSA向区域内洪泛,然后NSSA区域的ABR又将7类LSA转变为5类LSA向其他区域洪泛。

本文出自 “★Beckham~23” 博客,请务必保留此出处http://loveme23.blog.51cto.com/7891/46899
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: