Email Subscription Notifications Suspended Temporarily
We are in the process of making navigation in the Servers and Operating Systems forums simpler and more direct. While doing this, we have to temporarily suspend email notifications for subscriptions. If you are subscribed to one or more discussion boards or blogs in the community, please check them daily to see new content. Notifications will be turned back on in a few days. We apologize for any inconvenience this may cause. Thanks, Warren_Admin
Switches, Hubs, and Modems
cancel
Showing results for 
Search instead for 
Did you mean: 

Untagging at large

André Beck
Honored Contributor

Untagging at large

Hi,

consider I have a switch port P that is a classic inter switch link VLAN trunk, with the default VLAN untagged and all other VLANs tagged, where "all other" is a number beyond 60 or such. Now I have to reassign this port to be an access port (untagged in some arbitrary single VLAN). How am I supposed to do this efficiently on the CLI?

Please note that "Use the menu" is no option since it fails to work correctly when the VLAN count exceeds some arbitrary limit, failing to display VLANs beyond that number. It's not even clear what would happen if I made changes in this truncated display and save them. Are the remaining VLANs unchanged? Do they lose their assignments?

So what remains is the CLI (just assume emergency fix mode connected serially to a switch without working LAN, exactly *because* you broke it).

Is there really no other solution but to enter

no vlan X tagged P
no vlan Y tagged P
no vlan Z tagged P
[...]

maybe hundreds of times over, costing valuable minutes of your time and being in grave danger of losing your concentration and forgetting something or even break it (like in accidentally creating a sole "no vlan Q" statement)?

I have overlooked something, haven't I?

TIA,
Andre.
4 REPLIES
Pieter 't Hart
Honored Contributor

Re: Untagging at large

is it an option to first
- save the current config
- edit this file
(no hurry at this moment, plenty of checks possible)
- erase the config
- paste the new config from the file ?
Igor Ybema
Advisor

Re: Untagging at large

I would just create these commands in a notepad (or excel sheet if automation is needed) and then paste it in the CLI (after checking it twice).
André Beck
Honored Contributor

Re: Untagging at large

Hi

Pieter writes:

> is it an option to first
> - save the current config
> - edit this file
> (no hurry at this moment, plenty of checks
> possible)
> - erase the config
> - paste the new config from the file ?

Not really. I cannot erase the config and paste it reliably again on HP gear (let alone have a merging "copy tftp running-config" as found on IOS), and "copy tftp startup" forces a reload (instantly). It's all way less flexible than IOS...

Igor writes:

> I would just create these commands in a
> notepad (or excel sheet if automation is
> needed) and then paste it in the CLI
> (after checking it twice).

That's essentially what I fell back to, though it's ugly. I wrote a small shell script that makes use of seq(1) and printf(1) which allowed me to create large bunches of commands of my choosing with port ranges of my choosing. Then I verified the result and pasted it in steps of some 10 to 20 lines which worked as expected.

Did the job, but imagine how much time I could have saved by a simple

switchport mode access

in this case. Of course, I wouldn't even have to use that as the intention was to get a truly routed interface and an IOS L3 switch would just have done it given

no switchport
ip address ...

instead of forcing me to make the ISLs access ports bearing individual dedicated VLANs, bombing STP away on these ports using BPDU filters and then confing IP on top of the VLAN SVIs. But he, it works, with only 50% of the 6200yl crashing unexpectedly during the transformation steps (I assume on a SVI that has an ip helper configured, when the last IP address on that interface is removed or there is no IP yet and the interface receives a DHCP request, the switch just reboots)...

Thanks anyway,
Andre.
Pieter 't Hart
Honored Contributor

Re: Untagging at large

Hi Andre,
good you got this going.
and thanks for reporting back.

the "paste config from file" was meant to be in the terminal-emulator, as if you were typing the commands yourself, not upload the full config from a tftp server.

as an alternative to creating scripts I succesfully use the capabilities of a spreadsheet.

- put "no vlan " in one column (or even two seperate columns)
- "vlanX" in the second
- " tagged P" in the third
- select the three cells
- select the cross in the bottom right corner
- drag this as many cells down as you want
- excel can automatically increment de "x"
(if it increments the "p" too do
- save this as text file using spaces as colum separator.

Pieter