ospf特殊区域

减少lsa的泛红

过滤掉4/5类lsa

自动产生一条默认路由

stub(末节区域)

1.如果在区域边界有多个abr有可能会出现选路的问题,控制cost值

2.如果把某个区域配置成stub所有路由器都需要配置

3.如果配置成stub区域在这个区域是不能出现asbr的

4.不能把area 0配置成stub区域

5.作为stub区域不能再挂区域

实验:

r4:

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:

router ospf 110

router-id 2.2.2.2

network 24.1.1.0 0.0.0.255 area 1

net 12.1.1.0 0.0.0.255 area 0

net 2.2.2.0 0.0.0.255 area 0

r1:

router ospf 110

router-id 1.1.1.1

network 12.1.1.0 0.0.0.255 area 0

net 13.1.1.0 0.0.0.255 area 2

net 1.1.1.0 0.0.0.255 area 0

r3:

router ospf 110

router-id 3.3.3.3

net 13.1.1.0 0.0.0.255 area 2

net 3.3.3.0 0.0.0.255 area 2

router rip

v 2

no au

net 35.0.0.0

r5:

router rip

v 2

no au

net 35.0.0.0

net 5.0.0.0

r3:

router ospf 110

redistribute rip subnets

r4:

router ospf 110

area 1 stub

r2:

router ospf 110

area 1 stub

            作用                    是否下放默认路由

stub    过滤lsa4/5           是(lsa3) seed cost=1

这个区域所有路由必须配置成stubroutera(config-router)#

area area-id default-cost cost 控制下放默认路由cost值,内部选路有多个abr情况下.

r2:

area 1 defalut-cost 5(专门用在特殊区域做在abr上)totally stubby area(完全末梢区域)

过滤3 4/5类lsa

r2:

area 1 stub no-summary(只需要敲在abr上)

在区域内只需要敲area 1 stub

 

                                   作用                    是否下放默认路由

totally stub        过滤3/4/5类lsa           是(lsa3)seed cost=1

r2:

router ospf 10

net 172.17.0.0 0.0.255.255 area 0

net 172.16.0.0 0.0.255.255 area 1

area 1 stub no-summary

area 1 default-cost 5

r3:

router ospf 10

net 172.16.0.0 0.0.255.255 area 1

area 1 stub

r4:

router ospf 10

net 172.17.0.0 0.0.255.255 area 0

net 172.16.0.0 0.0.255.255 area 1

area 1 stub no-summary

area 1 default-cost 10

nssa(非完全末梢区域)

可以出现asbr 过滤4/5类lsa,增加了7类lsa

过滤远端的重发布路由

实验:

r4:

int lo44

ip add 44.4.4.4 255.255.255.0

router eigrp 90

no auto-summary

net 44.4.4.0 0.0.0.255

router ospf 110

red eigrp 90 subnets

r1:

router ospf 110

area 2 nssa

r3:

area 2 nssa

r1:

area 2 nssa default-information-originate

o*n2 7类lsa路由标识

7类属于某个区域

只要能产生5类lsa的就是asbr,比如在abr上把7类lsa转成5类lsa.

                       作用                    是否下放默认路由

nssa           过滤lsa4/5                否(defu:lsa7)cost=1

totally nssa

r1:

area 2 nssa no-summary

r3:

area 2 nssa

过滤掉3类lsa同时产生3类的默认路由

                        作用                      是否下放默认路由

totally nasa  过滤3/4/5             是(no-su:lsa3)cost=1

实验:

r1:

int lo100

ip address 100.1.1.1 255.255.255.0

router rip

v 2

no au

net 100.1.1.0

router ospf 110

redistribute rip subnets

r1:

router ospf 110

area 2 nssa no-redistributeion(nssa的abr路由器也有重发布进来的路由进行过滤)  no-summary

virtual links虚链路

不规则区域

1.远离area0区域

2.分割的区域

解决不规则区域:

1.ospf多进程双向重发布。

实验:

r3:

router ospf 100

router-id 3.3.3.33(多个进程route-id不一样)

net 35.1.1.0 0.0.0.255 area 3

r5:

router ospf 110

net 35.1.1.0 0.0.0.255 area 3

net 3.3.3.0 0.0.0.255 area 3

r3:

router ospf 110

redistribute ospf 100 subnets

router ospf 100

redistribute ospf 110 subnets

ospf多进程双向重发布

2.tunnel(打隧道)

r1:

interface tunnel 1

tunnel source 13.1.1.1

tunnel destination 13.1.1.3

ip add 172.16.1.1 255.255.255.0

router ospf 110

net 172.161.0 0.0.0.255 area 0

r3:

int tunnel 3

tunnel source 13.1.1.3

tunnel des 13.1.1.1

ip add 172.16.1.3 255.255.255.0

router ospf 110

net 172.168.1.0 0.0.0.255 area 0

3.virtual links

实验:

r1:

router ospf 110

area 2 virtual-link 3.3.3.3

r3:

router ospf 110

area 2 virtual-link 1.1.1.1

show ip ospf virtual-link

ospf 认证

1.名文认证

2.md5认证

                                         密钥                声明

链路认证                            接口                接口

区域认证                            接口                进程

虚链路认证                         进程                进程

链路认证:

明文:

r4:

int s1

ip ospf authentication-key cisco (起个密钥)

ip ospf authentication(声明认证)

md5:

int s1

ip ospf message-digest-key 1 md5 cisco

ip ospf authentication message-digest

区域认证:

明文:

int s1

ip ospf authentication-key cisco

router ospf 110

area 1 authentication

md5:

int s1

ip ospf message-digest-key 1 md5 cisco

router ospf 110

area 1 authentication message-digest

虚链路认证

明文:

area 2 virtual-link 3.3.3.3 authentication-key cisco

area 2 virtual-link 3.3.3.3 authentication

md5:

area 2 virtual-link 3.3.3.3 message-digest-key 1 md5 cisco

area 2 virtual-link 3.3.3.3 authentication message-digest

area 0做了区域认证如果有虚链路,必须在虚链路内的路由进行声明area 0做认证

1.负载均衡:4(default)6(max)

router ospf 110

maximum-paths <1-6>设置负载均衡线路数目

2.被动接口:一般应用在换回口,不收发ospf报文。

router ospf 110

passive-interface lo0

ospf的network包括hello包和通告路由,ospf被动接口只是把hello包抑制掉了。