首页 > 其他 > 详细

OSPF复习2

时间:2014-03-26 15:58:20      阅读:556      评论:0      收藏:0      [点我收藏+]

知识点:Type of Area  区域类型 就是特殊区域的介绍


1、Stub Area 末节区域

  目的:减少区域中4、5类LSA的泛洪,优化设备性能

  实现的手段:

  1.1 区域中的ABR下放三类默认路由给区域中的路由器

  1.2区域中出现多个ABR的话,内部路由的选择是通过控制COST值来实现选路的

成为邻接关系的的条件(复习)

1、相同的hello时间和dead时间

2、相同的area号

3、认证方式相同

4、stub标识一定需要相同哦


stub区域的规则:

1.1

从上面的邻接关系建立的条件可以看出,stub标识很重要,不然邻接关系是建立不起来的哦!

区域内的路由器必须都要配置相同的STub标识

1.2

还有有一点哦,就是区域中不能出现ASBR

1.3

区域0不能成为stub区域,因为area 0是传输区域,不能受到限制

1.4

stub区域不能再外接另一个区域了


实验拓扑:

bubuko.com,布布扣

预配:

R4

interface s0/0

ip add  24.1.1.4 255.255.255.0

no shut

interface l0

ip add 4.4.4.4 255.255.255.0

no shut

router ospf 110

router-id 4.4.4.4

network 24.1.1.0 0.0.0.255 area 1

network 4.4.4.0 0.0.0.255 area 1

R2

interface s0/1

ip add 24.1.1.2 255.255.255.0

no shut

interface s0/0

ip add 12.1.1.2 255.255.255.0

no shut

interface l0

ip add 2.2.2.2 255.255.255.0

no shut

router ospf 110

router-id 2.2.2.2

network 24.1.1.0 0.0.0.255 area 1

network 12.1.1.0 0.0.0.255 area 0

network 2.2.2.0 0.0.0.255 area 0

R1

interface s0/1

ip add 12.1.1.1 255.255.255.0

no sut

interface s0/0

ip add 13.1.1.1 255.255.255.0

no shut

interface l0

ip add 1.1.1.1 255.255.255.0

no shut

router ospf 110

router-id 1.1.1.1

network 12.1.1.0 0.0.0.255 area 0

network 13.1.1.0 0.0.0.255 area 2

network 1.1.1.0 0.0.0.255 area 0

R3

interface s0/1

ip add 13.1.1.3 255.255.255.0

no shut

interface s0/0

ip add 35.1.1.3 255.255.255.0

no shut

int l0

ip add 3.3.3.3 255.255.255.0

router ospf 110

router-id 3.3.3.3

network 13.1.1.0 0.0.0.255 area 2

network 3.3.3.0 0.0.0.255 area 2

router rip

version 2

no auto-summary

network 35.0.0.0

R5

interface s0/1

ip add 35.1.1.5 255.255.255.0

no shut

interface l0

ip add 5.5.5.5 255.255.255.0

no shut

router rip

version 2

no auto-summary

network 35.0.0.0

network 5.0.0.0

看上图,哪个区域可以符合规则作为stub区域呢?

首先区域0不能,再其次就是区域2,因为有ASBR,那么只有area 1了

首先需要将RIP重分布进OSPF

R3

router ospf 110

redistribute rip subnets

这样R4就可以收到5类LSA,从而获得5.5.5.0/24和35.1.1.0/24的路由



R4(config-router)#do show ip ospf database


           OSPF Router with ID (4.4.4.4) (Process ID 110)


               Router Link States (Area 1)


Link ID         ADV Router      Age         Seq#       Checksum Link count

2.2.2.2         2.2.2.2         1657        0x80000002 0x0068E3 2

4.4.4.4         4.4.4.4         1665        0x80000003 0x00C15F 3


               Summary Net Link States (Area 1)


Link ID         ADV Router      Age         Seq#       Checksum

1.1.1.1         2.2.2.2         1593        0x80000001 0x00AB44

2.2.2.2         2.2.2.2         1642        0x80000001 0x00FA31

3.3.3.3         2.2.2.2         1565        0x80000001 0x00D1D5

12.1.1.0        2.2.2.2         1652        0x80000001 0x001CCA

13.1.1.0        2.2.2.2         1608        0x80000001 0x009114


               Summary ASB Link States (Area 1)


Link ID         ADV Router      Age         Seq#       Checksum

3.3.3.3         2.2.2.2         86          0x80000001 0x00B9ED


               Type-5 AS External Link States


Link ID         ADV Router      Age         Seq#       Checksum Tag

5.5.5.0         3.3.3.3         92          0x80000001 0x00D8AC 0

35.1.1.0        3.3.3.3         97          0x80000001 0x00ADC1 0

看到了一类、三类、四类、五类LSA

现在做个stub区域

R4

router ospf 110

area 1 stub

R2

router ospf 110

area 1 stub

现在查看R4上的变化

R4(config-router)#do show ip route ospf

    1.0.0.0/32 is subnetted, 1 subnets

O IA    1.1.1.1 [110/129] via 24.1.1.2, 00:01:00, Serial0/0

    2.0.0.0/32 is subnetted, 1 subnets

O IA    2.2.2.2 [110/65] via 24.1.1.2, 00:01:00, Serial0/0

    3.0.0.0/32 is subnetted, 1 subnets

O IA    3.3.3.3 [110/193] via 24.1.1.2, 00:01:00, Serial0/0

    12.0.0.0/24 is subnetted, 1 subnets

O IA    12.1.1.0 [110/128] via 24.1.1.2, 00:01:00, Serial0/0

    13.0.0.0/24 is subnetted, 1 subnets

O IA    13.1.1.0 [110/192] via 24.1.1.2, 00:01:00, Serial0/0

O*IA 0.0.0.0/0 [110/65] via 24.1.1.2, 00:01:00, Serial0/0

嗯,我们看到E2的两条没有了,也就是5类LSA通告的路由没了,多了一条三类LSA通告的默认路由

R4#show ip ospf database


           OSPF Router with ID (4.4.4.4) (Process ID 110)


               Router Link States (Area 1)


Link ID         ADV Router      Age         Seq#       Checksum Link count

2.2.2.2         2.2.2.2         43          0x80000005 0x0080CA 2

4.4.4.4         4.4.4.4         131         0x80000006 0x00D946 3


               Summary Net Link States (Area 1)


Link ID         ADV Router      Age         Seq#       Checksum

0.0.0.0         2.2.2.2         158         0x80000001 0x0075C0

1.1.1.1         2.2.2.2         43          0x80000003 0x00C52A

2.2.2.2         2.2.2.2         43          0x80000003 0x001517

3.3.3.3         2.2.2.2         43          0x80000003 0x00EBBB

12.1.1.0        2.2.2.2         43          0x80000003 0x0036B0

13.1.1.0        2.2.2.2         43          0x80000003 0x00ABF9

现在OSPF数据库中只有一类和三类LSA了,四类和五类消失了哦,也就是被过滤掉了

红色字体的就是通告的默认路由,通告者就是该区域的ABR R2的RID


总结下:

stub区域会过滤掉4、5类LSA,并会自动下放一条三类LSA通告的默认路由,且seedmetric值是1

O*IA 0.0.0.0/0 [110/65] via 24.1.1.2, 00:06:31, Serial0/0

看到了没有65=64+1(R2通告的默认路由的seed metric值)

那怎么修改默认的seed metric值呢?

R2

router ospf 110

area 1 default-cost 2

R4#show ip route | incl 0.0.0.0

Gateway of last resort is 24.1.1.2 to network 0.0.0.0

O*IA 0.0.0.0/0 [110/66] via 24.1.1.2, 00:01:19, Serial0/0

呵呵,65变成66了

记住一点哦,该STUB区域中的所有路由器必须都配置哦!


2、Totally stub 完全末节区域

  目的:过滤掉3、4、5类LSA,并自动下放一条三类LSA默认路由

注意该命令是用在区域中ABR上的的

R2

router ospf 110

area 1 stub no-summary

R4#show ip ospf database


           OSPF Router with ID (4.4.4.4) (Process ID 110)


               Router Link States (Area 1)


Link ID         ADV Router      Age         Seq#       Checksum Link count

2.2.2.2         2.2.2.2         781         0x80000005 0x0080CA 2

4.4.4.4         4.4.4.4         870         0x80000006 0x00D946 3


               Summary Net Link States (Area 1)


Link ID         ADV Router      Age         Seq#       Checksum

0.0.0.0         2.2.2.2         36          0x80000003 0x007BB7

注意到了吧,三类LSA只有一个默认路由了,其他都被过滤掉了

这是思科的私有功能属性


3、not-so-stubby area NSSA区域

  目的:在stub基础上,打破了stub的规则,区域中可以出现ASBR,过滤掉4、5类LSA

  但在该区域会出现7类LSA(其实就是5类LSA,因在NSSA区域,换了个叫法)

  并且该区域的ABR负责5类到7类的转换作用

  NSSA负责过滤掉远端5类LSA,而近端的5类LSA实现5to7的转换,并传送给其他区域

  并由该区域的ABR手工下放一条默认人路由

实现拓扑有点改动:

bubuko.com,布布扣

配置

R2

router ospf 110

no area 1 stub no-summary

no area 1 stub

R4

router ospf 110

no area 1 stub

redistribute rip subnets

router rip

version 2

no auto-summary

network 100.0.0.0

interface l100

ip add 100.1.1.4 255.255.255.0

no shut

现在选择下在哪个区域做NSSA区域呢?

area 1 和 area 2 都可以,那就area 2

R3(config-router)#do show ip route ospf

    2.0.0.0/32 is subnetted, 1 subnets

O IA    2.2.2.2 [110/129] via 13.1.1.1, 00:00:36, Serial0/1

    4.0.0.0/32 is subnetted, 1 subnets

O IA    4.4.4.4 [110/193] via 13.1.1.1, 00:00:36, Serial0/1

    24.0.0.0/24 is subnetted, 1 subnets

O IA    24.1.1.0 [110/192] via 13.1.1.1, 00:00:36, Serial0/1

    12.0.0.0/24 is subnetted, 1 subnets

O IA    12.1.1.0 [110/128] via 13.1.1.1, 00:00:36, Serial0/1

O*N2 0.0.0.0/0 [110/1] via 13.1.1.1, 00:00:36, Serial0/1

N2就是七类LSA通告的默认路由,去往远端RIP区域的路由

R3#show ip ospf database


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


               Router Link States (Area 2)


Link ID         ADV Router      Age         Seq#       Checksum Link count

1.1.1.1         1.1.1.1         191         0x80000004 0x00E084 2

3.3.3.3         3.3.3.3         194         0x80000005 0x00D26B 3


               Summary Net Link States (Area 2)


Link ID         ADV Router      Age         Seq#       Checksum

2.2.2.2         1.1.1.1         196         0x80000002 0x003FA9

4.4.4.4         1.1.1.1         196         0x80000002 0x00653B

12.1.1.0        1.1.1.1         196         0x80000002 0x00DD06

24.1.1.0        1.1.1.1         196         0x80000002 0x00C3D3


               Type-7 AS External Link States (Area 2)


Link ID         ADV Router      Age         Seq#       Checksum Tag

0.0.0.0         1.1.1.1         196         0x80000001 0x00EEBE 0

5.5.5.0         3.3.3.3         212         0x80000001 0x00DA94 0

35.1.1.0        3.3.3.3         212         0x80000001 0x00AFA9 0

红色字体就是R1通告的7类LSA

蓝色字体就是R3通告的7类LSA,由五类转换而来


OSPF复习2,布布扣,bubuko.com

OSPF复习2

原文:http://867645.blog.51cto.com/857645/1384253

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!