
R1配置
[R1]interface Ethernet 0/0/0
[R1-Ethernet0/0/0] ip address 192.168.0.254 255.255.255.0
[R1-Ethernet0/0/0] q
[R1] interface Ethernet 0/0/1
[R1-Ethernet0/0/1] ip address 192.168.1.1 255.255.255.0
[R1-Ethernet0/0/1] q
[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.0.0 255.255.255.0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 255.255.255.0
R2配置
[R2] interface Ethernet 0/0/0
[R2-Ethernet0/0/0] ip address 192.168.2.200 255.255.255.0
[R2-Ethernet0/0/0]q
[R2]interface Ethernet 0/0/1
[R2-Ethernet0/0/1]ip address 192.168.0.2 255.255.255.0
[R2-Ethernet0/0/1]q
[R2] ospf 1
[R2-ospf-1] area 0
[R2-ospf-1-area-0.0.0.0] network 192.168.2.0 255.255.255.0
[R2-ospf-1-area-0.0.0.0] network 192.168.1.0 255.255.255.0
测试



网友评论