欢迎来到天天文库
浏览记录
ID:51717727
大小:36.83 KB
页数:13页
时间:2020-03-15
《项目实践路由交换命令.docx》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、交换机SW1配置Router>用户模式Router>enable进入特权模式Router#configureterminal进入全局模式Enterconfigurationcommands,oneperline.EndwithCNTL/Z.Router(config)#hostnameSW1重命名为SW1SW1(config)#enablepasswordcisco为特权模式设置明文密码ciscoSW1(config)#interfacevlan1设置SW1管理IP地址SW1(config-if)#ipaddSW1(config-if)#ipad
2、dress192.168.1.2255.255.255.0SW1(config-if)#noshutdown激活SW1(config-if)#end直接退到特权模式*Mar100:02:48.575:%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsoleSW1#vlandatabase进入VLAN数据库SW1(vlan)#vlan2name2添加VLAN2VLAN2added:Name:2SW1(vlan)#vlan3name3添加VLAN3VLAN3added:Name:3SW1(vlan)#vlan4na
3、me4添加VLAN4VLAN4added:Name:4SW1(vlan)#exit退出APPLYcompleted.Exiting....SW1#configterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.SW1(config)#interfacef0/2进入f0/2接口模式SW1(config-if)#switchportaccessvlan2添加至VLAN2SW1(config-if)#exitSW1(config)#interfacef0/3进入f0/3接口模式SW1(
4、config-if)#switchportaccessvlan3添加至VLAN3SW1(config-if)#exitSW1(config)#interfacef0/4进入f0/4接口模式SW1(config-if)#switchportaccessvlan4添加至VLAN4SW1(config-if)#exitSW1(config)#interfacef0/0进入f0/0接口模式SW1(config-if)#switchportmodetrunk接口设置为永久中继模式*Mar100:06:00.087:%DTP-5-TRUNKPORTON:Po
5、rtFa0/0hasbecomedot1qtrunkSW1(config-if)#exitSW1(config)#interfacef0/1进入f0/1接口模式SW1(config-if)#switchportmodetrunk接口设置为永久中继模式*Mar100:06:14.695:%DTP-5-TRUNKPORTON:PortFa0/1hasbecomedot1qtrunkSW1(config-if)#end*Mar100:06:20.279:%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsoleSW1#
6、showrunning-configinterfacef0/2查看接口f0/2所属VLANBuildingconfiguration...Currentconfiguration:59bytes!interfaceFastEthernet0/2switchportaccessvlan2endSW1#showinterfacef0/0switchport查看端口模式Name:Fa0/0Switchport:EnabledAdministrativeMode:trunkOperationalMode:trunkAdministrativeTrunki
7、ngEncapsulation:dot1qOperationalTrunkingEncapsulation:dot1qNegotiationofTrunking:DisabledAccessModeVLAN:0((Inactive))TrunkingNativeModeVLAN:1(default)TrunkingVLANsEnabled:ALLTrunkingVLANsActive:1-4Priorityforuntaggedframes:0Overridevlantagpriority:FALSEVoiceVLAN:noneAppliance
8、trust:noneSW1#copyrunning-configstartup-config保存Destinationfilename[
此文档下载收益归作者所有