实验括扑图
实验要求
1、按照图示配置IP地址,R1,R3,R4上使用loopback口模拟业务网段
2、R1和R2运行RIPv2,R2,R3和R4运行ospf,各自协议内部互通
3、在RIP和OSPF间配置双向路由引入,要求除R4上的业务网段以外,其他业务网段路由都引入到对方协议内部
4、使用路由过滤,使R4无法学习到R1的业务网段路由,要求使用prefix-list进行匹配协议报文
5、OSPF区域中不能出现RIP协议报文
实验思路
- 首先对拓扑图中所有的设备配置ip地址
- 在与R1、R2起RIP协议,R2、R3、R4起OSPF协议
- 在R2设备上面进行双向路由引入,但是对于R4上面的环回网段要进行路由过滤操作
- 在R4上面使用地址前缀列表进行匹配使其R4无法学习R1的环回网段
- 在R2的上面做静默接口操作
实验步骤
1、配置IP地址
R1
[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 add 192.168.1.1 32
R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 100.1.1.2 24
Apr 23 2024 19:28:32-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 100.2.2.2 24
Apr 23 2024 19:28:47-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 100.2.2.3 24
Apr 23 2024 19:29:06-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 100.3.3.3 24
Apr 23 2024 19:29:20-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[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
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 100.3.3.4 24
Apr 23 2024 19:30:06-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[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、在与R1、R2起RIP协议,R2、R3、R4起OSPF协议
RIP
[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]rip 1
[R2-rip-1]v 2
[R2-rip-1]undo summary
[R2-rip-1]net 100.0.0.0
OSPF
[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]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.0.255
[R3-ospf-1-area-0.0.0.0]net 192.168.3.0 0.0.0.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]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.0.255
[R4-ospf-1-area-0.0.0.1]net 192.168.5.0 0.0.0.255
3、在R2设备上面进行双向路由引入
[R2]ospf 1
[R2-ospf-1]import-route rip
[R2-ospf-1]q
[R2]rip 1
[R2-rip-1]import-route ospf
4、除R4上的业务网段以外,其他业务网段路由都引入到对方协议内部的操作:
[R2]acl 2000
[R2-acl-basic-2000]rule deny source 192.168.4.0 0.0.1.255
[R2-acl-basic-2000]rule permit source 0.0.0.0 255.255.255.255
[R2-acl-basic-2000]q
[R2]route-policy aa permit node 10
Info: New Sequence of this List.
[R2-route-policy]if-match acl 2000
[R2-route-policy]q
[R2]rip 1
[R2-rip-1]import-route ospf 1 route-policy aa
5、路由过滤,使R4无法学习到R1 的业务网段路由,要求使用prefix-list进行匹配
[R4]ip ip-prefix aa index 10 deny 192.168.0.0 23 less-equal 32
[R4]ip ip-prefix aa index 20 permit 0.0.0.0 0 less-equal 32
[R4]ospf 1
[R4-ospf-1]filter-policy ip-prefix aa import
6、配置静默接口
[R2]rip 1
[R2-rip-1]silent-interface g0/0/1