版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、实训二十四三层交换机OSPF动态路由实训目的1、掌握三层交换机之间通过OSPF协议实现网段互通的配置方法。2、理解RIP协议和OSPF协议内部实现的不同点二、应用环境当两台三层交换机级联时,为了保证每台交换机上所连接的网段可以和另一台交换机上 连接的网段互相通信,使用 OSPF协议可以动态学习路由。三、实训设备1. DCRS-5650-52CT 交换机 2 台2. PC 机 2-4 台3. Console 线 1-2 根4. 直通网线2-4根四、实训拓扑via n30 via n40VlanlO Vlan20五、实训要求1、在交换机A和交换机B上分别划分基于端口的VLAN :交换机VLAN端c
2、喊员交换机A1018209-1610024交换机B3018409-16101242、交换机A和B通过的24 口级联。3、配置交换机A和B各VLAN虚拟接口的IP地址分别如下表所示:VLAN 10VLAN20VLAN30VLAN40VLAN 100VLAN101192.168.10.1192.168.20.1192.168.30.1192.168.40.1192.168.100.1192.168.100.24、PC1PC4的网络设置为:设备IP地址gatewayMaskPC1192.168.10.101192.168.10.1255.255.255.0PC2192.168.20.101192.1
3、68.20.1255.255.255.0PC3192.168.30.101192.168.30.1255.255.255.0PC4192.168.40.101192.168.40.1255.255.255.05、验证:没有OSPF路由协议之前:PC1与PC2,PC3与PC4可以互通。PC1、PC2 与 PC3、PC4 不通。配置OSPF路由协议之后:四台PC之间都可以互通。若实训结果和理论相符,则本实训完成。六、实训步骤第一步:交换机全部恢复出厂设置,配置交换机的VLAN信息交换机A :DCRS-5650-52CT -A#co nfDCRS-5650-52CT -A(Co nfig)#vlan
4、 10DCRS-5650-52CT -A(Co nfig-Vla n10)#switchport in terface ethernet 0/0/1 -8Set the port Ether net0/0/1 access vlan 10 successfullySet the port Ether net0/0/2 access vlan 10 successfullySet the port Ether net0/0/3 access vlan 10 successfullySet the port Ether net0/0/4 access vlan 10 successfullySet
5、 the port Ether net0/0/5 access vlan 10 successfullySet the port Ether net0/0/6 access vlan 10 successfullySet the port Ether net0/0/7 access vlan 10 successfullySet the port Ether net0/0/8 access vlan 10 successfullyDCRS-5650-52CT -A(Co nfig-Vla n10)#exitDCRS-5650-52CT -A(Co nfig)#vlan 20DCRS-5650-
6、52CT -A(Co nfig-Vla n20)#switchport in terface ethernet 0/0/9-16Set the port Ether net0/0/9 access vlan 20 successfullySet the port Ether net0/0/10 access via n 20 successfullySet the port EthernetO/O/11 access vlan 20 successfullySet the port Ether net0/0/12 access via n 20 successfullySet the port
7、 EthemetO/O/13 access vlan 20 successfullySet the port Ether net0/0/15 access via n 20 successfullySet the port Ethernet0/0/14 access vlan 20 successfullySet the port EthemetO/O/16 access vlan 20 successfullyDCRS-5650-52CT -A(Co nfig-Vla n20)#exitDCRS-5650-52CT -A(Co nfig)#vlan 100DCRS-5650-52CT -A(
8、Co nfig-Vla n100)#switchport in terface ethernet 0/0/24Set the port EthernetO/O/24 access vlan 100 successfullyDCRS-5650-52CT -A(Co nfig-Vla n100)#exitDCRS-5650-52CT -A(Co nfig)#验证配置:DCRS-5650-52CT -A#show via nVLAN NameType Media Ports1defaultStaticENETEthemetO/O/17EthemetO/O/18EthernetO/O/19Ethern
9、et0/0/20EthernetO/O/2 1EthemetO/O/22EthernetO/O/23EthemetO/O/25EthernetO/O/26EthernetO/O/27EthernetO/O/2810VLAN0010StaticENETEthemetO/O/2EthernetO/O/3EthernetO/O/5EthernetO/O/720VLAN0020StaticENETEthernetO/O/1OEthernetO/O/11Ethernet0/0/12EthernetO/O/13EthernetO/O/14EthernetO/O/15Ethernet0/0/16100 VL
10、AN0100Static ENETEthernetO/O/24DCRS-5650-52CT -A#EthernetO/O/1EthemetO/O/4EthemetO/O/6EthemetO/O/8EthemetO/O/9交换机B:DCRS-5650-52CT -B(C on fig)#vla n 30DCRS-5650-52CT -B(Co nfig-Vla n30)#switchport in terface ethernet 0/0/1 -8Set the port Ether net0/0/1 access vlan 30 successfullySet the port Ether n
11、et0/0/2 access vlan 30 successfullySet the port Ether net0/0/3 access vlan 30 successfullySet the port Ether net0/0/4 access vlan 30 successfullySet the port Ether net0/0/5 access vlan 30 successfullySet the port Ether net0/0/6 access vlan 30 successfullySet the port Ether net0/0/7 access vlan 30 su
12、ccessfullySet the port Ether net0/0/8 access vlan 30 successfullyDCRS-5650-52CT -B(Config-Vlan30)#exitDCRS-5650-52CT -B(C on fig)#vla n 40DCRS-5650-52CT -B(Co nfig-Vla n40)#switchport in terface ethernet 0/0/9-16Set the port Ether net0/0/9 access vlan 40 successfullySet the port Ethernet0/0/10 acces
13、s vlan 40 successfullySet the port Ethernet0/0/11 access vlan 40 successfullySet the port Ethernet0/0/12 access vlan 40 successfullySet the port Ethernet0/0/13 access vlan 40 successfullySet the port Ethernet0/0/14 access vlan 40 successfullySet the port Ether net0/0/15 access via n 40 successfullyS
14、et the port Ethernet0/0/16 access vlan 40 successfullyDCRS-5650-52CT -B(Co nfig-Vla n40)#exitDCRS-5650-52CT -B(Co nfig)#vla n 101DCRS-5650-52CT -B(Co nfig-Vla n101)#switchport in terface ethernet 0/0/24Set the port EthernetO/O/24 access vlan 101 successfullyDCRS-5650-52CT -B(Co nfig-Vla n101)#exitDC
15、RS-5650-52CT -B(Co nfig)#验证配置:DCRS-5650-52CT -B#show vlanVLAN NameType1defaultEthernetO/O/18Ethernet0/0/20EthernetO/O/22EthernetO/O/25EthernetO/O/2710 VLAN0010EthernetO/O/2Media PortsStaticENETEthernet0/0/1720 VLAN0020Ethernet0/0/19Ethernet0/0/21EthemetO/O/23EthemetO/O/26Ethernet0/0/28StaticENETEthe
16、rnet0/0/3Ethernet0/0/5Ethernet0/0/7StaticENETEthernet0/0/1EthemetO/O/4EthernetO/O/6EthernetO/O/8EthernetO/O/9Ethernet0/0/10EthernetO/O/11EthemetO/O/12EthemetO/O/13EthernetO/O/14EthemetO/O/15EthemetO/O/16100 VLAN0100Static ENETEthemetO/O/24DCRS-5650-52CT B#第二步:配置交换机各vlan虚接口的IP地址交换机A :DCRS-5650-52CT -
17、A(Co nfig)#i nt vlan 10DCRS-5650-52CT -A(C on fig-lf-Vla n10)#ip address 192.168.10.1 255.255.255.0DCRS-5650-52CT -A(Co nfig-lf-Vla n10)# no shutDCRS-5650-52CT -A(C on fig-lf-Vla n10)#exitDCRS-5650-52CT -A(Co nfig)#i nt vlan 20DCRS-5650-52CT -A(C on fig-lf-Vla n20)#ip address 192.168.20.1 255.255.25
18、5.0DCRS-5650-52CT -A(Co nfig-lf-Vla n20)# no shutDCRS-5650-52CT -A(C on fig-lf-Vla n20)#exitDCRS-5650-52CT -A(Co nfig)#i nt vlan 100-A(Co nfig-lf-Vla n100)#ipaddress 192.168.100.1DCRS-5650-52CT255.255.255.0DCRS-5650-52CT -A(Co nfig-lf-Vla n100)# no shutDCRS-5650-52CT -A(Config-lf-VlanlOO)#DCRS-5650-
19、52CT -A(Co nfig-lf-Vla n100)#exitDCRS-5650-52CT -A(Co nfig)#交换机B :DCRS-5650-52CT -B(Co nfig)# in t vlan 30DCRS-5650-52CT -B(Co nfig-lf-Vla n30)#ip address 192.168.30.1 255.255.255.0DCRS-5650-52CT -B(Co nfig-lf-Vla n30)# no shutDCRS-5650-52CT -B(C on fig-lf-Vla n30)#exitDCRS-5650-52CT -B(Co nfig)#i n
20、terface vlan 40DCRS-5650-52CT -B(Co nfig-lf-Vla n40)#ip address 192.168.40.1 255.255.255.0DCRS-5650-52CT -B(C on fig-lf-Vla n40)#exitDCRS-5650-52CT -B(Co nfig)# in t vlan 101DCRS-5650-52CT -B(Co nfig-lf-Vla n101)#ipaddress 192.168.100.2255.255.255.0DCRS-5650-52CT -B(Co nfig-lf-Vla n101)#exitDCRS-565
21、0-52CT -B(Co nfig)#第三步:配置各PC的IP地址,注意配置网关设备IP地址gatewayMaskPC1192.168.10.101192.168.10.1255.255.255.0PC2192.168.20.101192.168.20.1255.255.255.0PC3192.168.30.101192.168.30.1255.255.255.0PC4192.168.40.101192.168.40.1255.255.255.0第四步:验证PC之间是否连通?PC端口PC端口结果原因PC1A :0/0/1PC2A : 0/0/9通PC1A :0/0/1Vian 100A : 0
22、/0/24通PC1A :0/0/1Vian 101B : 0/0/24不通PC1A :0/0/1PC3B : 0/0/1不通查看路由表,进一步分析上一步的现象原因。交换机A :DCRS-5650-52CT -A#show ip routeCodes: K - kernel, C - conn ected, S - static, R - RIP , B - BGP0 - OSPF, IA - OSPF in ter areai- IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS in ter areaE1 - OSPF exte
23、rnal type 1, E2 - OSPF external type 2 - can didate defaultC 127.0.0.0/8 is directly conn ected, LoopbackC192.168.10.0/24 is directly conn ected, Via n10C192.168.20.0/24 is directly conn ected, Via n20C 192.168.100.0/24 is directly conn ected, Via n100交换机B:DCRS-5650-52CT -B#show ip routeCodes: K - k
24、ernel, C - conn ected, S - static, R - RIP , B - BGPO - OSPF, IA - OSPF in ter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 -IS-IS level-2, ia - IS-IS in ter area - can didate defaultC 127.0.0
25、.0/8 is directly conn ected, LoopbackC192.168.30.0/24 is directly conn ected, Via n30C192.168.40.0/24 is directly conn ected, Via n40C 192.168.102.0/24 is directly conn ected, Via n101第五步:启动OSPF协议,并将对应的直连网段配置到OSPF进程中交换机A :DCRS-5650-52CT -A(co nfig)#router ospfDCRS-5650-52CT -A(co nfig-router)# netwo
26、rk 192.168.10.0/24 area 0DCRS-5650-52CT -A(co nfig-router)# network 192.168.20.0/24 area 0DCRS-5650-52CT -A(co nfig-router)# network 192.168.100.0/24 area 0DCRS-5650-52CT -A(co nfig-router)#exit交换机B:DCRS-5650-52CT -B(co nfig)#router ospfDCRS-5650-52CT -B(co nfig-router)# network 192.168.30.0/24 area
27、 0DCRS-5650-52CT -B(co nfig-router)# network 192.168.40.0/24 area 0DCRS-5650-52CT -B(co nfig-router)# network 192.168.101.0/24 area 0 DCRS-5650-52CT -B(co nfig-router)#exit验证配置:交换机A :DCRS-5650-52CT -A#show ip routeCodes: K - kernel, C - conn ected, S - static, R - RIP , B - BGPO - OSPF, IA - OSPF in
28、 ter areai- IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS in ter area-can didate default127.0.0.0/8 is directly conn ected, LoopbackE1 - OSPF external type 1, E2 - OSPF external type 2C192.168.10.0/24 is directly conn ected, Via n10C192.168.20.0/24 is directly conn ected, Via n20O192.168
29、.30.0/24 110/20 via 192.168.100.2, Vian100t00:00:23O192.168.40.0/24 110/20 via 192.168.100.2, Vian100,00:00:23C 192.168.100.0/24 is directly conn ected, Via n100(O代表ospf学习到的路由网段)交换机B:DCRS-5650-52CT -B#show ip routeCodes: K - kernel, C - conn ected, S - static, R - RIP , B - BGPO - OSPF, IA - OSPF in
30、 ter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS in ter area - can didate default127.0.0.0/8 is directly conn ected, LoopbackN1 - OSPF NSSA external type 1, N2 - O
31、SPF NSSA external type 2192.168.10.0/24 110/20 via 192.168.100.1, Via n101,00:00:23O192.168.20.0/24110/20 via 192.168.100.1, Via n101,00:00:23C192.168.30.0/24is directly conn ected,Via n30C192.168.40.0/24is directly conn ected,Via n40C192.168.100.0/24is directly conn ected,Via n101(。代表ospf学习到的路由网段)第
32、六步:验证PC之间是否连通?PC端口PC端口结果原因PC1A :0/0/1PC2A : 0/0/9通PC1A :0/0/1Via n 100A : 0/0/24通PC1A :0/0/1Vian 101B : 0/0/24通PC1A :0/0/1PC3B : 0/0/1通OSPF协议七、注意事项和排错在配置 ' 使用OSPF协议时,可能会由于物理连接、配置错误等原因导致未能正常运行。因此,用户应注意一下要点:首先应该保证物理连接的正确无误;其次,保证接口和链路协议是UP (使用show in terface 命令);然后在各接口上配置不同网段的IP地址;然后,先启动OSPF协议(使用ro
33、uter ospf命令)再在相应接口配置所属OSPF域;接着,注意OSPF协议的自身特点一一 OSPF骨干域(0域)必须保证是连续的,如果不连续使用 虚连接(virtual link )接来保证,所有非0域只能通过0域与其他非0域相连,不允许非0域直接 相连;边界三层交换机是指该三层交换机的一部分接口属于0域,而另外一部分接口属于非0域;对于广播网等多路访问网'需要选举指定三层交换机DR。八、配置序列交换机A :DCRS-5650-52CT -A#show runIno service password-e ncrypti on ihos tn ame DCRS-5650-52CT -
34、A iIn terface Ethernet0ivia n 1vlan 10vlan 20vlan 100iIn terface EthernetO/O/1 switchport access vlan 10 !In terface Ethernet0/0/2 switchport access vlan 10In terface Ethernet0/0/23iIn terface Ethernet0/0/24 switchport access vlan 100iIn terface Ethernet0/0/25iIn terface Ethernet0/0/26In terface Eth
35、ernet0/0/27In terface EthemetO/O/28in terface VlanlOip address 192.168.10.1 255.255.255.0 iin terface Via n100ip address 192.168.100.1 255.255.255.0 iin terface Vlan20ip address 192.168.20.1 255.255.255.0 iin terface sitOirouter ospfnetwork 192.168.10.0/24 area 0network 192.168.20.0/24 area 0network
36、 192.168.100.0/24 area 0 ino logi nendDCRS-5650-52CT -A#交换机B :略九、共同思考本实训只体现了 area。的配置方法,大家可以参考理论教材和用户手册尝试ospf运行在多区域的配置方法十、课后练习1 .在交换机A和交换机B上分别划分基于端口的VLAN :交换机VLAN端口成员交换机A1028209-161001交换机B1028409-1610012.交换机A和B通过的24 口级联。3.配置交换机A和B各VLAN虚拟接口的IP地址分别如卜.表所示:VLAN10_AVLAN20VLAN10_BVLAN40VLAN100_AVLAN10.B10
37、.1.10.110.1.20.110.1.30.110.1.40.110.1.100.110.1.100.24. PC1-PC4的网络设置t为:设备IP地址gatewayMaskPC110.1.10.210.1.10.1255.255.255.0PC210.1.20.2110.1.20.1255.255.255.0PC310.1.30.210.1.30.1255.255.255.0PC410.1.40.210.140.1255.255.255.05.使用OSPF协议要求所有PC之间都可以通信卜一、相关配置命令详解配置任务序列1 .启动OSPF协议(必须)(1)启动俟闭OSPF协议(必须)(2)
38、配置运行OSPF三层交换机的ID号(可选)(3)配置运行OSPF的网络范围(可选)(4)配置接口所属的域(必须)2 .配置OSPF辅助参数(可选)(1) 配置OSPF发包机制参数1)配置OSPF数据包的验证2)配置OSPF接口为只收不发3)配置接口发送数据包的代价三层交换机失效定时器、接口传送LSA时延定时器、邻接三层交换机重传LSA定 时器)(2) 配置OSPF引入路由参数1 )配置引入外部路由的缺省参数(缺省类型、缺省标记值、缺省代价值)2)配置在OSPF中引入其它协议的路由(3) 配置OSPF协议其它参数1)配置OSPF路由协议优先级HELLO数据包的定时器、邻接4)配置OSPF发包定时
39、器参数(广播接口轮询发送2)配置OSPF STUB域及缺省路由的代价3)配置OSPF虚链路4)配置接口在选举指定三层交换机 DR中的优先级3 .关闭OSPF协议1 .启动OSPF协议在DCRS系列三层交换机上运行OSPF路由协议的基本配置也很简单,通常只需打开 OSPF开关、配置接口所在OSPF域即可,OSPF协议的参数都使用缺省值。如需修改OSPF协议参数值,参看2.配置OSPF辅助参数。命令解释全局配置模式no router ospf process <id >启动OSPF协议进程,本命令的no操作关闭OSPF协议。(必须)OSPF协议配置模式router-id <rou
40、ter_id> no router-id配置运行OSPF协议三层交换机的ID号;本命令的n。操作取消三层交换机的ID号。缺省为选择某个接口的IP地址作为三层交换机ID。(可选)no n etwork vn etwork> vmask> |<n etwork>/vprefix> area<area_id>配置某个网段属于某个区域,本命令的 no操作为取消该配置。(必须)no passive-i nterfaceIFNAME |ethernet IFNAME | Vian < ID >将一个接口设置为只收不发;本命令的no操作取消配置。2
41、 .配置OSPF辅助参数(1 )配置OSPF发包机制参数1)配置OSPF数据包的验证2)配置OSPF接口为只收不发3) 配置接口发送数据包的代价命令解释接口配置模式ip ospf authe nticati on message-digest | n ullno ip ospf authe nticati on配置接口接受OSPF数据包所需要的验证方式本命令的no操作恢复为缺省值。ip ospf authentication-key LINE no ip ospf authe nticati on-key配置接口接受OSPF数据包所需要的验证方式的key ;本命令的no操作恢复为缺省值。ip
42、ospf cost < cost > no ip ospf cost指定接口运行OSPF协议所需的代价;本命令的n。操作恢复代价的缺省值。4 )配置OSPF发包定时器参数(广播接口轮询发送HELLO数据包的定时器、邻接三层交换机失效定时器、接口传送 LSA时延定时器、邻接三层交换机重传LSA定时器)命令解释接口配置模式ip ospf hello-interval <time >no ip ospf hello-i nterval配置接口周期发送HELLO数据包的时间间隔;本 命令的n。操作恢复为缺省值。ip ospf dead-interval <time >
43、;no ip ospf dead-i nterval配置认定相邻三层交换机失效的时间间隔;本命令的n。操作恢复为缺省值。ip ospf transit-delay <time >no ip ospf tran sit-delay设置在接口上传送链路状态广播的时延值;本命令的n。操作恢复为缺省值。ip ospf retransmit <time >no ip ospf retra nsmit配置接口与邻接三层交换机之间传送锥路状态通告时的重传间隔;本命令的no操作恢复为缺省值。(2 )配置OSPF引人路由参数配置在OSPF中引入其它协议的路由命令解释OSPF协议配置模式redistribute b
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- GB/T 48398-2026半导体集成电路嵌入式非易失性存储器测试方法
- 中风偏瘫患者康复技术
- 5去外婆家 课件(共23张)
- 9.2《脚踏实地 做好人生规划》 同步学案.2026-2027学年统编版九下道德与法治
- 电气接地装置对策措施方案-屋面改造工程
- 房地产 -2026年1-11月中国房地产企业业绩分析报告
- 两癌筛查结果评估方法
- 人民版高中历史必修一31《太平天国运动》教学设计
- Rolzavosoritide-生命科学试剂-MCE
- 门诊不孕妇女的心理状况调查及护理对策
- 第22课《精神的三间小屋》教案-2026-2027学年九年级语文统编版上册
- 城市轨道交通概论2026年期末模拟试题(含答案)
- 新《中华人民共和国治安管理处罚法》试题(含答案与解析)
- 2026年共青团入团考试常背知识点测试题库带答案
- 初中数学联赛(初联)历年真题
- 麻醉科质控汇报
- 葡萄膜炎护理教学课件
- 胃肠外科科室介绍
- DB32-T 4878-2024 居住区供配电设施建设标准
- 集成电路职业规划
- 乙烯安全技术说明书MSDS
评论
0/150
提交评论