码迷,mamicode.com
首页 > 系统相关 > 详细

cisco ospf

时间:2017-05-21 16:57:28      阅读:257      评论:0      收藏:0      [点我收藏+]

标签:short   pack   配置   logs   font   添加   set   open   exit   

ospf配置:(Open Shortest Path First)
PC0 and PC1 via Ospf to communicate. Network map as below.
Environment:Cisco Packet Tracer

Set pc0 and pc1 static ip
PC0: 192.168.1.2
    255.255.255.0
gw: 192.168.1.1
PC1: 192.168.2.2
    255.255.255.0
gw: 192.168.2.1


Router0 (interface fa 0/0 and Se 0/1/0 ip config)

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no shu     #端口开启

Router(config-if)#exit
Router(config)#int s0/0/0
Router(config-if)#ip add 192.168.3.1 255.255.255.0   #添加ip地址
Router(config-if)#no shu

Router1 (interface fa 0/0 and Se 0/1/0 ip config)

Router>en
Router#conf t
Router(config)#int f0/0
Router(config-if)#ip add 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#exit
Router(config)#int s0/0/0
Router(config-if)#ip add 192.168.3.2 255.255.255.0
Router(config-if)#no shu

 

OSPF route config
Router0 OSPF Route config

Router(config-if)#exit
Router(config)#route ospf 10      #10是id进程号,可以随意定。范围为1-65535
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0    #宣告1.0网段到区域0中
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0

Router1 OSPF Route config

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#route ospf 10
Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0
Router(config-if)#no shu

test

技术分享

 

cisco ospf

标签:short   pack   配置   logs   font   添加   set   open   exit   

原文地址:http://www.cnblogs.com/smlile-you-me/p/6885073.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!