<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Ospf单区的配置
R1
|
R2
|
R3
|
E0/0
|
E0/1
|
E0/1
|
E0/2
|
E0/2
|
E0/0
|
E0/0
:
192.168.1.1
E0/1
:
192.168.2.1
Loop0
:<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />
1.1.1
.1
|
E0/1
:
192.168.2.2
E0/2
:
192.168.3.1
Loop0
:
2.2.2
.2
|
E0/2
:
192.168.3.2
E0/0
:
192.168.4.1
Loop0
:
3.3.3
.3
|
R1> en
R1# config t
R1(config)# int e0/0
R1(config-if)# ip add 192.168.1.1 255.255.255.0
R1(config-if)# no shut
R1(config-if)# int e0/1
R1(config-if)# ip add 192.168.2.1 255.255.255.0
R1(config-if)# no shut
R1(config-if)# int loop 0
R1(config-if)# ip add 1.1.1.1 255.255.255.0
R1(config-if)# no shut
R1(config-if)# exit
R1(config)# router ospf 10
R1(config-router)# net 192.168.1.0 0.0.0.255 a 10
R1(config-router)# net 192.168.2.0 0.0.0.255 a 10
R1(config-router)# net 1.1.1.1 0.0.0.255 a 10
R1(config-router)#end
R1
R2> en
R2# config t
R2(config)# int e0/1
R2(config-if)# ip add 192.168.2.2 255.255.255.0
R2(config-if)# no shut
R2(config-if)# int e0/2
R2(config-if)# ip add 192.168.3.1 255.255.255.0
R2(config-if)# no shut
R2(config-if)# int loop 0
R2(config-if)# ip add 2.2.2.2 255.255.255.0
R2(config-if)# no shut
R2(config-if)# exit
R2(config)# router ospf 10
R2(config-router)# net 192.168.2.0 0.0.0.255 a 10
R2(config-router)# net 192.168.3.0 0.0.0.255 a 10
R2(config-router)# net 2.2.2.2 0.0.0.255 a 10
R2(config-router)#end
R2#
R3> en
R3# config t
R3(config)# int e0/2
R3(config-if)# ip add 192.168.3.2 255.255.255.0
R3(config-if)# no shut
R3(config-if)# int e0/0
R3(config-if)# ip add 192.168.4.1 255.255.255.0
R3(config-if)# no shut
R3(config-if)# int loop 0
R3(config-if)# ip add 3.3.3.3 255.255.255.0
R3(config-if)# no shut
R3(config-if)# exit
R3(config)# router ospf 10
R3(config-router)# net 192.168.3.0 0.0.0.255 a 10
R3(config-router)# net 192.168.4.0 0.0.0.255 a 10
R3(config-router)# net 3.3.3.3 0.0.0.255 a 10
R3(config-router)#end
R3
转载于:https://blog.51cto.com/xiangruyimo/331891