Which is the best way to retrieve a list of ports belonging to a vlan?

  • 0
  • 1
  • Question
  • Updated 4 years ago
I need to set port parameters on different switch and I need to configure only the ports belonging to a given VLAN. And more than this, only to Untagged ports.
So which is the best way ti build such list? Scanning port by port and mark which belong to the vlan? Scanning the vlan instead for untagged ports?
Thanks for the suggesions!
Photo of Il Davo

Il Davo

  • 110 Points 100 badge 2x thumb

Posted 5 years ago

  • 0
  • 1
Photo of Paul Russo

Paul Russo, Alum

  • 9,694 Points 5k badge 2x thumb
Hello Davo

If you do a show on the VLAN name for example show default it will list all of the ports in that VLAN that are tagged and untagged.

Does that help or am I misreading your question

Thanks
P
Photo of Il Davo

Il Davo

  • 110 Points 100 badge 2x thumb
Sorry Paul, I need to give you more information. I need to configure rate limit parameters on all the untagged ports belonging to a VLAN. I have a Ridgeline and I'm planning to use one or more script. The script need to collect the untagged ports on several devices ranging from 8 to 48 ports and also a bunch of Black Diamond switches. Since scripting is something I don't do very often I'm looking for suggestions. Is it better to parse the show vlanname command or is it better to cycle all the ports of the switch looking for the given vlan? I guess the first approach is better.
Then i need to put the ports in a list, do you know if there are some examples?
Thanks for your time.
Davo

Photo of Il Davo

Il Davo

  • 110 Points 100 badge 2x thumb
Bump!
Any suggestion?