Cisco设置trunk

1.(config)#int f0/0 //进入相应接口,如果是多个接口可以使用命令 int range f0/ 0 - n
2.(config-if)#switchport trunk encapsulation {dot1q|isl }//封装dot1q或者isl(isl为思科私有,dot1q是802.1q,通用)
3.(config-if)#switchport mode trunk //配置端口为trunk类型
4.(config-if)#switchport trunk allowed vlan all //trunk允许所有vlan的流量通过   switchport trunk allowed vlan 10, 20  //指定Vlan通过

5.(en)# write 保存配置  copy running-config startup-config  --保存配置

查看所有trunk端口

show interface trunk

查看指定trunk端口

show interface */* switchport

posted @ 2021-01-31 15:57  helloQL  阅读(2124)  评论(0)    收藏  举报