实训二十四三层交换机OSPF动态路由Word文档格式.docx
- 文档编号:20188631
- 上传时间:2023-01-17
- 格式:DOCX
- 页数:19
- 大小:46.77KB
实训二十四三层交换机OSPF动态路由Word文档格式.docx
《实训二十四三层交换机OSPF动态路由Word文档格式.docx》由会员分享,可在线阅读,更多相关《实训二十四三层交换机OSPF动态路由Word文档格式.docx(19页珍藏版)》请在冰豆网上搜索。
100
24
交换机B
30
40
101
2、交换机A和B通过的24口级联。
3、配置交换机A和B各VLAN虚拟接口的IP地址分别如下表所示:
VLAN10
VLAN20
VLAN30
VLAN40
VLAN100
VLAN101
192.168.10.
1
192.168.20.
192.168.30.
192.168.40.
192.168.10
0.1
0.2
4、PC1-PC4的网络设置为:
设备
IP地址
gateway
Mask
PC1
192.168.10.101
192.168.10.1
255.255.255.0
PC2
192.168.20.101
192.168.20.1
PC3
192.168.30.101
192.168.30.1
PC4
192.168.40.101
192.168.40.1
5、验证:
没有OSPF路由协议之前:
PC1与PC2,PC3与PC4可以互通。
PC1、PC2与PC3、PC4不通。
配置OSPF路由协议之后:
四台PC之间都可以互通。
若实训结果和理论相符,则本实训完成。
六、实训步骤
交换机A:
DCRS-5650-52CT-A#conf
DCRS-5650-52CT-A(Config)#vlan10
DCRS-5650-52CT-A(Config-Vlan10)#switchportinterfaceethernet0/0/1-8
SettheportEthernet0/0/1accessvlan10successfully
SettheportEthernet0/0/2accessvlan10successfully
SettheportEthernet0/0/3accessvlan10successfully
SettheportEthernet0/0/4accessvlan10successfully
SettheportEthernet0/0/5accessvlan10successfully
SettheportEthernet0/0/6accessvlan10successfully
SettheportEthernet0/0/7accessvlan10successfully
SettheportEthernet0/0/8accessvlan10successfully
DCRS-5650-52CT-A(Config-Vlan10)#exit
DCRS-5650-52CT-A(Config)#vlan20
DCRS-5650-52CT-A(Config-Vlan20)#switchportinterfaceethernet0/0/9-16
SettheportEthernet0/0/9accessvlan20successfully
SettheportEthernet0/0/10accessvlan20successfully
SettheportEthernet0/0/11accessvlan20successfully
SettheportEthernet0/0/12accessvlan20successfully
SettheportEthernet0/0/13accessvlan20successfully
DCRS-5650-52CT-A(Config-Vlan20)#exit
DCRS-5650-52CT-A(Config)#vlan100
DCRS-5650-52CT-A(Config-Vlan100)#switchportinterfaceethernet0/0/24
SettheportEthernet0/0/24accessvlan100successfully
DCRS-5650-52CT-A(Config-Vlan100)#exit
DCRS-5650-52CT-A(Config)#
验证配置:
DCRS-5650-52CT-A#showvlan
VLANName
TypeMediaPorts
1default
Ethernet0/0/18
Ethernet0/0/20
Ethernet0/0/22
Ethernet0/0/25
Static
ENET
Ethernet0/0/19
Ethernet0/0/21
Ethernet0/0/23
Ethernet0/0/17
Ethernet0/0/28
10VLAN0010Static
Ethernet0/0/2
20VLAN0020Static
EthernetO/O/1O
Ethernet0/0/12
EthernetO/O/14
Ethernet0/0/16
100VLAN0100StaticENET
DCRS-5650-52CT-A#
Ethernet0/0/1
Ethernet0/0/3
Ethernet0/0/4
Ethernet0/0/5
Ethernet0/0/6
Ethernet0/0/7
Ethernet0/0/8
Ethernet0/0/9
EthernetO/O/11
Ethernet0/0/13
Ethernet0/0/15
Ethernet0/0/24
交换机B:
DCRS-5650-52CT-B(Config)#vlan30
DCRS-5650-52CT-B(Config-Vlan30)#switchportinterfaceethernet0/0/1-8
SettheportEthernet0/0/1accessvlan30successfully
SettheportEthernet0/0/5accessvlan30successfully
SettheportEthernet0/0/6accessvlan30successfully
SettheportEthernet0/0/7accessvlan30successfully
SettheportEthernet0/0/8accessvlan30successfully
DCRS-5650-52CT-B(Config-Vlan30)#exit
DCRS-5650-52CT-B(Config)#vlan40
DCRS-5650-52CT-B(Config-Vlan40)#switchportinterfaceethernet0/0/9-16
SettheportEthernet0/0/9accessvlan40successfully
SettheportEthernet0/0/10accessvlan40successfully
SettheportEthernet0/0/11accessvlan40successfully
SettheportEthernet0/0/12accessvlan40successfully
SettheportEthernet0/0/13accessvlan40successfully
SettheportEthernet0/0/14accessvlan40successfully
SettheportEthernet0/0/15accessvlan40successfully
SettheportEthernet0/0/16accessvlan40successfully
DCRS-5650-52CT-B(Config-Vlan40)#exit
DCRS-5650-52CT-B(Config)#vlan101
DCRS-5650-52CT-B(Config-Vlan101)#switchportinterfaceethernet0/0/24
SettheportEthernet0/0/24accessvlan101successfully
DCRS-5650-52CT-B(Config-Vlan101)#exit
DCRS-5650-52CT-B(Config)#
验证配置:
DCRS-5650-52CT-B#showvlan
Ethernet0/0/26
Ethernet0/0/27
10VLAN0010
20VLAN0020
100VLAN0100StaticENETEthernet0/0/24
DCRS-5650-52CT-B#
第二步:
配置交换机各vlan虚接口的IP地址
DCRS-5650-52CT-A(Config)#intvlan10
DCRS-5650-52CT-A(Config-If-Vlan10)#ipaddress192.168.10.1255.255.255.0
DCRS-5650-52CT-A(Config-lf-Vlan10)#noshut
DCRS-5650-52CT-A(Config-If-Vlan10)#exit
DCRS-5650-52CT-A(Config)#intvlan20
DCRS-5650-52CT-A(Config-If-Vlan20)#ipaddress192.168.20.1255.255.255.0
DCRS-5650-52CT-A(Config-lf-Vlan20)#noshut
DCRS-5650-52CT-A(Config-If-Vlan20)#exit
DCRS-5650-52CT-A(Config)#intvlan100
DCRS-5650-52CT-A(Config-lf-Vlan100)#ipaddress192.168.100.1
DCRS-5650-52CT-A(Config-lf-Vlan100)#noshut
DCRS-5650-52CT-A(Config-lf-Vlan100)#
DCRS-5650-52CT-A(Config-lf-Vlan100)#exit
交换机B:
DCRS-5650-52CT-B(Config)#intvlan30
DCRS-5650-52CT-B(Config-lf-Vlan30)#ipaddress192.168.30.1255.255.255.0
DCRS-5650-52CT-B(Config-lf-Vlan30)#noshut
DCRS-5650-52CT-B(Config-If-Vlan30)#exit
DCRS-5650-52CT-B(Config)#interfacevlan40
DCRS-5650-52CT-B(Config-lf-Vlan40)#ipaddress192.168.40.1255.255.255.0
DCRS-5650-52CT-B(Config-If-Vlan40)#exit
DCRS-5650-52CT-B(Config)#intvlan101
DCRS-5650-52CT-B(Config-lf-Vlan101)#exit
第三步:
配置各PC的IP地址,注意配置网关
第四步:
验证PC之间是否连通?
PC
端口
结果
原因
A:
0/0/1
0/0/9
通
Vian100
0/0/24
Vian101
B:
不通
0/0/1
查看路由表,进一步分析上一步的现象原因。
DCRS-5650-52CT-A#showiproute
Codes:
K-kernel,C-connected,S-static,R-RIP,B-BGP
O-OSPF,IA-OSPFinterarea
i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea
*-candidatedefault
C127.0.0.0/8isdirectlyconnected,Loopback
C192.168.10.0/24isdirectlyconnected,Vlan10
C192.168.20.0/24isdirectlyconnected,Vlan20
C192.168.100.0/24isdirectlyconnected,Vlan100
DCRS-5650-52CT-B#showiproute
N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2
E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea
C192.168.30.0/24isdirectlyconnected,Vlan30
C192.168.40.0/24isdirectlyconnected,Vlan40
C192.168.102.0/24isdirectlyconnected,Vlan101
第五步:
启动OSPF协议,并将对应的直连网段配置到OSPF进程中
DCRS-5650-52CT-A(config)#routerospf
DCRS-5650-52CT-A(config-router)#network192.168.10.0/24area0
DCRS-5650-52CT-A(config-router)#network192.168.20.0/24area0
DCRS-5650-52CT-A(config-router)#network192.168.100.0/24area0
DCRS-5650-52CT-A(config-router)#exit
DCRS-5650-52CT-B(config)#routerospf
DCRS-5650-52CT-B(config-router)#network192.168.30.0/24area0
DCRS-5650-52CT-B(config-router)#network192.168.40.0/24area0
DCRS-5650-52CT-B(config-router)#network192.168.101.0/24area0DCRS-5650-52CT-B(config-router)#exit
O192.168.30.0/24[110/20]via192.168.100.2,Vlan100,00:
00:
23
O192.168.40.0/24[110/20]via192.168.100.2,Vlan100,00:
(O代表ospf学习到的路由网段)
127.0.0.0/8isdirectlyconnected,Loopback
O192.168.10.0/24[110/20]via192.168.100.1,Vian101,00:
O192.168.20.0/24[110/20]via192.168.100.1,Vian101,00:
C192.168.30.0/24isdirectlyconnected,Vian30
C192.168.40.0/24isdirectlyconnected,Vian40
C192.168.100.0/24isdirectlyconnected,Vian101
第六步:
七、注意事项和排错
在配置、使用OSPF协议时,可能会由于物理连接、配置错误等原因导致OSPF协议
未能正常运行。
因此,用户应注意一下要点:
首先应该保证物理连接的正确无误;
其次,保证接口和链路协议是UP(使用showinterface命令);
然后在各接口上配置不同网段的IP地址;
然后,先启动OSPF协议(使用routerospf命令)再在相应接口配置所属OSPF域;
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 实训二 十四 三层 交换机 OSPF 动态 路由