- Community Home
- >
- Networking
- >
- Legacy
- >
- Switches, Hubs, Modems
- >
- Vlan configuration via snmp on HP switches
Switches, Hubs, and Modems
1753524
Members
5302
Online
108795
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2009 12:42 AM
08-07-2009 12:42 AM
Vlan configuration via snmp on HP switches
Hello,
at first, I will explain, what I want to do. I write a bash script to configure Vlans on a HP switch, for exsample 3500yl. I want to do it via snmp.
The Vlan-names and ids, are saved on a switch, I did it manualy with cli. Now, I want to assign Vlans to ports. It works with untagged ports. I can assign Vlan to a port, when it stays untagged.
I do it with these oid:
1.3.6.1.2.1.17.7.1.4.5.1.1 (Q-BRIDGE-MIB :: dot1qPvid).
My problem is, I connot assign Vlans, if the port is already tagged. I know, how to set the port untagged, but I want to add to a tagged port with a specified Vlan another Vlan, so a tagged port can pass two oder more Vlans if it is tagged.
I do not have any problems with untagged ports, but I can not do with tagged.
If I query the switch with this OID:
1.3.6.1.2.1.17.7.1.4.3.1.2 (Q-BRIDGE-MIB :: dot1qVlanStaticEgressPorts), I get a hex string, but I don't know, how to decode it.
Have anybody some experience in it, or can give me a hint ?
Thanks a lot.
Daniel.
at first, I will explain, what I want to do. I write a bash script to configure Vlans on a HP switch, for exsample 3500yl. I want to do it via snmp.
The Vlan-names and ids, are saved on a switch, I did it manualy with cli. Now, I want to assign Vlans to ports. It works with untagged ports. I can assign Vlan to a port, when it stays untagged.
I do it with these oid:
1.3.6.1.2.1.17.7.1.4.5.1.1 (Q-BRIDGE-MIB :: dot1qPvid).
My problem is, I connot assign Vlans, if the port is already tagged. I know, how to set the port untagged, but I want to add to a tagged port with a specified Vlan another Vlan, so a tagged port can pass two oder more Vlans if it is tagged.
I do not have any problems with untagged ports, but I can not do with tagged.
If I query the switch with this OID:
1.3.6.1.2.1.17.7.1.4.3.1.2 (Q-BRIDGE-MIB :: dot1qVlanStaticEgressPorts), I get a hex string, but I don't know, how to decode it.
Have anybody some experience in it, or can give me a hint ?
Thanks a lot.
Daniel.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2009 04:27 AM
08-18-2009 04:27 AM
Re: Vlan configuration via snmp on HP switches
Convert the 64-bit hex-string to binary.
0: port is NOT present on that vlan
1: port is present on the that vlan
As for your first question, I believe that you have to set the port to UNtagged then move it to the desired VLAN using:
snmpset -v 2c -c community hostIP MemberOfVLAN-OID x "HEXstring-with-ALL-the-ports-which-you-want-turned-on"
0: port is NOT present on that vlan
1: port is present on the that vlan
As for your first question, I believe that you have to set the port to UNtagged then move it to the desired VLAN using:
snmpset -v 2c -c community hostIP MemberOfVLAN-OID x "HEXstring-with-ALL-the-ports-which-you-want-turned-on"
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP