SNMP Set a port in a vlan - HP 1905 switch (456 Views)
Reply
Occasional Contributor
Openminds
Posts: 6
Registered: ‎01-25-2011
Message 1 of 1 (456 Views)

SNMP Set a port in a vlan - HP 1905 switch

Hi,

 

I need to write a provisioning script to configure a few HP 1905 switches. They are used to connect iLO ports etc, so those small 1905's are perfect for that job.

 

I've found I can create new VLANs by using the following command: (eg: create Vlan7)

 

  $ snmpset  -c SNMPCOMMUNITY 10.1.10.99 1.3.6.1.4.1.2011.2.23.1.2.1.1.1.13.7 i 4 

 

But I can't seem to add a port in a VLAN. I've figured out I need to play with the bytes in 1.3.6.1.4.1.2011.2.23.1.2.1.1.1.3.7 (again, for VLAN 7), and found out how the ports are encoded in that value, but it seems the switch just ignores my commands. Eg:

 

  $ snmpget -c SNMPCOMMUNITY -On 10.1.10.99 1.3.6.1.4.1.2011.2.23.1.2.1.1.1.3.7
  .1.3.6.1.4.1.2011.2.23.1.2.1.1.1.3.7 = Hex-STRING: 00 00 00 00

  $ snmpset -v2c -c SNMPCOMMUNITY -On 10.1.10.99 1.3.6.1.4.1.2011.2.23.1.2.1.1.1.3.7 x "00010000" 

  .1.3.6.1.4.1.2011.2.23.1.2.1.1.1.3.7 = Hex-STRING: 00 01 00 00

   $ snmpget -c SNMPCOMMUNITY -On 10.1.10.99 1.3.6.1.4.1.2011.2.23.1.2.1.1.1.3.7 
  .1.3.6.1.4.1.2011.2.23.1.2.1.1.1.3.7 = Hex-STRING: 00 00 00 00

 

I also tried removing the port from vlan1 first, but that doesn't do anything either...

 

Anyone done this before?

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.