1、22 23 SW3(config-line)#nologin 24 25 SW3(config-line)#privilegelevel15 26 27 SW3(config-line)#exi 28 29 SW3(config)#end SW4的基本信息配置30 Switch/普通模式 31 32 Switchenable/进入特权模式 33 34 Switch#configureterminal/进入全局配置模式 35 36 Enterconfigurationcommands,oneperline.EndwithCNTL/Z. 37 38 Switch(config)#hostnameS
2、W4/配置主机命名 39 40 SW4(config)#noipdomain-lookup/禁域名查找 41 42 SW4(config)#lineconsole0/进入Console口线路模式 43 44 SW4(config-line)#loggingsynchronous/Console信息显示自动换行 45 46 SW4(config-line)#nologin/配置Console口登录不认证 47 48 SW4(config-line)#privilegelevel15/配置Telnet登录为最高特权级别enable不需要密码 49 50 SW4(config-line)#exi 5
3、1 52 SW4(config)#linevty04 53 54 SW4(config-line)#nologin 55 56 SW4(config-line)#privilegelevel15 57 58 SW4(config-line)#exi 59 60 SW4(config)#end RT5的基本信息配置61 Router62 63 Router64 65 Router#configureterminal 66 67 Enterconfigurationcommands,oneperline.EndwithCNTL/Z. 68 69 Router(config)#hostnameRT5
4、 70 71 RT5(config)#noipdomain-lookup 72 73 RT5(config)#lineconsole0 74 75 RT5(config-line)#loggingsynchronous 76 77 RT5(config-line)#nologin 78 79 RT5(config-line)#privilegelevel15 80 81 RT5(config-line)#exi 82 83 RT5(config)#linevty04 84 85 RT5(config-line)#nologin 86 87 RT5(config-line)#privilegel
5、evel15 88 89 RT5(config-line)#exi 90 91 RT5(config)#end 2、二层网络全局配置SW3的Vlan配置1 SW3#vlandatabase/进入Vlan配置模式 3 SW3(vlan)#vlan8/创建Vlan8、10、11 5 VLAN8added:7 Name:VLAN0008 9 SW3(vlan)#vlan10 11 VLAN10added:13 Name:VLAN0010 15 SW3(vlan)#vlan11 17 VLAN11added:19 Name:VLAN0011 21 SW3(vlan)#exi 23 SW3#showvl
6、an-switch/查看Vlan配置信息 25 VLANNameStatusPorts 27 - 29 1defaultactiveFa0/0,Fa0/1,Fa0/2,Fa0/3 30 31 Fa0/4,Fa0/5,Fa0/6,Fa0/7 32 33 Fa0/8,Fa0/9,Fa0/10,Fa0/11 34 35 Fa0/12,Fa0/13,Fa0/14,Fa0/15 36 37 8VLAN0008active 38 39 10VLAN0010active 40 41 11VLAN0011active SW4的Vlan配置42 SW4#vlandatabase/进入Vlan配置模式 44 SW
7、4(vlan)#vlan8/创建Vlan8、10、11 46 VLAN8added:48 Name:50 SW4(vlan)#vlan10 52 VLAN10added:54 Name:56 SW4(vlan)#vlan11 58 VLAN11added:60 Name:61 62 SW4(vlan)#exi 63 64 SW4#showvlan-switch/查看Vlan配置信息 65 66 VLANNameStatusPorts 67 68 - 69 70 1defaultactiveFa0/0,Fa0/1,Fa0/2,Fa0/3 71 72 Fa0/4,Fa0/5,Fa0/6,Fa0/7
8、 73 74 Fa0/8,Fa0/9,Fa0/10,Fa0/11 75 76 Fa0/12,Fa0/13,Fa0/14,Fa0/15 77 78 8VLAN0008active 79 80 10VLAN0010active 81 82 11VLAN0011active 3、二层链路调试SW3的Access接口配置1 SW3#configureterminal 3 Enterconfigurationcommands,oneperline.EndwithCNTL/Z. 5 SW3(config)#interfa0/10/进入接口fa0/10配置 7 SW3(config-if)#switchpo
9、rtmodeaccess/配置接口为Access模式 9 SW3(config-if)#switchportaccessvlan10/把接口划到Vlan10 11 SW3(config-if)#exi 13 SW3(config)#interfa0/11/进入接口f0/11配置 15 SW3(config-if)#switchportmodeaccess/配置接口为Access模式 17 SW3(config-if)#switchportaccessvlan11/把接口划到Vlan11 19 SW3(config-if)#exi SW4的Access接口配置20 SW4# 21 22 SW4#
10、configureterminal 23 24 Enterconfigurationcommands,oneperline.EndwithCNTL/Z. 25 26 SW4(config)#interfa0/10 27 28 SW4(config-if)#switchportmodeaccess 29 30 SW4(config-if)#switchportaccessvlan10 32 SW4(config-if)#exi 34 SW4(config)#interfa0/11 36 SW4(config-if)#switchportmodeaccess 38 SW4(config-if)#s
11、witchportaccessvlan11 40 SW4(config-if)#exi SW3SW4的Trunk链路调测41 SW3(config)#interfa0/3 42 43 SW3(config-if)#switchporttrunkencapsulationdot1q/选择封装协议 44 45 SW3(config-if)#switchportmodetrunk/配置接口模式为Trunk 46 47 SW3(config-if)#switchporttrunkallowedvlanall/Trunk允许所有Vlan的信息通过 48 49 SW3(config-if)#exi 50
12、51 SW4(config)#interfa0/3 52 53 SW4(config-if)#switchporttrunkencapsulationdot1q 54 55 SW4(config-if)#switchportmodetrunk 56 57 SW4(config-if)#switchporttrunkallowedvlanall 58 59 SW4(config-if)#exi 4、二层设备网管地址配置SW3的网管接口配置5 SW3(config)#intervlan8/为SW3配置网管地址 7 SW3(config-if)#ipaddress192.168.8.130255.2
13、55.255.128 9 SW3(config-if)#noshutdown 11 SW3(config-if)#exit 13 SW3(config)#ipdefault-gateway192.168.8.129/为SW3配置网关 15 SW3(config)#end 17 SW3#showrun SW4的网管接口配置18 SW4(config)#intervlan8/为SW4配置网管地址 19 20 SW4(config-if)#ipaddress192.168.8.131255.255.255.128 22 SW4(config-if)#noshutdown 24 SW4(config-
14、if)#exi 26 SW4(config)#ipdefault-gateway192.168.8.129/为SW4配置网关 28 SW4(config)#exi 30 SW4#showipinterfacebrief/查看SW4上接口配置信息 32 InterfaceIP-AddressOK?MethodStatusProtocol 34 FastEthernet0/0unassignedYESunsetupdown 36 FastEthernet0/1unassignedYESunsetupdown 38 FastEthernet0/2unassignedYESunsetupdown 40
15、 FastEthernet0/3unassignedYESunsetupup 42 FastEthernet0/4unassignedYESunsetupdown 44 FastEthernet0/5unassignedYESunsetupdown 46 FastEthernet0/6unassignedYESunsetupdown 48 FastEthernet0/7unassignedYESunsetupdown 50 FastEthernet0/8unassignedYESunsetupdown 52 FastEthernet0/9unassignedYESunsetupdown 54
16、FastEthernet0/10unassignedYESunsetupup 56 SW4#showinterfacesstatus/查看SW4上接口的状态 58 PortNameStatusVlanDuplexSpeedType 60 Fa0/0notconnect1autoauto10/100BaseTX 62 Fa0/1notconnect1autoauto10/100BaseTX 64 Fa0/2notconnect1autoauto10/100BaseTX 66 Fa0/3connectedtrunka-fulla-10010/100BaseTX 68 Fa0/4notconnect
17、1autoauto10/100BaseTX 70 Fa0/5notconnect1autoauto10/100BaseTX 72 Fa0/6notconnect1autoauto10/100BaseTX 74 Fa0/7notconnect1autoauto10/100BaseTX 76 Fa0/8notconnect1autoauto10/100BaseTX 78 Fa0/9notconnect1autoauto10/100BaseTX 80 Fa0/10connected10a-fulla-10010/100BaseTX 82 Fa0/11connected11a-fulla-10010/
18、100BaseTX 83 84 Fa0/12notconnect1autoauto10/100BaseTX 85 86 Fa0/13notconnect1autoauto10/100BaseTX 87 88 Fa0/14notconnect1autoauto10/100BaseTX 89 90 Fa0/15notconnect1autoauto10/100BaseTX 5、三层接口配置及链路测试SW3的上连接口配置 1 SW3(config)#interfa0/1 3 SW3(config-if)#switchporttrunkencapsulationdot1q 5 SW3(config-i
19、f)#switchportmodetrunk 7 SW3(config-if)#switchporttrunkallowedvlanall 9 SW3(config-if)#switchporttrunknativevlan8/将该Trunk接口的nativeVlan改为Vlan8 13 SW3(config)#end 15 SW3#showipinterfacebrief/查看SW3上接口的配置信息 17 InterfaceIP-AddressOK?19 FastEthernet0/0unassignedYESunsetupdown 21 FastEthernet0/1unassignedY
20、ESunsetupup 23 FastEthernet0/2unassignedYESunsetupdown 25 FastEthernet0/3unassignedYESunsetupup 27 FastEthernet0/4unassignedYESunsetupdown 29 FastEthernet0/5unassignedYESunsetupdown 31 FastEthernet0/6unassignedYESunsetupdown 33 FastEthernet0/7unassignedYESunsetupdown 35 FastEthernet0/8unassignedYESu
21、nsetupdown 37 FastEthernet0/9unassignedYESunsetupdown 39 FastEthernet0/10unassignedYESunsetupup 41 FastEthernet0/11unassignedYESunsetupup 43 SW3#showinterfacesstatus/查看SW3上接口的状态 45 PortNameStatusVlanDuplexSpeedType 47 Fa0/0notconnect1autoauto10/100BaseTX 49 Fa0/1connectedtrunka-fulla-10010/100BaseTX
22、 51 Fa0/2notconnect1autoauto10/100BaseTX 53 Fa0/3connectedtrunka-fulla-10010/100BaseTX 55 Fa0/4notconnect1autoauto10/100BaseTX 57 Fa0/5notconnect1autoauto10/100BaseTX 59 Fa0/6notconnect1autoauto10/100BaseTX 60 61 Fa0/7notconnect1autoauto10/100BaseTX 63 Fa0/8notconnect1autoauto10/100BaseTX 65 Fa0/9no
23、tconnect1autoauto10/100BaseTX 67 Fa0/10connected10a-fulla-10010/100BaseTX 69 Fa0/11connected11a-fulla-10010/100BaseTX 71 Fa0/12notconnect1autoauto10/100BaseTX 73 Fa0/13notconnect1autoauto10/100BaseTX 75 Fa0/14notconnect1autoauto10/100BaseTX 77 Fa0/15notconnect1autoauto10/100BaseTX 单臂路由配置78 RT5#confi
24、gureterminal 80 Enterconfigurationcommands,oneperline.EndwithCNTL/Z. 82 RT5(config)#intere0/0/主接口对应nativevlan 84 RT5(config-if)#ipaddress192.168.8.129255.255.255.128 86 RT5(config-if)#noshutdown/打开主接口 88 RT5(config-if)#exi 90 RT5(config)#intere0/0.10/创建子接口 91 92 RT5(config-subif)#encapsulationdot1q1
25、0/封装dot1q,vlanid10,对应vlan10,vlan10的路由点。93 94 RT5(config-subif)#ipaddress192.168.10.1255.255.255.0 95 96 RT5(config-subif)#noshutdown/打开子接口 97 98 RT5(config-subif)#exi 99 100 RT5(config)#intere0/0.11/创建子接口 101 102 RT5(config-subif)#encapsulationdot1q11/封装dot1q,vlanid11,对应vlan11,vlan11的路由点 103 104 RT5(config-subif)#ipaddress192.168.11.1255.255.255.0 105 106 RT5(config-subif)#noshutdown/打开子接口 107 108 RT5(config-subif)#end
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1