拓扑图
1.配置IP地址,R1、R3、R4上使用loopback口模拟业务网段
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 100.1.1.1 24
[AR1-GigabitEthernet0/0/0]int l0
[AR1-LoopBack0]ip add 192.168.0.1 32
[AR1-LoopBack0]int l1
[AR1-LoopBack1]ip add 192.168.1.1 32
[AR1-LoopBack1]
[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ip add 100.1.1.2 24
[AR2-GigabitEthernet0/0/0]int g0/0/1
[AR2-GigabitEthernet0/0/1]ip add 100.2.2.2 24
[AR3]int g0/0/0
[AR3-GigabitEthernet0/0/0]ip add 100.2.2.3 24
[AR3-GigabitEthernet0/0/0]int g0/0/1
[AR3-GigabitEthernet0/0/1]ip add 100.3.3.3 24
[AR3-GigabitEthernet0/0/1]int l0
[AR3-LoopBack0]ip add 192.168.2.1 32
[AR3-LoopBack0]int l1
[AR3-LoopBack1]ip add 192.168.3.1 32
[AR3-LoopBack1]
[AR4]int g0/0/0
[AR4-GigabitEthernet0/0/0]ip add 100.3.3.4 24
[AR4-GigabitEthernet0/0/0]int l0
[AR4-LoopBack0]ip add 192.168.4.1 32
[AR4-LoopBack0]int l1
[AR4-LoopBack1]ip add 192.168.5.1 32
[AR4-LoopBack1]
2.R1和R2运行RIPv2,R2,R3和R4运行OSPF,各自协议互通
[AR1]rip 1
[AR1-rip-1]ver 2
[AR1-rip-1]undo sum
[AR1-rip-1]net 100.0.0.0
[AR1-rip-1]net 192.168.0.0
[AR1-rip-1]net 192.168.1.0
[AR1-rip-1]
[AR2]rip 1
[AR2-rip-1]ver 2
[AR2-rip-1]undo sum
[AR2-rip-1]net 100.0.0.0
[AR2-rip-1]q
[AR2]ospf 1 rou 2.2.2.2
[AR2-ospf-1]a 0
[AR2-ospf-1-area-0.0.0.0]net 100.2.2.0 0.0.0.255
[AR2-ospf-1-area-0.0.0.0]
[AR3]ospf 1 rou 3.3.3.3
[AR3-ospf-1]a 0
[AR3-ospf-1-area-0.0.0.0]net 100.2.2.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]net 192.168.2.1 0.0.0.0
[AR3-ospf-1-area-0.0.0.0]net 192.168.3.1 0.0.0.0
[AR3-ospf-1]a 1
[AR3-ospf-1-area-0.0.0.1]net 100.3.3.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.1]
[AR4]ospf 1 rou 4.4.4.4
[AR4-ospf-1]a 1
[AR4-ospf-1-area-0.0.0.1]net 100.3.3.0 0.0.0.255
[AR4-ospf-1-area-0.0.0.1]net 192.168.4.1 0.0.0.0
[AR4-ospf-1-area-0.0.0.1]net 192.168.5.1 0.0.0.0
[AR4-ospf-1-area-0.0.0.1]
3.在RIP和OSPF间配置双向路由引入,要求除R4上的业务网段以外,其他业务网段路由都引入对方协议网段
[AR2]ospf 1
[AR2-ospf-1]impo rip 1
[AR2-ospf-1]q
[AR2]rip 1
[AR2-rip-1]impo ospf 1
[AR2-rip-1]
[AR2]acl 2000
[AR2-acl-basic-2000]ru de sou 192.168.4.0 0.0.1.255
[AR2-acl-basic-2000]ru per sou 0.0.0.0 255.255.255.255
[AR2-acl-basic-2000]q
[AR2]rou
[AR2]route-policy bb per no 10
Info: New Sequence of this List.
[AR2-route-policy]if-m acl 2000
[AR2-route-policy]q
[AR2]rip 1
[AR2-rip-1]im ospf 1 rou bb
[AR2-rip-1]
4.使用路由过滤,使R4无法学习到R1的业务网段路由,要求使用prefix-list进行匹配
拒绝策略
[AR4]ip ip-p aa in 10 de 192.168.0.0 23 less 32
允许规则
[AR4]ip ip-p aa in 20 per 0.0.0.0 0 less 32
应用规则
[AR4]ospf 1
[AR4-ospf-1]fil ip-p aa im
5.OSPF区域中不能出现RIP协议报文
[AR2]rip 1
[AR2-rip-1]sil g0/0/0
[AR2-rip-1]