实验要求:配置OSPF
拓扑如下:
配置如下:
R1
enable
configure terminal
interface l0
ip address 192.168.10.1 255.255.255.0
interface g0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
route ospf 1
network 192.168.10.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
R2
enable
configure terminal
interface l0
ip address 192.168.20.1 255.255.255.0
interface g0/0
ip address 192.168.1.2 255.255.255.0
no shutdown
exit
route ospf 1
network 192.168.20.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
R3
enable
configure terminal
interface l0
ip address 192.168.30.1 255.255.255.0
interface g0/0
ip address 192.168.1.3 255.255.255.0
no shutdown
exit
route ospf 1
network 192.168.30.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
R4
enable
configure terminal
interface l0
ip address 192.168.40.1 255.255.255.0
interface g0/0
ip address 192.168.1.4 255.255.255.0
no shutdown
exit
route ospf 1
network 192.168.40.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0