§§
 

公告

我的分类(专题)

日志更新

最新评论

留言板

搜索

链接

Blog信息




 

ospf stub  区域lsa类型
zhangxinwen 发表于 2007-8-27 18:06:36

实验目的:验证stub区域的LSA. 类型
        区域间汇总和区域外汇总

R1(config-router)#do sh run
interface Loopback0
 ip address 192.168.16.1 255.255.255.0
interface Loopback1
 ip address 192.168.17.1 255.255.255.0
interface Loopback2
 ip address 192.168.18.1 255.255.255.0
interface Loopback3
 ip address 192.168.19.1 255.255.255.0
interface Serial2/1
 ip address 12.0.0.1 255.255.255.0
router ospf 100
 router-id 1.1.1.1
 network 12.0.0.0 0.0.0.255 area 12
 network 192.168.16.0 0.0.3.255 area 12
!      
R2(config-router)#do sh run
interface Loopback0
 ip address 2.2.2.2 255.255.255.0
interface Serial2/1
 ip address 12.0.0.2 255.255.255.0
interface Serial2/2
 ip address 23.0.0.2 255.255.255.0
router ospf 100
 router-id 2.2.2.2
area 12 range 192.168.16.0 255.255.252.0   在ABR上做域间汇总
 network 12.0.0.0 0.0.0.255 area 12
 network 23.0.0.0 0.0.0.255 area 0 
R3(config-router)# do sh run
interface Serial2/1
 ip address 23.0.0.3 255.255.255.0
interface Serial2/2
 ip address 34.0.0.3 255.255.255.0
router ospf 100
 router-id 3.3.3.3
 network 23.0.0.0 0.0.0.255 area 0
 network 34.0.0.0 0.0.0.255 area 34
 R4#sh run
interface Loopback0
 ip address 150.100.32.1 255.255.255.0
interface Loopback1
 ip address 150.100.33.1 255.255.255.0
interface Loopback2
 ip address 150.100.34.1 255.255.255.0
interface Serial2/1
 ip address 34.0.0.4 255.255.255.0
router ospf 100
 router-id 4.4.4.4
summary-address 150.100.32.0 255.255.252.0  在ASBR上汇总自治系统外部路由。
redistribute connected subnets   直连重分布到ospf 进程
network 34.0.0.0 0.0.0.255 area 34
--------------------------------------------------------------------------------------------------------------------\
R2(config-if)#do sh ip rout
Gateway of last resort is not set

     34.0.0.0/24 is subnetted, 1 subnets
O IA    34.0.0.0 [110/128] via 23.0.0.3, 00:01:35, Serial2/2
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial2/2
     192.168.17.0/32 is subnetted, 1 subnets
O       192.168.17.1 [110/65] via 12.0.0.1, 00:01:35, Serial2/1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial2/1
     192.168.16.0/32 is subnetted, 1 subnets
O       192.168.16.1 [110/65] via 12.0.0.1, 00:01:35, Serial2/1
     192.168.19.0/32 is subnetted, 1 subnets
O       192.168.19.1 [110/65] via 12.0.0.1, 00:01:36, Serial2/1
     150.100.0.0/22 is subnetted, 1 subnets
O E2    150.100.32.0 [110/20] via 23.0.0.3, 00:01:36, Serial2/2
     192.168.18.0/32 is subnetted, 1 subnets
O       192.168.18.1 [110/65] via 12.0.0.1, 00:01:36, Serial2/1
O    192.168.16.0/22 is a summary, 00:01:37, Null0
在ABR(R2)上做域间汇总,会多出一条到null 0的路由。用于防止过大宣告所引起的路由黑洞。
R3(config-if)#do sh ip rou
Gateway of last resort is not set

     34.0.0.0/24 is subnetted, 1 subnets
C       34.0.0.0 is directly connected, Serial2/2
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial2/1
     12.0.0.0/24 is subnetted, 1 subnets
O IA    12.0.0.0 [110/128] via 23.0.0.2, 00:12:14, Serial2/1
     150.100.0.0/22 is subnetted, 1 subnets
O E2    150.100.32.0 [110/20] via 34.0.0.4, 00:04:04, Serial2/2
O IA 192.168.16.0/22 [110/129] via 23.0.0.2, 00:04:09, Serial2/1
经过域间和域外汇总,在R3上就会是会总后的路由。150.100.0.0/22 ,192.168.16.0/22
R4(config)#do sh ip rou
Gateway of last resort is not set
     34.0.0.0/24 is subnetted, 1 subnets
C       34.0.0.0 is directly connected, Serial2/1
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.0.0.0 [110/128] via 34.0.0.3, 00:10:36, Serial2/1
     12.0.0.0/24 is subnetted, 1 subnets
O IA    12.0.0.0 [110/192] via 34.0.0.3, 00:10:36, Serial2/1
     150.100.0.0/16 is variably subnetted, 4 subnets, 2 masks
C       150.100.34.0/24 is directly connected, Loopback2
O       150.100.32.0/22 is a summary, 00:09:36, Null0
C       150.100.32.0/24 is directly connected, Loopback0
C       150.100.33.0/24 is directly connected, Loopback1
O IA 192.168.16.0/22 [110/193] via 34.0.0.3, 00:02:31, Serial2/1
域外汇总对自己不起作用,,只是通告给别人减少了路由条目。自己也多了一条到null 0的路由。用于防止过大宣告所引起的路由黑洞。
R1(config-router)#do sh ip ospf da

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


                Router Link States (Area 12)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         38          0x80000013 0x005297 2
192.168.19.1    192.168.19.1    38          0x80000014 0x00BA86 6

                Summary Net Link States (Area 12)

Link ID         ADV Router      Age         Seq#       Checksum
23.0.0.0        2.2.2.2         55          0x8000000A 0x009143
34.0.0.0        2.2.2.2         55          0x80000007 0x008A02

                Summary ASB Link States (Area 12)

Link ID         ADV Router      Age         Seq#       Checksum
4.4.4.4         2.2.2.2         55          0x80000001 0x008B18

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
150.100.32.0    4.4.4.4         1729        0x80000002 0x00A2D4 0     
查看R1数据库,  在区域12中有1型,3型。4型 ,5型  LSA.
R2(config-router)# do sh ip ospf da

       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
2.2.2.2         2.2.2.2         1705        0x8000000E 0x00CD7C 2
3.3.3.3         3.3.3.3         1599        0x80000008 0x0079D1 2

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
12.0.0.0        2.2.2.2         940         0x80000005 0x002BB9
34.0.0.0        3.3.3.3         1599        0x80000005 0x00EDDC
34.0.0.0        4.4.4.4         3718        0x80000002 0x00D5F3

                Summary ASB Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
4.4.4.4         3.3.3.3         1599        0x80000002 0x00E8F5

                Router Link States (Area 12)
         
Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         148         0x80000014 0x0006BC 1
192.168.19.1    192.168.19.1    231         0x80000014 0x00BA86 6

                Summary Net Link States (Area 12)

Link ID         ADV Router      Age         Seq#       Checksum
23.0.0.0        2.2.2.2         248         0x8000000A 0x009143
34.0.0.0        2.2.2.2         248         0x80000007 0x008A02

                Summary ASB Link States (Area 12)

Link ID         ADV Router      Age         Seq#       Checksum
4.4.4.4         2.2.2.2         248         0x80000001 0x008B18

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
150.100.32.0    4.4.4.4         1923        0x80000002 0x00A2D4 0
查看R2数据库,  在区域0中有1型,3型。4型 ,5型,  LSA. 在区域12中有1型,3型。4型 ,5型  LSA.
R1(config-router)#area 12 stub   将区域12 的所有路由器都配置成stub
R2(config-router)#area 12 stub
R1(config-router)#do sh ip ospf da

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


                Router Link States (Area 12)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         10          0x80000011 0x007479 2
192.168.19.1    192.168.19.1    10          0x80000012 0x00DC68 6

                Summary Net Link States (Area 12)

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         2.2.2.2         41          0x80000001 0x0075C0
23.0.0.0        2.2.2.2         41          0x80000009 0x00B126
34.0.0.0        2.2.2.2         41          0x80000006 0x00AAE4
配置成stub后查看R1数据库,  在区域12中有1型,3型,LSA.。
R1(config-router)#do sh ip rou
Gateway of last resort is 12.0.0.2 to network 0.0.0.0

     34.0.0.0/24 is subnetted, 1 subnets
O IA    34.0.0.0 [110/192] via 12.0.0.2, 00:03:31, Serial2/1
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.0.0.0 [110/128] via 12.0.0.2, 00:03:31, Serial2/1
C    192.168.17.0/24 is directly connected, Loopback1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial2/1
C    192.168.16.0/24 is directly connected, Loopback0
C    192.168.19.0/24 is directly connected, Loopback3
C    192.168.18.0/24 is directly connected, Loopback2
O*IA 0.0.0.0/0 [110/65] via 12.0.0.2, 00:03:31, Serial2/1
且3型的,LSA.多了一条默认路由。

R2(config-router)#do sh ip ospf da

       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
2.2.2.2         2.2.2.2         409         0x8000000F 0x00CB7D 2
3.3.3.3         3.3.3.3         291         0x80000009 0x0077D2 2

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
12.0.0.0        2.2.2.2         1645        0x80000005 0x002BB9
34.0.0.0        3.3.3.3         291         0x80000006 0x00EBDD
192.168.16.0    2.2.2.2         269         0x80000001 0x006815

                Summary ASB Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
4.4.4.4         3.3.3.3         291         0x80000003 0x00E6F6

                Router Link States (Area 12)
         
Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         283         0x80000015 0x006C7D 2
192.168.19.1    192.168.19.1    283         0x80000016 0x00D46C 6

                Summary Net Link States (Area 12)

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         2.2.2.2         290         0x80000001 0x0075C0
23.0.0.0        2.2.2.2         290         0x8000000B 0x00AD28
34.0.0.0        2.2.2.2         290         0x80000008 0x00A6E6

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
150.100.32.0    4.4.4.4         634         0x80000003 0x00A0D5 0
配置成stub区域后,查看R2数据库,  在区域0中有1型,3型。4型,5型 ,LSA.没有变 在区域12中有1型,3型,LSA.。且3型的,LSA.多了一条默认路由。
R2(config-router)#do sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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

     34.0.0.0/24 is subnetted, 1 subnets
O IA    34.0.0.0 [110/128] via 23.0.0.3, 00:07:13, Serial2/2
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial2/2
     192.168.17.0/32 is subnetted, 1 subnets
O       192.168.17.1 [110/65] via 12.0.0.1, 00:07:13, Serial2/1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial2/1
     192.168.16.0/32 is subnetted, 1 subnets
O       192.168.16.1 [110/65] via 12.0.0.1, 00:07:13, Serial2/1
     192.168.19.0/32 is subnetted, 1 subnets
O       192.168.19.1 [110/65] via 12.0.0.1, 00:07:14, Serial2/1
     150.100.0.0/22 is subnetted, 1 subnets
O E2    150.100.32.0 [110/20] via 23.0.0.3, 00:07:14, Serial2/2
     192.168.18.0/32 is subnetted, 1 subnets
O       192.168.18.1 [110/65] via 12.0.0.1, 00:07:14, Serial2/1
O    192.168.16.0/22 is a summary, 00:07:14, Null0
R2上没有默认路由。
结论stub区域的路由器会过滤类型4 和类型5的LSA.(既不需要外部路由),此时会产生一条默认路由,3型LSA.


阅读全文 | 回复(0) | 引用通告 | 编辑
 


发表评论:

    昵称:
    密码:
    主页:
    标题:





© COPYRIGHT 2005 ALL RIGHTS RESERVED

 
Powered by Oblog.