--交换机配置
int fa0/ --交换机和路由器连接的接口
switchport mode trunk --路由器配置
enable conf t
int fa0/0.1 --路由器接口的子接口
encapsulation dotlq
ip address 192.168.0.1 255.255.255.0 --网络号和vlan10号的一致 int fa0/0.2
encapsulation dotlq
ip address 192.168.1.1 255.255.255.0 int fa0/0.3
encapsulation dotlq
ip address 192.168.2.1 255.255.255.0 exit
int fa0/
no shutdown