yunvn1 发表于 2013-7-19 08:54:16

路由器ospf动态路由配置

技术原理:      Ospd开放式最短路径优先协议。是目前网络中应用最广泛的路由协议之一。属于内部网络路由协议。能够适应各种规模的网络环境,是典型的链路状态协议。Ospf路由协议通过向全网扩散本设备的链路状态信息,使网络中每台设备最终同步一个具有全网链路状态的数据库,然后路由器采用spf算法。以自己为根,计算到达网络的最短路径,最终形成全网路由信息。实验步骤:1.在本实验中的三层交换机上划分vlan10和vlan20,其中vlan10用于连接主机,vlan20用于连接R1.2.路由器之间通过v35电缆通过串口连接,DCE端连接在R1上,配置其时钟频率64000.3.主机和交换机通过直连线,主机与路由器通过交叉线连接。4.在S3560上配置ospf路由协议。5.在路由器R1、R2上配置ospf路由协议6.将pc1、pc2主机默认网关设置为与直连网络设备接口IP地址7.验证pc1、pc2主机之间可以互相通实验图:S3650配置:Switch>enSwitch>enableSwitch#config tEnter configuration commands, one perline.End with CNTL/Z.Switch(config)#host s3650s3650(config)#vlan 10s3650(config-vlan)#name v10s3650(config-vlan)#exits3650(config)#vlan 20s3650(config-vlan)#name v20s3650(config-vlan)#exits3650(config)#int fa0/10s3650(config-if)#switchport access vlan 10s3650(config-if)#exits3650(config)#int fa0/20s3650(config-if)#switchport access vlan 20s3650(config-if)#exits3650(config)#int vlan 10
%LINK-5-CHANGED: Interface Vlan10, changedstate to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan10, changed state to ups3650(config-if)#ip address 192.168.1.1255.255.255.0s3650(config-if)#no shuts3650(config-if)#exits3650(config)#int vlan 20s3650(config-if)#%LINK-5-CHANGED: Interface Vlan20, changedstate to up
s3650(config-if)#ip address 192.168.3.1255.255.255.0s3650(config-if)#no shuts3650(config-if)#router ospf 1s3650(config-router)#network 192.168.1.00.0.0.255 area 0s3650(config-router)#network 192.168.3.00.0.0.255 area 0s3650(config-router)#exits3650(config)#exits3650#%SYS-5-CONFIG_I: Configured from console byconsoleR1配置:Router>enRouter#config tEnter configuration commands, one perline.End with CNTL/Z.Router(config)#host R1R1(config)#int fa0/0R1(config-if)#ip address 192.168.3.2255.255.255.0R1(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0,changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0, changed state to up
R1(config-if)#exitR1(config)#int serial2/0R1(config-if)#clock rate 64000R1(config-if)#ip address 192.168.4.1255.255.255.0R1(config-if)#no shut
%LINK-5-CHANGED: Interface Serial2/0,changed state to downR1(config-if)#exitR1(config)#router ospf 1R1(config-router)#network 192.168.3.00.0.0.255 area 0R1(config-router)#network01:10:13: %OSPF-5-ADJCHG: Process 1, Nbr192.168.3.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
% Incomplete command.R1(config-router)#network 192.168.4.00.0.0.255 area 0R1(config-router)#R2配置:Router>enRouter#config tEnter configuration commands, one perline.End with CNTL/Z.Router(config)#host R2R2(config)#int fa0/0R2(config-if)#ip address 192.168.2.1255.255.255.0R2(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0,changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0, changed state to up
R2(config-if)#exitR2(config)#int serial2/0R2(config-if)#ip address 192.168.4.2255.255.255.0R2(config-if)#no shut
R2(config-if)#%LINK-5-CHANGED: Interface Serial2/0,changed state to up
R2(config-if)#exitR2(config)#%LINEPROTO-5-UPDOWN: Line protocol onInterface Serial2/0, changed state to up
R2(config)#router ospf 1R2(config-router)#network 192.168.2.00.0.0.255 area 0R2(config-router)#network 192.168.4.00.0.0.255 area 0R2(config-router)#exitR2(config)#测试:从pc2 pingpc1.不通在s3650上配置:s3650#config tEnter configuration commands, one perline.End with CNTL/Z.s3650(config)#ip routings3650(config)#exits3650#此时测试已通

zcl_ccc 发表于 2013-7-21 08:43:35

微机原理闹危机,随机过程随机过,实变函数学十遍,汇编语言不会编!

菜蜂 发表于 2013-7-22 04:22:59

俺从不写措字,但俺写通假字!

link 发表于 2013-7-22 15:25:08

走,MM,咱们化蝶去……

xuxiaohui9216 发表于 2013-7-23 17:58:09

读书读到抽筋处,文思方能如尿崩!

想你了的他他 发表于 2013-7-24 20:08:15

所有刻骨铭心的爱都灵魂游离于床上的瞬间!

heshao2005 发表于 2013-7-25 17:31:38

不错不错,楼主您辛苦了。。。
页: [1]
查看完整版本: 路由器ospf动态路由配置