资源预览内容
第1页 / 共8页
第2页 / 共8页
第3页 / 共8页
第4页 / 共8页
第5页 / 共8页
第6页 / 共8页
第7页 / 共8页
第8页 / 共8页
亲,该文档总共8页全部预览完了,如果喜欢就下载吧!
资源描述
将交换机和路由器连接起来如下图:PC0-SW0-fa0/1 (192.168.10.10/24)PC0-SW0-fa0/11 (192.168.20.10/24)SW0(Gi1/1)-RO0(Fa0/0)我们首先来配置交换机:SwitchSwitchenSwitchenable Switch#configConfiguring from terminal, memory, or network terminal? Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#inRASwitch(config)#in raSwitch(config)#in range faSwitch(config)#in range fastEthernet 0/1-10Switch(config-if-range)#swSwitch(config-if-range)#switchport ? access Set access mode characteristics of the interface mode Set trunking mode of the interface native Set trunking native characteristics when interface is in trunking mode nonegotiate Device will not engage in negotiation protocol on this interface port-security Security related command trunk Set trunking characteristics of the interface voice Voice appliance attributesSwitch(config-if-range)#switchport acSwitch(config-if-range)#switchport access ? vlan Set VLAN when interface is in access modeSwitch(config-if-range)#switchport access vlSwitch(config-if-range)#switchport access vlan 10% Access VLAN does not exist. Creating vlan 10Switch(config-if-range)#in range fastEthernet 0/11-20Switch(config-if-range)#switchport access vlan 20% Access VLAN does not exist. Creating vlan 20Switch(config-if-range)#Z%SYS-5-CONFIG_I: Configured from console by consoleSwitch(config)#inSwitch(config)#interface giSwitch(config)#interface gigabitEthernet 1/1Switch(config-if)#swSwitch(config-if)#switchport ? access Set access mode characteristics of the interface mode Set trunking mode of the interface native Set trunking native characteristics when interface is in trunking mode nonegotiate Device will not engage in negotiation protocol on this interface port-security Security related command trunk Set trunking characteristics of the interface voice Voice appliance attributesSwitch(config-if)#switchport acSwitch(config-if)#switchport access ? vlan Set VLAN when interface is in access modeSwitch(config-if)#switchport moSwitch(config-if)#switchport mode ? access Set trunking mode to ACCESS unconditionally dynamic Set trunking mode to dynamically negotiate access or trunk mode trunk Set trunking mode to TRUNK unconditionallySwitch(config-if)#switchport mode trSwitch(config-if)#switchport mode trunk ? Switch(config-if)#switchport mode trunk Switch(config-if)#swSwitch(config-if)#switchport ? access Set access mode characteristics of the interface mode Set trunking mode of the interface native Set trunking native characteristics when interface is in trunking mode nonegotiate Device will not engage in negotiation protocol on this interface port-security Security related command trunk Set trunking characteristics of the interface voice Voice appliance attributesSwitch(config-if)#switchport trSwitch(config-if)#switchport trunk ? allowed Set allowed VLAN characteristics when interface is in trunking mode native Set trunking native characteristics when interface is in trunking modeSwitch(config-if)#switchport trunk alSwitch(config-if)#switchport trunk allowed ? vlan Set allowed VLANs when interface is in trunking modeSwitch(config-if)#switchport trunk allowed vlSwitch(config-if)#switchport trunk allowed vlan ? WORD VLAN IDs of the allowed VLANs when this port is in trunking mode add add VLANs to the current list all all VLANs except all VLANs except the following none no VLANs remove remove VLANs from the current listSwitch(config-if)#switchport trunk allowed vlan alSwitch(config-if)#switchport trunk allowed vlan all ? Switch(config-if)#switchport trunk allowed vlan all Switch(config-if)#下面我们来看下配置:Switch#show running-config Building configuration.Current configuration : 1488 bytes!version 12.2no service password-encryption!hostname Switch!interface FastEthernet0/1 switchport access vlan 10!interface FastEthernet0/2 switchport access vlan 10!interface FastEthernet0/3 switchport access vlan 10!interface FastEthernet0/4 switchport access vlan 10!interface FastEthernet0/5 switchport access vlan 10!interface FastEthernet0/6 switchport access vlan 10!interface FastEthernet0/7 switchport access vlan 10!interface FastEthernet0/8 switchport access vlan 10!interface FastEthernet0/9 switchport access vlan 10!interface FastEthernet0/10 switchport access vlan 10!interface FastEthernet0/11 switchport access vlan 20!interface FastEthernet0/12 switchport
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号