R1
syst
sysn R1
int g0/0/1
ip add 100.100.100.2 24
int s0/0/1
ip add 10.0.12.1 24
int g0/0/0
ip add 10.0.1.1 24
int loopback0
ip add 1.1.1.1 32
R2
syst
sysn R2
int g0/0/2
ip add 10.0.23.2 24
int s0/0/2
ip add 10.0.12.2 24
int g0/0/0
ip add 10.0.2.2 24
int loopback0
ip add 2.2.2.2 32
R3
syst
sysn R3
int g0/0/3
ip add 10.0.23.3 24
int g0/0/0
ip add 10.0.3.3 24
int g0/0/1
ip add 10.0.34.3 24
int loopback0
ip add 3.3.3.3 32
R4
syst
sysn R4
int g0/0/1
ip add 10.0.34.4 24
int g0/0/0
ip add 10.0.4.4 24
int loopback0
ip add 4.4.4.4 32
R1
ospf
area 1
network 10.0.0.0 0.255.255.255
quit
#默认路由
sys
ip route-s 0.0.0.0 0.0.0.0 100.100.100.1
ospf 1
default-route-adv
R1,R2,R3,R4
dis ip rout
dis ip rout pro ospf
R2
ospf
area 0
network 10.0.23.0 0.0.0.255
area 1
network 10.0.12.0 0.0.0.255
area 2
network 10.0.2.0 0.0.0.255
quit
R3
ospf
area 0
network 10.0.23.0 0.0.0.255
area 3
network 10.0.3.0 0.0.0.255
area 4
network 10.0.34.0 0.0.0.255
quit
R4
ospf
area 4
network 10.0.0.0 0.255.255.255
quit
查看相关ospf配置
display ip routing-table protocol ospf
display ospf brief
display ospf peer brief
display ospf lsdb
OSPF度量:(dis ospf int 接口号)
Cost=参考带宽/实际带宽
默认参考带宽=100M,即Cost=100M/实际带宽,结果小于1时,Cost取1。Cost范围1—65535。
R4
dis ospf int g0/0/0
sys
ospf 1
band 10000
dis ospf int g0/0/0
R4
sys
int g0/0/2
ip add 192.168.10.1 24
ospf 1
area 0
net 192.168.10.1 0.0.0.0
R1,R3,R2
dis ip rout pro ospf
R3
return
dis ospf int
sys
ospf 1
area 4
vlink-peer 10.0.34.4
R4
return
dis ospf int
sys
ospf 1
area 4
vlink-peer 10.0.23.3
R1,R3,R2
dis ip rout pro ospf
1.R4
sys
int loop1
ip add 172.16.8.1 255.255.255.0
ospf net bro
int loop2
ip add 172.16.9.1 255.255.255.0
ospf net bro
int loop3
ip add 172.16.10.1 255.255.255.0
ospf net bro
int loop4
ip add 172.16.11.1 255.255.255.0
ospf net bro
ospf 1
area 4
net 172.16.0.0 0.0.255.255
R1
dis ip rout pro ospf
R3
ospf 1
area 4
abr-summary 172.16.8.0 255.255.252.0
R1
dis ip rout pro ospf
2.R1
sys
int loop1
ip add 123.16.8.1 255.255.255.0
int loop2
ip add 123.16.9.1 255.255.255.0
int loop3
ip add 123.16.10.1 255.255.255.0
int loop4
ip add 123.16.11.1 255.255.255.0
ospf 2
area 0
net 123.16.0.0 0.0.255.255
ospf 1
import-route ospf 2
R4,R3.R2
dis ip rout pro ospf
R1
ospf 1
asbr-summary 123.16.8.0 255.255.252.0
R4,R3.R2
dis ip rout pro ospf
R4
return
u t m
dis ospf lsdb
sys
int g0/0/0
shundo sh
ospf cost 123
undo ospf cost
dis ospf lsdb
R3,R4
两种加密方式
sys
int g0/0/1
ospf authen si 12345
returnsys
int g0/0/1
ospf authen md5 1 12345
return
dis ospf peer
前面的实验你已经完成,后面的实验需要新开拓扑
R1
return
sys
int loop11
ip add 123.1.1.1 24
ospf 2
area 0
net 123.1.1.1 0.0.0.0
ospf 1
import-route ospf 2
R2.R3,R4
dis ip rout pro ospf
R1
sys
ospf 1
import-route ospf 2
R2.R3,R4
dis ip rout pro ospf
R1
sys
ospf 1
import-route ospf 2 type 1
R2.R3,R4
dis ip rout pro ospf
Stub Area
R4
dis ip rout pro ospf
R3,R4
sys
ospf 1
area 4
stub
R3
sys
ospf 1
area 4
undo vlink-peer 10.0.34.4
stub
R4
sys
ospf 1
area 4
undo vlink-peer 10.0.23.3
stub
dis ip rout pro ospf
Totally Stub Area
R3
sys
ospf 1
area 4
stub no-summary
R4
sys
ospf 1
area 4
stub
dis ip rout pro ospf
R3
sys
int loop33
ip add 10.3.3.3 24
ospf net bro
ospf 1
area 4
net 10.3.3.3 0.0.0.0
R4
dis ip rout pro ospf
NSSA
R1
sys
int loop11
ip add 10.11.11.11 24
ospf 2
area 0
net 10.11.11.11 0.0.0.0
ospf 1
import-route ospf 2
R1,R2
sys
ospf 1
area 1
nssa
R2,R3
dis ospf lsdb
dis ip rout pro ospf
NSSA-Default-Router
R1
sys
ospf 1
area 1
nssa default-route-adv
R2
sys
ospf 1
area 1
nssa
R2,R3
dis ospf lsdb
dis ip rout pro ospf