- Community Home
- >
- Networking
- >
- Switching and Routing
- >
- Aruba & ProVision-based
- >
- Automating VLAN port assignment via SNMP or PEXPEC...
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
07-10-2013 07:31 AM
07-10-2013 07:31 AM
Automating VLAN port assignment via SNMP or PEXPECT?
I have a ProCurve switch (8212) with nine modules (all 24-port 1 Gb/s RJ45) (Software revesion: K.15.06.0017, ROM version K.15.29) which supports several clusters. We would like to automate the assignment of ports to VLAN's without requiring a human to manually login and assign ports. This primarily occurs when we want to assign host duties to a different node using high-availability software.
I have tried to use Expect/Pexpect to interact with the switch, but based on the log output from Pexpect it appears that something that can be done manually, only generates scores of control characters which Pexpect can't deal with - since it doesn't match the human readable output when done manually.
The other option I can see is perhaps using 'snmpset' to assign the correct port to the correct VLAN. But I can't find any information on this - only tangentally related questions from others.
So how can I programatically (as opposed to manually logging into the switch) assign, for example, Port A23 to VLAN 301?
- Tags:
- VLAN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2013 06:10 PM
07-10-2013 06:10 PM
Re: Automating VLAN port assignment via SNMP or PEXPECT?
If you use RANCID (http://www.shrubbery.net/rancid/) and set your switch type correctly, you should be able to use an hlogin script for such tasks.
I created some scripts to do this from flat text files that i could probably dig up if you need some pointers.
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2013 06:33 AM
07-16-2013 06:33 AM
Re: Automating VLAN port assignment via SNMP or PEXPECT?
Paul,
I'd be interested in any sample scripts that you have that show doing something similar to what I'm trying to do, i.e. change VLAN port assignments.
I looked at RANCID but it appeared to mainly be used for gathering information from a switch, not setting information on it. If I can't find a way to do this with SNMP or pexpect, I may have no choice but to try that route and, after spending a lot of time learning a whole new package & syntax, hope that it works for this issue.
I'm still surprised/perplexed that the HP switches produce non-standard responses such that pexpect scripts won't work with them.
I'd also still like any information anyone could give me on how to do what I want using SNMP with the switch since this would obviate the need to install a separate software package (i.e. RANCID) solely for the purposes of accessing a single switch, given that we already have SNMP and pexpect on the system.
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2013 02:55 PM
07-16-2013 02:55 PM
Re: Automating VLAN port assignment via SNMP or PEXPECT?
Hi Tony,
Here's the code: https://github.com/paulgear/procurve-rancid (Insert standard disclaimers here.)
I haven't seen a lot of environments which used SNMP writes to do similar things. I'm sure many things are possible to do that way, but i'll have to leave that to others with more SNMP expertise.
Paul