【CCNA】这两个命令有什么区别?

来源:百度知道 编辑:UC知道 时间:2024/05/24 22:55:00
switchport trunk allowed vlan add 10和switchport trunk allowed vlan 10,也就是加add和没加有什么区别?

switchport trunk allowed vlan 10 是允许Vlan 10通过trunk
switchport trunk allowed add vlan 10 是添加vlan 10
add 是和remove相对的。

如:
Switch(config)# interface fa0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan remove 101-499
Switch(config-if)# switchport trunk allowed vlan add 250
Switch(config-if)# end
Switch# show interface fa0/1 switchport allowed-vlan
-------"1-100,250,500-1005"