ENSP配置 实例六 OSPF配置
R1
[R1]interface e0/0/0
[R1-Ethernet0/0/0]ip add 192.168.1.254 24
[R1-Ethernet0/0/0]int e0/0/1
[R1-Ethernet0/0/1]ip add 10.0.12.1 24
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255##宣告自然网段,掩码改成0.0.0.255不行
R2
[R2]interface e0/0/1
[R2-Ethernet0/0/1]ip add 192.168.1.254 24
[R2-Ethernet0/0/1]interface e0/0/0
[R2-Ethernet0/0/0]ip add 10.0.12.1 24
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255