CCNP-13 OSPF试验9(BSCI)





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 向其他区域洪泛。




















本文转自loveme2351CTO博客,原文链接: http://blog.51cto.com/loveme23/46899  ,如需转载请自行联系原作者

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值