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 ;值越小越好;