2.使用SVI实现VLAN间的通信(图)
环境:一台三层交换机,两台pc机
三层交换机的配置:
Switch》enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
创建vlan 10 20
Switch(config)#vlan 10
Switch(config-vlan)#vlan 20
Switch(config-vlan)#exit
配置SVI接口ip
Switch(config)#interface vlan 10
%LINK-5-CHANGED: Interface Vlan10, changed state to up
Switch(config-if)#ip address 192.168.10.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#interface vlan 20
%LINK-5-CHANGED: Interface Vlan20, changed state to up
Switch(config-if)#ip address 192.168.20.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
改变接口模式并加入vlan
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
Switch(config-if)#interface fastEthernet 0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
%LI