思科ospf實驗-適合初學者
阿新 • • 發佈:2018-01-28
3.3 ping通 實驗 mark 驗證 接口 fff roc ping
conf t
int f0/0
ip ospf priority 2 /改接口的優先級用來改變DR或者BDR
exit
clear ip ospf process? yes /改完接口的優先級必須要清理ospf的進程 必須要做的
R1
conf t
int lo 0 /router ID,環回接口
ip add 1.1.1.1 255.255.255.255
exit
int f0/1
ip add 172.16.20.1 255.255.255.0
exit
router ospf 100
network 1.1.1.1 0.0.0.0 area 0 /router ID,反掩碼,區域
network 172.16.20.1 0.0.0.0 area 0
end
write
R2
conf t
int lo 0
ip add 2.2.2.2 255.255.255.255
exit
int f0/0
ip add 172.16.20.2 255.255.255.0
exit
int f0/1
ip add 172.16.30.1 255.255.255.0
exit
router ospf 100
network 2.2.2.2 0.0.0.0 areao
network 172.16.20.2 0.0.0.0 area 0
network 172.16.30.1 0.0.0.0 area 1
end
write
R3
conf t
int lo 0
ip add 3.3.3.3 255.255.255.255
exit
int f0/0
ip add 172.16.30.2
exit
router ospf 101
network 3.3.3.3 0.0.0.0 area 1
network 172.16.30.2 0.0.0.0 area 1
end
write
驗證:R1 ping通3.3.3.3,也可以ping通172.16.30.2
conf t
int f0/0
ip ospf priority 2 /改接口的優先級用來改變DR或者BDR
exit
clear ip ospf process? yes /改完接口的優先級必須要清理ospf的進程 必須要做的
R1
conf t
int lo 0 /router ID,環回接口
ip add 1.1.1.1 255.255.255.255
exit
int f0/1
ip add 172.16.20.1 255.255.255.0
exit
router ospf 100
network 1.1.1.1 0.0.0.0 area 0 /router ID,反掩碼,區域
network 172.16.20.1 0.0.0.0 area 0
write
R2
conf t
int lo 0
ip add 2.2.2.2 255.255.255.255
exit
int f0/0
ip add 172.16.20.2 255.255.255.0
exit
int f0/1
ip add 172.16.30.1 255.255.255.0
exit
router ospf 100
network 2.2.2.2 0.0.0.0 areao
network 172.16.20.2 0.0.0.0 area 0
network 172.16.30.1 0.0.0.0 area 1
end
write
R3
conf t
int lo 0
ip add 3.3.3.3 255.255.255.255
exit
int f0/0
ip add 172.16.30.2
router ospf 101
network 3.3.3.3 0.0.0.0 area 1
network 172.16.30.2 0.0.0.0 area 1
end
write
驗證:R1 ping通3.3.3.3,也可以ping通172.16.30.2
思科ospf實驗-適合初學者