HPE Aruba Networking & ProVision-based
1832237 Members
2272 Online
110041 Solutions
New Discussion

Purge VLAN-Config on one Port

 
prauscher
New Member

Purge VLAN-Config on one Port

Hello,

 

i am looking for an easy way to configure a port with a given set of vlans. Background is that I configure the switches via a script using SSH. On Cisco i just set the new VLANs as a per-port-setting, but on my hps (ProCurve 2848 / 2824) using the latest firmware i need to set the tagging per-vlan, so i would need to read which vlans are tagged on one port and unset them on that port using the no-prefix. Thats hard work and i do not like hard (and fuzzy) work.

 

Related: Can I advise the switch to do some kind of commit? e.g. let me write my new config and applies it after all lines are recieved?

 

Thank you,

prauscher

1 REPLY 1
paulgear
Esteemed Contributor

Re: Purge VLAN-Config on one Port

Hi prauscher,

 

If you're working mostly with untagged (access) ports, the story is good: you simply go to the VLAN you want the port to be in, tell it the VLAN is untagged on that port, and it removes it from all the other VLANs.  e.g. If port 1 is in VLAN 10 and needs to be in VLAN 20:

 

vlan 20

   untagged 1

 

If you're dealing with tagged (trunk) ports, it's a lot more complex.  You need to remove the tag on one VLAN and add to the other.  e.g. If port 1 is tagged in VLAN 10 and needs to be tagged in VLAN 20 instead:

 

vlan 10

   no tagged 1

vlan 20

   tagged 1

 

This is the way the VLAN tagging model works with ProCurve.  If you want more Cisco-like behaviour, choose Comware switches instead.

 

I wrote a set of scripts ot help me with port-to-VLAN assignments on ProCurve.  You can find them at https://github.com/paulgear/procurve-rancid

Regards,
Paul