实验名称:作OSPF的AD值修改选择路径
实验拓扑
实验步骤:
配置IP地址
R1:
enable
conf t
int f 0/0
no shu
ip add 192.168.12.1 255.255.255.0
exit
int l 0
ip add 10.10.1.1 255.255.255.0
exit
R2:
enable
conf t
int f0/1
no shu
ip add 192.168.12.2 255.255.255.0
exit
int l 0
ip add 10.10.2.2 255.255.255.0
exit
int f0/0
no shu
ip add 192.168.23.2 255.255.255.0
exit
R3:
enable
conf t
int f0/1
no shu
ip add 192.168.23.3 255.255.255.0
exit
int l 0
ip add 10.10.3.3 255.255.255.0
exit
int f0/0
no shu
ip add 192.168.34.3 255.255.0
exit
R4:
enable
conf t
int f0/1
no shu
ip add 192.168.34.4 255.255.255.0
exit
int l 0
ip add 10.10.4.4 255.255.255.0
exit
配置ospf
R1:
router os 1
router-id 1.1.1.1
net 192.168.12.0 0.0.0.255 ar 12
net 10.10.1.0 0.0.0.255 ar 12
exit
R2:
router os 1
router-id 2.2.2.2
net 192.168.12.0 0.0.0.255 ar 12
net 192.168.23.0 0.0.0.255 ar 0
net 10.10.2.0 0.0.0.255 ar 0
exit
R3:
router os 1
router-id 3.3.3.3
net 192.168.23.0 0.0.0.255 ar 0
net 10.10.3.0 0.0.0.255 ar 0
net 192.168.34.0 0.0.0.255 ar 0
exit
R4:
router os 1
router-id 4.4.4.4
net 192.168.34.0 0.0.0.255 ar 0
net 10.10.4.0 0.0.0.255 ar 0
exit
配置路由AD值属性,在R2与R4上建66.1.1.1 修改R4的AD为100,让
路由往R4走
在R2与R4上添加66.1.1.1
R2:
int l 66
ip add 66.1.1.1 255.255.255.0
exit
router os 1
router-id 2.2.2.2
net 66.1.1.1 0.0.0.0 ar 0
exit
R4:
int l 66
ip add 66.1.1.1 255.255.255.0
exit
router os 1
router-id 4.4.4.4
net 66.1.1.1 0.0.0.0 ar 0
exit
思路:在R3上做ACL允许 ,修改AD值
R3:
ip access-list standard 66
10 permit 66.1.1.1
exit
router os 1
distance 100 4.4.4.4 0.0.0.0 66
exit
clear ip os process
y
show ip route os
show ip os database s
本文转自 linuxpp 51CTO博客,原文链接:http://blog.51cto.com/13505118/2052705,如需转载请自行联系原作者