OSPF路由汇总
实验说明:
R1有4个环回口
R2作为ABR会对R1环回口的路由进行汇总成3类LSA传递给R3
R3有8条手工静态路由,并且要引入ospf,然后对引入的这些静态汇总
具体配置:
1.配置接口ip和环回口
R1
interface g0/0/0
ip add 10.1.12.1 24
interface loopback 0
ip add 192.168.0.1 24
interface loopback 1
ip add 192.168.1.1 24
interface loopback 2
ip add 192.168.2.1 24
interface loopback 3
ip add 192.168.3.1 24
R2
interface g0/0/0
ip add 10.1.12.2 24
interface g0/0/1
ip add 10.1.23.2 24
R3
interface g0/0/1
ip add 10.1.23.3 24
2.路由器之间运行OSPF并且通告接口
R1
ospf 1 router-id 1.1.1.1
area 1
network 10.1.12.1 0.0.0.0
network 192.168.0.1 0.0.0.0
network 192.168.1.1 0.0.0.0
network 192.168.2.1 0.0.0.0
network 192.168.3.1 0.0.0.0
R2
ospf 1 router-id 2.2.2.2
area 1
network 10.1.12.2 0.0.0.0
area 0
network 10.1.23.2 0.0.0.0
R3
ospf 1 router-id 3.3.3.3
area 0
network 10.1.23.3 0.0.0.0
检查现象:R2-display ospf peer brief
R3-display ip routing-table能看到R1的环回口路由条目
3.R2上对area1的路由做汇总(3类LSA)
R2
ospf 1
area 1
abr-summary 192.168.0.0 255.255.252.0 //对R1的环回口路由汇总
检查现象:R3上只能看见汇总路由
分析:R2是area1和area0之间的abr,把路由汇总成3类LSA发送给R3
4.R3上对重发布进ospf的静态路由做汇总(5类LSA)
(1) 先在R3上配置静态路由
[R3]ip route-static 172.16.0.0 24 null0
[R3]ip route-static 172.16.1.0 24 null0
[R3]ip route-static 172.16.2.0 24 null0
[R3]ip route-static 172.16.3.0 24 null0
[R3]ip route-static 172.16.4.0 24 null0
[R3]ip route-static 172.16.5.0 24 null0
[R3]ip route-static 172.16.6.0 24 null0
[R3]ip route-static 172.16.7.0 24 null0
(2) 将静态重发布进ospf
R3
ospf 1
import-route static
检查现象:R3- display ospf lsdb
(3) R3作为ASBR对外部路由进行汇总
R3
ospf 1
asbr-summary 172.16.0.0 255.255.248.0
检查现象:display ospf lsdb只能看见汇总的5类LSA
——·扫描下方微信二维码,回复“实验手册”。即可领取完整电子版手册或为你答疑解惑。·——
|