Symptom
Unable to remove switchport mode access and switchport nonegotiate from interface at the same time.
Conditions
when setting to delete a configuration from an IF with "switchport mode" and "switchport nonegotiate" set.
This occurs both in the CLI and when attach template.
Workaround
Delete switchport nonegotiate first, then delete "switchport nonegotiate".
Then delete "switchport mode".
The same applies to templates.
Further Problem Description
Router#sh run interface GigabitEthernet 0/1/0
Building configuration...
Current configuration : 120 bytes
!
interface GigabitEthernet0/1/0
switchport mode access <<<<<<<<<<<<<<
switchport nonegotiate <<<<<<<<<<<<<<
end
Router#conf
Router#config-
admin connected from 127.0.0.1 using console on Router
Router(config)# interface GigabitEthernet0/1/0
Router(config-if)# no switchport mode access <<<<<<<<<<<<<<
Router(config-if)# no switchport nonegotiate <<<<<<<<<<<<<<
Router(config-if)# com
Aborted: inconsistent value: Device refused one or more commands:
no switchport mode access
^
% Invalid input detected at '^' marker.
Component Response: "
Command rejected: An interface must be configured to the "Access" or "Trunk" modes to be configured to "NoNegotiate.""
Router(config-if)#