常用写法
常用写法
switchport trunk allowed vlan 10,20,30
switchport trunk allowed vlan add 40
switchport trunk allowed vlan remove 30
switchport trunk allowed vlan except 1,1002-1005不带 add/remove 的写法是整体覆盖:直接补一条不带增量关键字的命令会把其他 VLAN 清出列表。
switchport trunk allowed vlan 支持整体设置与 add/remove 增量修改,线上变更务必用增量语法避免列表被覆盖。
switchport trunk allowed vlan 10,20,30
switchport trunk allowed vlan add 40
switchport trunk allowed vlan remove 30
switchport trunk allowed vlan except 1,1002-1005