标签:enc int reference broadcast 负载均衡 可变 编号 进入 路由
一、背景介绍IGP协议的学习即将结束,最后通过一个综合实验最为结尾,实验拓扑如下图所示:
每个路由器的route-id与lo0接口ip地址一致,除基础配置外,还需满足如下约束:
OSPF 进程2需求:
1.R4-R5 运行OSPF进程2
2.把OSPF进程2引入进OSPF进程1后要求每一跳metric可变
3.把OSPF进程1引入进OSPF进程2后要求每一跳metric可变
4.要求R4优选R5去往所有网段
5.R4从R5学到的路由条目走2条路径且等价负载均衡
6.RIP-OSPF进程2之间不做重分布
除了基础的配置,在上图中还包含了一个隐藏条件,ospf1的area 2没有与area 0直接相连,这就需要在R2和R3之间建立一条虚链路,建立的配置如下:
[R2]ospf 1
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]vlink-peer 3.3.3.3
[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]vlink-peer 2.2.2.2
ospf的虚链路无法直接通过display ospf peer brief 查看,只能通过虚链路查看
[R3]display ospf vlink
OSPF Process 1 with Router ID 3.3.3.3
Virtual Links
Virtual-link Neighbor-id -> 2.2.2.2, Neighbor-State: Full
Interface: 23.0.0.3 (Serial2/0/1)
Cost: 48 State: P-2-P Type: Virtual
Transit Area: 0.0.0.1
Timers: Hello 10 , Dead 40 , Retransmit 5 , Transmit Delay 1
GR State: Normal
此时的基础配置就以完成,接下来进行约束条件的配置
[R1]rip
[R1-rip-1]version 2
network 14.0.0.0
[R4]rip
[R4-rip-1]version 2
network 14.0.0.0
network 4.0.0.0
network 199.172.0.0
network 199.172.1.0
network 199.172.2.0
network 199.172.3.0
network 199.172.4.0
network 199.172.5.0
[R1]rip 1
[R1-rip-1]filter-policy ip-prefix RIP import
[R1]ip ip-prefix RIP index 10 permit 199.172.0.0 22 greater-equal 24 less-equal 24
[R1]ospf 1 router-id 1.1.1.1
[R1]interface LoopBack 0
[R1-LoopBack0]ospf network-type broadcast
[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher HUAWEI
在配置区域0认证时需要住的是,虽然R3没有之间跟area0连接,但是R2与R3之间建立了虚链路,相当于把area0的范围扩大了,尽管R3上没有配置area0,但是仍要创造一个area0来用于认证
<R3>display current-configuration configuration ospf
[V200R003C00]
#
ospf 1
area 0.0.0.0
authentication-mode md5 1 cipher %$%$kcn17z")3I-,au"KJu*4^8!%%$%$
area 0.0.0.1
network 3.3.3.3 0.0.0.0
network 23.0.0.3 0.0.0.0
vlink-peer 2.2.2.2
area 0.0.0.2
network 35.0.0.3 0.0.0.0
#
return
[R1]rip 1
[R1-rip-1]import-route ospf 1
[R1]ospf 1
[R1-ospf-1]import-route rip 1 route-policy R-2-O
[R1]route-policy R-2-O permit node 10
[R1-route-policy]if-match ip-prefix R-2-O
[R1]ip ip-prefix R-2-O permit ip ip-prefix R-2-O index 10 permit 14.0.0.0 24
[R5]ospf 1
[R5-ospf-1]import-route ospf 2 type 1
[R4]rip 1
[R4-rip-1]preference 151
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ospf cost 48
标签:enc int reference broadcast 负载均衡 可变 编号 进入 路由
原文地址:https://blog.51cto.com/arkling/2504483