一、实验拓扑
二、实验要求
1、按照图示配置 IP 地址,R1,R3,R4 上使用 oopback 口模拟业务网段,
2、R2,R3 和 R4 运行 OSPF,各自协议内部互通2R1和R2运丁RIPv2
3、在 RIP 和 OSPF 间配黑双向路由引入,要求除 R4 上的业务网段以外,其他业务网段路由都引入到对方协议内部
4、使用路由过滤,使 R4 无法学习到 R1 的业务网段路由,要求使用 prefix-list 进行匹配
5、OSPF 区域中不能出现 RIP 协议报文
三、实验步骤
1、IP配置
R1
bash
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 100.1.1.1 24
[R1-GigabitEthernet0/0/0]int l0
[R1-LoopBack0]ip add 192.168.0.1 32
[R1-LoopBack0]int l1
[R1-LoopBack1]ip ad 192.168.1.1 32
R2
bash
[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 100.1.1.2 24
[R2-GigabitEthernet0/0/0]int g 0/0/1
[R2-GigabitEthernet0/0/1]ip add 100.2.2.2 24
R3
bash
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 100.2.2.3 24
[R3-GigabitEthernet0/0/0]int g 0/0/1
[R3-GigabitEthernet0/0/1]ip add 100.3.3.3 24
[R3-GigabitEthernet0/0/1]int l0
[R3-LoopBack0]ip add 192.168.2.1 32
[R3-LoopBack0]int l1
[R3-LoopBack1]ip add 192.168.3.1 32
R4
bash
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 100.3.3.4 24
[R4-GigabitEthernet0/0/0]int l0
[R4-LoopBack0]ip add 192.168.4.1 32
[R4-LoopBack0]int l1
[R4-LoopBack1]ip add 192.168.5.1 32
2、配置动态路由协议
(1)rip
R1
bash
[R1]rip 1
[R1-rip-1]v 2
[R1-rip-1]undo summary
[R1-rip-1]net 100.0.0.0
[R1-rip-1]net 192.168.0.0
[R1-rip-1]net 192.168.1.0
R2
bash
[R2]rip 1
[R2-rip-1]v 2
[R2-rip-1]undo summary
[R2-rip-1]net 100.0.0.0
(2)ospf
R2
bash
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]a 0
[R2-ospf-1-area-0.0.0.0]net 100.2.2.0 0.0.0.255
R3
bash
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]a 0
[R3-ospf-1-area-0.0.0.0]net 100.2.2.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]net 192.168.2.0 0.0.1.255
[R3-ospf-1-area-0.0.0.0]q
[R3-ospf-1]a 1
[R3-ospf-1-area-0.0.0.1]net 100.3.3.0 0.0.0.255
R4
bash
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]a 1
[R4-ospf-1-area-0.0.0.1]net 100.3.3.0 0.0.0.255
[R4-ospf-1-area-0.0.0.1]net 192.168.4.0 0.0.1.255
3、查看建邻情况
R2
R3
R4
4、双向重发布
bash
[R2]rip 1
[R2-rip-1]import-route ospf
[R2-rip-1]q
[R2]ospf 1
[R2-ospf-1]import-route rip
5、查看路由表
R1
R2
rip
ospf
R3
R4
6、路由过滤
bash
[R2]acl 2000
[R2-acl-basic-2000]rule permit source 192.168.4.0 0.0.1.255
[R2-acl-basic-2000]q
[R2]route-policy a deny node 1
[R2-route-policy]if-match acl 2000
[R2-route-policy]q
[R2]route-policy a permit node 2
[R2-route-policy]q
[R2]rip 1
[R2-rip-1]import-route ospf route-policy a
7、R4无法学习R1的环回
bash
[R4]ip ip-prefix q index 10 deny 192.168.0.0 23 less-equal 32
[R4]ip ip-prefix q index 20 permit 0.0.0.0 0 less-equal 32
[R4]ospf 1
[R4-ospf-1]filter-policy ip-prefix q import
8、配置静默接口
bash
[R2]rip 1
[R2-rip-1]silent-interface g0/0/1