实训二十四三层交换机OSPF动态路由Word格式.docx
- 文档编号:20181750
- 上传时间:2023-01-17
- 格式:DOCX
- 页数:17
- 大小:91.29KB
实训二十四三层交换机OSPF动态路由Word格式.docx
《实训二十四三层交换机OSPF动态路由Word格式.docx》由会员分享,可在线阅读,更多相关《实训二十四三层交换机OSPF动态路由Word格式.docx(17页珍藏版)》请在冰豆网上搜索。
设备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.05、验证:
没有OSPF路由协议之前:
PC1与PC2,PC3与PC4可以互通。
PC1、PC2与PC3、PC4不通。
配置OSPF路由协议之后:
四台PC之间都可以互通。
若实训结果和理论相符,则本实训完成。
六、实训步骤六、实训步骤第一步:
交换机全部恢复出厂设置,配置交换机的VLAN信息交换机A:
DCRS-5650-52CT-A#confDCRS-5650-52CT-A(Config)#vlan10DCRS-5650-52CT-A(Config-Vlan10)#switchportinterfaceethernet0/0/1-8SettheportEthernet0/0/1accessvlan10successfullySettheportEthernet0/0/2accessvlan10successfullySettheportEthernet0/0/3accessvlan10successfullySettheportEthernet0/0/4accessvlan10successfullySettheportEthernet0/0/5accessvlan10successfullySettheportEthernet0/0/6accessvlan10successfullySettheportEthernet0/0/7accessvlan10successfullySettheportEthernet0/0/8accessvlan10successfullyDCRS-5650-52CT-A(Config-Vlan10)#exitDCRS-5650-52CT-A(Config)#vlan20DCRS-5650-52CT-A(Config-Vlan20)#switchportinterfaceethernet0/0/9-16SettheportEthernet0/0/9accessvlan20successfullySettheportEthernet0/0/10accessvlan20successfullySettheportEthernet0/0/11accessvlan20successfullySettheportEthernet0/0/12accessvlan20successfullySettheportEthernet0/0/13accessvlan20successfullySettheportEthernet0/0/14accessvlan20successfullySettheportEthernet0/0/15accessvlan20successfullySettheportEthernet0/0/16accessvlan20successfullyDCRS-5650-52CT-A(Config-Vlan20)#exitDCRS-5650-52CT-A(Config)#vlan100DCRS-5650-52CT-A(Config-Vlan100)#switchportinterfaceethernet0/0/24SettheportEthernet0/0/24accessvlan100successfullyDCRS-5650-52CT-A(Config-Vlan100)#exitDCRS-5650-52CT-A(Config)#验证配置:
DCRS-5650-52CT-A#showvlanVLANNameTypeMediaPorts-1defaultStaticENETEthernet0/0/17Ethernet0/0/18Ethernet0/0/19Ethernet0/0/20Ethernet0/0/21Ethernet0/0/22Ethernet0/0/23Ethernet0/0/25Ethernet0/0/26Ethernet0/0/27Ethernet0/0/2810VLAN0010StaticENETEthernet0/0/1Ethernet0/0/2Ethernet0/0/3Ethernet0/0/4Ethernet0/0/5Ethernet0/0/6Ethernet0/0/7Ethernet0/0/820VLAN0020StaticENETEthernet0/0/9Ethernet0/0/10Ethernet0/0/11Ethernet0/0/12Ethernet0/0/13Ethernet0/0/14Ethernet0/0/15Ethernet0/0/16100VLAN0100StaticENETEthernet0/0/24DCRS-5650-52CT-A#交换机B:
DCRS-5650-52CT-B(Config)#vlan30DCRS-5650-52CT-B(Config-Vlan30)#switchportinterfaceethernet0/0/1-8SettheportEthernet0/0/1accessvlan30successfullySettheportEthernet0/0/2accessvlan30successfullySettheportEthernet0/0/3accessvlan30successfullySettheportEthernet0/0/4accessvlan30successfullySettheportEthernet0/0/5accessvlan30successfullySettheportEthernet0/0/6accessvlan30successfullySettheportEthernet0/0/7accessvlan30successfullySettheportEthernet0/0/8accessvlan30successfullyDCRS-5650-52CT-B(Config-Vlan30)#exitDCRS-5650-52CT-B(Config)#vlan40DCRS-5650-52CT-B(Config-Vlan40)#switchportinterfaceethernet0/0/9-16SettheportEthernet0/0/9accessvlan40successfullySettheportEthernet0/0/10accessvlan40successfullySettheportEthernet0/0/11accessvlan40successfullySettheportEthernet0/0/12accessvlan40successfullySettheportEthernet0/0/13accessvlan40successfullySettheportEthernet0/0/14accessvlan40successfullySettheportEthernet0/0/15accessvlan40successfullySettheportEthernet0/0/16accessvlan40successfullyDCRS-5650-52CT-B(Config-Vlan40)#exitDCRS-5650-52CT-B(Config)#vlan101DCRS-5650-52CT-B(Config-Vlan101)#switchportinterfaceethernet0/0/24SettheportEthernet0/0/24accessvlan101successfullyDCRS-5650-52CT-B(Config-Vlan101)#exitDCRS-5650-52CT-B(Config)#验证配置:
DCRS-5650-52CT-B#showvlanVLANNameTypeMediaPorts-1defaultStaticENETEthernet0/0/17Ethernet0/0/18Ethernet0/0/19Ethernet0/0/20Ethernet0/0/21Ethernet0/0/22Ethernet0/0/23Ethernet0/0/25Ethernet0/0/26Ethernet0/0/27Ethernet0/0/2810VLAN0010StaticENETEthernet0/0/1Ethernet0/0/2Ethernet0/0/3Ethernet0/0/4Ethernet0/0/5Ethernet0/0/6Ethernet0/0/7Ethernet0/0/820VLAN0020StaticENETEthernet0/0/9Ethernet0/0/10Ethernet0/0/11Ethernet0/0/12Ethernet0/0/13Ethernet0/0/14Ethernet0/0/15Ethernet0/0/16100VLAN0100StaticENETEthernet0/0/24DCRS-5650-52CT-B#第二步:
配置交换机各vlan虚接口的IP地址交换机A:
DCRS-5650-52CT-A(Config)#intvlan10DCRS-5650-52CT-A(Config-If-Vlan10)#ipaddress192.168.10.1255.255.255.0DCRS-5650-52CT-A(Config-If-Vlan10)#noshutDCRS-5650-52CT-A(Config-If-Vlan10)#exitDCRS-5650-52CT-A(Config)#intvlan20DCRS-5650-52CT-A(Config-If-Vlan20)#ipaddress192.168.20.1255.255.255.0DCRS-5650-52CT-A(Config-If-Vlan20)#noshutDCRS-5650-52CT-A(Config-If-Vlan20)#exitDCRS-5650-52CT-A(Config)#intvlan100DCRS-5650-52CT-A(Config-If-Vlan100)#ipaddress192.168.100.1255.255.255.0DCRS-5650-52CT-A(Config-If-Vlan100)#noshutDCRS-5650-52CT-A(Config-If-Vlan100)#DCRS-5650-52CT-A(Config-If-Vlan100)#exitDCRS-5650-52CT-A(Config)#交换机B:
DCRS-5650-52CT-B(Config)#intvlan30DCRS-5650-52CT-B(Config-If-Vlan30)#ipaddress192.168.30.1255.255.255.0DCRS-5650-52CT-B(Config-If-Vlan30)#noshutDCRS-5650-52CT-B(Config-If-Vlan30)#exitDCRS-5650-52CT-B(Config)#interfacevlan40DCRS-5650-52CT-B(Config-If-Vlan40)#ipaddress192.168.40.1255.255.255.0DCRS-5650-52CT-B(Config-If-Vlan40)#exitDCRS-5650-52CT-B(Config)#intvlan101DCRS-5650-52CT-B(Config-If-Vlan101)#ipaddress192.168.100.2255.255.255.0DCRS-5650-52CT-B(Config-If-Vlan101)#exitDCRS-5650-52CT-B(Config)#第三步:
配置各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/1Vlan100A:
0/0/24通PC1A:
0/0/1Vlan101B:
0/0/24不通PC1A:
0/0/1PC3B:
0/0/1不通查看路由表,进一步分析上一步的现象原因。
交换机A:
DCRS-5650-52CT-A#showiprouteCodes:
K-kernel,C-connected,S-static,R-RIP,B-BGPO-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea*-candidatedefaultC127.0.0.0/8isdirectlyconnected,LoopbackC192.168.10.0/24isdirectlyconnected,Vlan10C192.168.20.0/24isdirectlyconnected,Vlan20C192.168.100.0/24isdirectlyconnected,Vlan100交换机B:
DCRS-5650-52CT-B#showiprouteCodes:
K-kernel,C-connected,S-static,R-RIP,B-BGPO-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea*-candidatedefaultC127.0.0.0/8isdirectlyconnected,LoopbackC192.168.30.0/24isdirectlyconnected,Vlan30C192.168.40.0/24isdirectlyconnected,Vlan40C192.168.102.0/24isdirectlyconnected,Vlan101第五步:
启动OSPF协议,并将对应的直连网段配置到OSPF进程中交换机A:
DCRS-5650-52CT-A(config)#routerospfDCRS-5650-52CT-A(config-router)#network192.168.10.0/24area0DCRS-5650-52CT-A(config-router)#network192.168.20.0/24area0DCRS-5650-52CT-A(config-router)#network192.168.100.0/24area0DCRS-5650-52CT-A(config-router)#exit交换机B:
DCRS-5650-52CT-B(config)#routerospfDCRS-5650-52CT-B(config-router)#network192.168.30.0/24area0DCRS-5650-52CT-B(config-router)#network192.168.40.0/24area0DCRS-5650-52CT-B(config-router)#network192.168.101.0/24area0DCRS-5650-52CT-B(config-router)#exit验证配置:
K-kernel,C-connected,S-static,R-RIP,B-BGPO-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea*-candidatedefaultC127.0.0.0/8isdirectlyconnected,LoopbackC192.168.10.0/24isdirectlyconnected,Vlan10C192.168.20.0/24isdirectlyconnected,Vlan20O192.168.30.0/24110/20via192.168.100.2,Vlan100,00:
00:
23O192.168.40.0/24110/20via192.168.100.2,Vlan100,00:
23C192.168.100.0/24isdirectlyconnected,Vlan100(O代表ospf学习到的路由网段)交换机B:
K-kernel,C-connected,S-static,R-RIP,B-BGPO-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea*-candidatedefaultC127.0.0.0/8isdirectlyconnected,LoopbackO192.168.10.0/24110/20via192.168.100.1,Vlan101,00:
23O192.168.20.0/24110/20via192.168.100.1,Vlan101,00:
23C192.168.30.0/24isdirectlyconnected,Vlan30C192.168.40.0/24isdirectlyconnected,Vlan40C192.168.100.0/24isdirectlyconnected,Vlan101(O代表ospf学习到的路由网段)第六步:
0/0/1通七、注意事项和排错七、注意事项和排错在配置、使用OSPF协议时,可能会由于物理连接、配置错误等原因导致OSPF协议未能正常运行。
因此,用户应注意一下要点:
首先应该保证物理连接的正确无误;
其次,保证接口和链路协议是UP(使用showinterface命令);
然后在各接口上配置不同网段的IP地址;
然后,先启动OSPF协议(使用routerospf命令)再在相应接口配置所属OSPF域;
接着,注意OSPF协议的自身特点OSPF骨干域(0域)必须保证是连续的,如果不连续使用虚连接(virtuallink)接来保证,所有非0域只能通过0域与其他非0域相连,不允许非0域直接相连;
边界三层交换机是指该三层交换机的一部分接口属于0域,而另外一部分接口属于非0域;
对于广播网等多路访问网,需要选举指定三层交换机DR。
八、配八、配置序列置序列交换机A:
DCRS-5650-52CT-A#showrun!
noservicepassword-encryption!
hostnameDCR
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 实训二 十四 三层 交换机 OSPF 动态 路由
![提示](https://static.bdocx.com/images/bang_tan.gif)