跨交換機相同VLAN間通訊
Switch>en
Switch>enable
Switch#conf
Switch#configure
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SWA
SWA(config)#in v
SWA(config)#in vlan 1
SWA(config-if)#ip add 192.168.1.4 255.255.255.0
SWA(config-if)#no shut
SWA(config-if)#no shutdown
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
SWA(config-if)#exit
SWA(config)#v
SWA(config)#vl
SWA(config)#vlan 100
SWA(config-vlan)#exit
SWA(config)#vl
SWA(config)#vlan 200
SWA(config-vlan)#exit
SWA(config)#in r
SWA(config)#in range f0/1-8
SWA(config-if-range)#switchport m
SWA(config-if-range)#switchport mode a
SWA(config-if-range)#switchport mode access
SWA(config-if-range)#sw
SWA(config-if-range)#switchport a
SWA(config-if-range)#switchport access v
SWA(config-if-range)#switchport access vlan 100
SWA(config-if-range)#exit
SWA(config)#in range f0/9-16
SWA(config-if-range)#sw
SWA(config-if-range)#switchport m
SWA(config-if-range)#switchport mode a
SWA(config-if-range)#switchport mode access
SWA(config-if-range)#sw
SWA(config-if-range)#switchport a
SWA(config-if-range)#switchport access v
SWA(config-if-range)#switchport access vlan 200
SWA(config-if-range)#exit
SWAconfig)#in f0/24
SWA(config-if)#sw
SWA(config-if)#switchport m
SWA(config-if)#switchport mode t
SWA(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
SWA(config-if)#sw
SWA(config-if)#switchport t
SWA(config-if)#switchport trunk a
SWA(config-if)#switchport trunk allowed v
SWA(config-if)#switchport trunk allowed vlan a
SWA(config-if)#switchport trunk allowed vlan al
SWA(config-if)#switchport trunk allowed vlan all
SWA(config-if)#exit
SWA(config)#
另外一個交換機也是相同配置方法 只需要修改IP地址而已!
轉載於:https://blog.51cto.com/yangfusheng/1083315