VLAN間路由:ide
-多層交換機測試
一、配置網關IPspa
interface vlan 10 //配置 vlan 10 的網關IP;接口
no shutdown ip
ip address 192.168.10.254 255.255.255.0路由
interface vlan 20 it
no shutdown class
ip address 192.168.20.254 255.255.255.0配置
interface vlan 30 route
no shutdown
ip address 192.168.30.254 255.255.255.0
網關的概念就是接口
二、啓用路由功能
GW(config)# ip routing
三、配置多層交換機與普通交換機的級聯鏈路
GW(config)# interface fas0/3
GW(config-if)# switchport trunk encap dot1q
GW(config-if)# switchport mode trunk
SW1(config)#interface fas0/3
SW1(config-if)#switchport mode trunk
四、驗證與測試
GW# show ip interface brief
GW# show ip route
GW# show interface trunk
注意:
任何一個 VLAN 都對應一個 SVI(交換虛擬端口);
該VLAN中的全部的成員主機的網關IP地址都爲該 SVI
口配置的 IP 地址;
SVI:switch virtual interface ;