This is in Cisco Packet Tracer – this is not a real switch.
Default interface config on Cisco Switch 2960 looks like this
!
interface FastEthernet0/10
!
Then I put it in switchport mode access
!
interface FastEthernet0/10
switchport mode access
!
However, when I tried to remove it with no switchport mode access
, I was getting the following error.
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int f0/10
Switch(config-if)#no switchport mode access
Command rejected: An interface must be configured to the Access or Trunk modes to be configured to NoNegotiate.
Switch(config-if)#
I've also tried default interface f0/10
but didn't work
Switch(config)#default interface f0/10
Building configuration...
Command rejected: An interface must be configured to the Access or Trunk modes to be configured to NoNegotiate.
Interface FastEthernet0/10 set to default configuration
Switch(config)#
Switch(config)#do sh run
...
!
interface FastEthernet0/10
switchport mode access
!
...
What is the right way to remove switchport mode access
from the config?
Best Answer
By right, you should be able to remove it with
no switchport mode access
.However, when I test similar config on Packet Tracer, I'm getting exactly similar error message.
Are you using the actual switch (hardware) or Packet Tracer?
Anyway, here is how I solved it in Packet Tracer.
Before
Replicate issue
Exactly similar issue!
Solution in CPT
Verify it