路由策略实验

实验拓扑

路由策略实验_第1张图片

首先,配置IP

R1

[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip ad	
[r1-GigabitEthernet0/0/0]ip address 192.168.12.1 24
[r1-GigabitEthernet0/0/0]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip ad	
[r1-GigabitEthernet0/0/1]ip address 192.168.13.1 24
[r1]int l 0
[r1-LoopBack0]ip a	
[r1-LoopBack0]ip address 1.1.1.1 24

 R2

[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip ad	
[r2-GigabitEthernet0/0/0]ip address 192.168.12.2 24
[r2-GigabitEthernet0/0/0]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip ad	
[r2-GigabitEthernet0/0/1]ip address 192.168.24.2 24

R3

[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip ad	
[r3-GigabitEthernet0/0/0]ip address 192.168.13.3 24
[r3-GigabitEthernet0/0/0]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip ad	
[r3-GigabitEthernet0/0/1]ip address 192.168.34.3 24

R4

[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip ad	
[r4-GigabitEthernet0/0/0]ip address 192.168.24.4 24
[r4-GigabitEthernet0/0/0]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip ad	
[r4-GigabitEthernet0/0/1]ip address 192.168.34.4 24

然后,配置RIP和OSPF

拒绝192.168.12.1和192.168.13.1 ,只能允许1.1.1.1进入

在R1上配置路由策略,在R2和R3上进行重发布

路由策略实验_第2张图片

路由表 

路由策略实验_第3张图片

路由策略实验_第4张图片

路由策略实验_第5张图片

你可能感兴趣的:(网络)