Netgear switches don’t have a console. Users are forced to use the web portal on the switch which is often slow to respond and doesn’t support some of the latest HTML libraries to actually look and feel like a decent web app. As such most sysadmins I’ve worked with hate Netgear and would rather use something with a CLI console. However, I found that Netgear actually has a quite decent command line way to manipulate it. SNMP. Here are some of the tips I’ve learned around how to manipulate a Netgear switch.
You can develop your own tools using the below information to develop centralized network management, or you can purchase one. There are a large amount of tools that can work with SNMP to manipulate switches. Software like Solarwinds would work well with Netgear.
What is the index of the port we are playing with
snmpwalk -v2c -c xxxxx 10.0.0.x IF-MIB::ifName IF-MIB::ifName.1 = STRING: 1/g1 IF-MIB::ifName.2 = STRING: 1/g2 IF-MIB::ifName.3 = STRING: 1/g3
You’re looking for the .1 .2 and .3 to know the index number that matches the port 1/gX that you want to muck with
Label a port quickly
snmpset -v 2c -c xxxxx 10.0.0.x IF-MIB::ifAlias.53 s "My Name" IF-MIB::ifAlias.53 = STRING: My Name
Using PoE to turn devices on or off
snmpset -v2c -c xxxxxx 10.0.0.x 1.3.6.1.2.1.105.1.1.1.3.1.8 i 1 SNMPv2-SMI::mib-2.105.1.1.1.3.1.8 = INTEGER: 1
The value 1 turns a device on. The value 2 turns a device off.
Set the VLAN the port uses
To configure a port on a particular VLAN, you have to first set its PVID and then set it’s port as untagged on that VLAN.
Setting the PVID
snmpset -v2c -c foobar 10.0.0.x 1.3.6.1.2.1.17.7.1.4.5.1.1.8 u 1; done SNMPv2-SMI::mib-2.17.7.1.4.5.1.1.8 = Gauge32: 1 The value, 1, is the VLAN ID you want to have the port on
Setting the port as untagged for a VLAN
Still playing with these: http://www.oidview.com/mibs/0/Q-BRIDGE-MIB.html