思科交换机命令(如何加入和删除打trunk口的vlan)
来源:百度知道 编辑:UC知道 时间:2024/05/21 12:45:18
interface GigabitEthernet1/0/24
description to_A_B
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 12,13,2025,2032
switchport mode trunk
命令应该怎样写?
我写的是
WS3750G(config)#interface gigabitEthernet 1/0/24
WS3750G(config-if)#switchport mode trunk
WS3750G(config-if)#no switchport trunk allowed vlan add 2032
结果所有的vlan都删掉了,我又不知道该怎样加,请各位高手指点
楼上的写的什么啊 - - 我看得莫名其妙
WS3750G(config)#interface gigabitEthernet 1/0/24
WS3750G(config-if)#switchport mode trunk
WS3750G(config-if)#no switchport trunk allowed vlan add 2032
首先指出你的错误
WS3750G(config-if)#no switchport trunk allowed vlan add (这个不应该是 add 而是 all 或者是 VLAN 的ID)2032
还有 想删除它 并不是这样写的
而是把他该成原先的模式
WS3750G(config-if)#switchport mode access 这样就行了
加入你应该也会了吧
WS3750G(config-if)#interface gigabitEthernet 1/0/24
WS3750G(config-if)#switchport mode trunk
WS3750G(config-if)#switchport trunk allowed vlan 12,13
很简单的.
这么简单的问题, 100分啊, 看得我眼红哦. 呵呵.
加入端口到某个vlan
inter vlan 10
port e 1/0/1 //加入端口
如果要从某个vlan中删除某个端口,
inter vlan 10
undo port e 1/0/1 //用undo命令就可以了.
如果要把trunk口删掉. 则要先改端口为非trunk
比如,
inter e 1/0/1
undo port link-type trunk
undo port trunk per vlan all