
交换机与路由器之间的链路为trunk,在交换机上配置 接口为trunk
Switch(config-if)#switchport mode trunk为路由器子接口进行封装
Router(config)#interface fastethernet f0/0.1
Router(config-subif)#encapsulation dot1Q 10为路由器子接口配置IP地址,作为vlan的网关
Router(config-subif)#ip address 192.168.10.254 255.255.255.0Router(config)#interface fastethernet 0/0
Router(config-if)#no shutdown