cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1494
Views
1
Helpful
8
Replies

Catalyst 1300 Not deleting commands

abc1235
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

KJK99
Level 3
Level 3

@abc1235 

Try this

no switchport access vlan

Note, there is no vid in it.

 

Kris K

View solution in original post

8 Replies 8

 

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

balaji.bandi
Hall of Fame
Hall of Fame
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.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hi @balaji.bandi even with that the previous "switchport access vlan 100" is not deleted.

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 :

https://www.cisco.com/c/en/us/td/docs/switches/campus-lan-switches-access/Catalyst-1200-and-1300-Switches/cli/C1300-cli.html

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

abc1235
Level 1
Level 1

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

Sorry, see again my privious answer, I misunderstood your request

switchport trunk allowed vlan remove 100

KJK99
Level 3
Level 3

@abc1235 

Try this

no switchport access vlan

Note, there is no vid in it.

 

Kris K

Hi @KJK99 This has worked. Thanks so much