ouiytre 发表于 2017-3-23 15:19:02

思科路由器OSPF配置实例

模拟软件:GNS3
拓扑图:

PC1> ip:192.168.1.2
   mask: 255.255.255.0
   gateway: 192.168.1.1
PC2> ip:192.168.2.2
   mask:255.255.255.0
   gateway:192.168.2.1
R1> f0/0 ip:192.168.1.1/24
    f0/1 ip:192.168.3.1/24
R2> f0/0 ip:192.168.3.2/24
    f0/1 ip:192.168.2.1/24

配置如下:
PC1:
pc1>ip 192.168.1.2 255.255.255.0 192.168.1.1

PC2:
pc2>ip 192.168.2.2 255.255.255.0 192.168.2.1

R1:
R1>en
R1#conf t
R1(config)#int f0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shut
R1(config)#exit
R1(config)#int f0/1
R1(config-if)#ip add 192.168.3.1 255.255.255.0
R1(config-if)#no shut
R1(config)#exit
R1(config)#router ospf 100
R1(config-router)#net 192.168.1.0 0.0.0.255 area 1
R1(config-router)#net 192.168.3.0 0.0.0.255 area 1
R1(config-router)#exit

R2:
R2>en
R2#conf t
R2(config)#int f0/0
R2(config-if)#ip add 192.168.3.2 255.255.255.0
R2(config-if)#no shut
R2(config)#exit
R2(config-if)#int f0/1
R2(config-if)#ip add 192.168.2.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#router ospf 100
R2(config-router)#net 192.168.3.0 0.0.0.255 area 1
R2(config-router)#net 192.168.2.0 0.0.0.255 area 1
R2(config-router)#exit

以上PC1 ping通 PC2 就可以了。

hynmxq 发表于 2017-3-25 11:16:40

6666谢谢技术大神

夏东海他大爷 发表于 2017-4-21 12:01:25

学习了
页: [1]
查看完整版本: 思科路由器OSPF配置实例