10-22-2024 08:59 AM
Hallo,
How can I delete a few commands from an interface? I am unable to do that, instead I get the error message below:
Test-CI1300#sh run int gi1
interface GigabitEthernet1
no switchport
switchport mode trunk
switcinterface GigabitEthernet0/1/3
switchport trunk allowed vlan 100,251,300,804-806,831,1831,2831
switchport mode trunk
service-policy output WAN-EDGE-4-CLASS
hport access vlan 100
switchport trunk native vlan 100
switchport trunk allowed vlan 100,200
!
Test-999CI1300#conf t
Test-999CI1300(config)#int gi1
Test-999CI1300(config-if)#no switchport access vlan 100
% Wrong number of parameters or invalid range, size or characters entered
Thank you
Solved! Go to Solution.
10-22-2024 10:42 AM
Try this
no switchport access vlan
Note, there is no vid in it.
10-22-2024 09:15 AM - edited 10-22-2024 09:24 AM
Hi @abc1235
If you want to remove a vlan from trunk you need to use
interface GigabitEthernet1
switchport trunk allowed vlan remove <xxx>
The command you use will work only in access interface not in trunk
10-22-2024 09:23 AM
est-CI1300#sh run int gi1
interface GigabitEthernet1
no switchport
switchport mode trunk
the port in trunk mode, that means all the VLAN allowed, there is no command to remove there.
or you may be looking to remove different port check the command do the correct port.
10-22-2024 09:26 AM
Hi @balaji.bandi even with that the previous "switchport access vlan 100" is not deleted.
10-22-2024 09:47 AM - edited 10-22-2024 09:50 AM
can you post the configuration again, show run to look what you doing there. what version code running ?
no switchport access vlan 100 < this this should work
reference config guide :
10-22-2024 09:25 AM
Thank @Flavio Miranda I do not want this port to be a L3 port, I'd like for it to be a trunk port, but while testing, I set it as an access port but now I can't relete it. I'm not even able to set the switch to default (default int x). I posted the wrong config, this is the correct one, that has both switchport access and trunk:
interface GigabitEthernet1
switchport mode trunk
switchport access vlan 100
switchport trunk native vlan 100
switchport trunk allowed vlan 100,200
10-22-2024 09:27 AM
Sorry, see again my privious answer, I misunderstood your request
switchport trunk allowed vlan remove 100
10-22-2024 10:42 AM
10-22-2024 11:56 PM
Hi @KJK99 This has worked. Thanks so much
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide