switchport access vlan 22 moves the port and never creates VLAN 22, so the port and the running-config disagree #1535
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1535
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What a real switch does
Assigning an access port to a VLAN that does not exist creates that VLAN. The console says so in two lines, and applies the assignment anyway:
show vlanlists VLAN 22 afterwards, under the generated name, andshow running-configcarries thevlan 22line.Evidence:
switchport access vlancommand forces the creation of a VLAN if it does not already exist on the switch" — https://www.ii.pwr.edu.pl/~kano/course/module3/3.2.1.3/3.2.1.3.htmlWhat this console does
switchport access vlan 22moves the port and saysAccess VLAN 22 on Fa0/1. Nothing else.show vlangrows a row anyway, because that table is built from the port list as well as fromconfig.vlans— so the port and the table agree — whileshow running-configprints novlan 22line. That is the gap #1232 closed for VLANs somebody typedvlan 22for, left open on the one command that can create a VLAN without anybody typingvlan.Consequence: a config saved from the device is not self-contained, and pasting it into a fresh switch loses the VLAN.
Expected
vlan <id>would have given it;switchport access vlan 22creates VLAN 22, and says so the way the device does (#1535) #1536