Switch V1.0试验分解指南 目录: 1、VLAN创建 P3 2、交换机端口操作模式设置 P5 3、VLAN端口划分 P7 4、VTP设置 P8 5、STP实验 P12 6、PVST+&RSTP P15 7、STP防护 P17 8、SVI实验 P19 9、etherchannel P21 10、HSRP P24 11、DHCP P27 12、dhcp中继 P29 13、IP SLA实验 P31 14、port-Security P33 15、基于端口的802.1x P35 16、dynamic ARP inspect P41 17、VLAN ACL P43
Switch#show running-config interface fastEthernet 0/1 interface FastEthernet0/1
switchport mode dynamic desirable (端口默认的操作模式) Switch1#show interfaces fastEthernet 0/1 switchport Name: Fa0/1
Switchport: Enabled
Administrative Mode: dynamic desirable (端口默认的操作模式)
Operational Mode: static access (动态协商后的操作模式为:Access)
2、修改交换机端口的操作模式
Switch1(config)#interface fastEthernet 0/1
Switch1(config-if)#switchport mode access (手动指定交换机的端口操作模式为:access) Switch1(config)#interface fastEthernet 0/23 Switch1(config-if)#switchport mode access Switch1(config)#interface fastEthernet 0/24
Switch1(config-if)#switchport mode trunk (手动指定交换机的端口操作模式为:trunk)
Switch3(config)#interface fastEthernet 0/24
Switch3(config-if)#switchport trunk encapsulation dot1q Switch3(config-if)#switchport mode trunk
验证:
Switch1#show interfaces fa0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode:
static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: native Negotiation of Trunking: Off
Switch1#show interfaces fa0/24 switchport Name: Fa0/24
Switchport: Enabled
Administrative Mode: trunk Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On
四、应用场景
为保证二层网络的安全性,最好手动指定各端口的操作模式(虽然动态协商能简化配置), 在交换网络中,
关闭其他不用端口。
Cisco 3550、3560交换机端口的操作模式改为Trunk时,应先修改端口的封装类型为:802.1Q或ISL
Cisco 2950、2960交换机trunk端口的默认封装类型为(仅为)802.1Q