1、根据实验需求排除故障确保PC1与PC2互通
排查思路:
1.首先确保PC机IP地址及子网掩码是否正确;网线是否有问题;
2.查看连接PC的交换机信息及端口链路状态,端口确保是开启状态;
3.依次查看交换机内部信息配置是否正确;进行修改;
4.查看命令以下:
show vlan bi
①PC1子网掩码错误,是24位;修改为27位,和PC2一致
②确保交换机SW1建立VLAN10;端口1和端口23配置正确以下:
有多余的配置所有清除!(思科)清除配置前面+no+已经配置的命令;(华为)清除配置前面+undo+已经配置的命令api
SW1(config)#vlan 10;建立; interface FastEthernet0/1 ;进入端口1; switchport mode access;将端口设置为access链路; switchport access vlan 10;将vlan10加入1端口; interface FastEthernet0/23 ;进入端口23; switchport mode trunk ;将端口设置为trunk链路; switchport trunk allowed vlan all ;容许所有vlan经过; switchport trunk allowed vlan 10 ;也可只让vlan10经过; ③确保SW2为“根”交换机并与SW3交换机之间的两条链路捆绑开启trunk链路; 修改 priority 0(值)把根抢过来; interface FastEthernet0/23 ;进入端口23; switchport mode trunk ;将端口设置为trunk链路; switchport trunk allowed vlan all ;容许所有vlan经过; switchport trunk allowed vlan 10 ;也可只让vlan10经过; interface FastEthernet0/22;进入端口22; switchport mode trunk ;将端口设置为trunk链路; switchport trunk allowed vlan all ;容许所有vlan经过; switchport trunk allowed vlan 10 ;也可只让vlan10经过; interface FastEthernet0/24 ;进入端口24; switchport mode trunk ;将端口设置为trunk链路; switchport trunk allowed vlan all ;容许所有vlan经过; switchport trunk allowed vlan 10 ;也可只让vlan10经过; spanning-tree mode rapid-pvst ;全局模式下,迅速生成树模式; spanning-tree vlan 10 priority 0;生成树VLAN 10优先级0;值越小越好;(根网桥) channel-protocol lacp ;把pagp修改为lacp; channel-group 1 mode passive;端口通道负载均衡; spanning-tree guard root;生成树保护; interface Port-channel 1 ;端口通道1; ④修改SW3交换机的 priority 4096(值);并开区trunk链路; interface FastEthernet0/22;进入端口22; switchport mode trunk ;将端口设置为trunk链路; switchport trunk allowed vlan all ;容许所有vlan经过; switchport trunk allowed vlan 10 ;也可只让vlan10经过; interface FastEthernet0/24 ;进入端口24; interface FastEthernet0/1 ;进入端口1; switchport mode access;将端口设置为access链路; switchport access vlan 10;将vlan10加入1端口; switchport mode trunk ;将端口设置为trunk链路; switchport trunk allowed vlan all ;容许所有vlan经过; switchport trunk allowed vlan 10 ;也可只让vlan10经过; spanning-tree mode rapid-pvst ;全局模式下,迅速生成树模式; spanning-tree vlan 10 priority 0;生成树VLAN 10优先级0;值越小越好;(根网桥) channel-protocol lacp ;把pagp修改为lacp; channel-group 1 mode passive;端口通道负载均衡; spanning-tree guard root;生成树保护; interface Port-channel 1 ;端口通道1; priority 0 ;值越小越好;