1

I'm looking for a way to freely control the administrative and operational status of a virtual interface as seen by a snmp get requests:

$ snmptable -c public -v 2c myserver iftable
SNMP table: IF-MIB::ifTable

ifIndex ifDescr           ifType ifMtu   ifSpeed   ifPhysAddress ifAdminStatus ifOperStatus ifLastChange ifInOctets ifInUcastPkts ifInNUcastPkts ifInDiscards ifInErrors ifInUnknownProtos ifOutOctets ifOutUcastPkts ifOutNUcastPkts ifOutDiscards ifOutErrors ifOutQLen              ifSpecific
   1     vr0   ethernetCsmacd  1500 100000000 0:0:24:c9:db:40            up           up 0:0:00:00.00   94903723        968537              0            0          0                 0     6459058          46963               0             0           0         0 SNMPv2-SMI::zeroDotZero
   2     vr1   ethernetCsmacd  1500 100000000 0:0:24:c9:db:41            up           up 0:0:00:00.00    9229335         94583              0            0          0                 0      423683           4745               0             0           0         0 SNMPv2-SMI::zeroDotZero
   3     vr2   ethernetCsmacd  1500 100000000 0:0:24:c9:db:42          down         down 0:0:00:00.00          0             0              0            0          0                 0           0              0               0             0           0         0 SNMPv2-SMI::zeroDotZero
   4     vr3   ethernetCsmacd  1500 100000000 0:0:24:c9:db:43          down         down 0:0:00:00.00          0             0              0            0          0                 0           0              0               0             0           0         0 SNMPv2-SMI::zeroDotZero
   5    ral0        ieee80211  2290  54000000  0:12:e:62:81:c            up           up 0:0:00:00.00          0             0              0            0          0                 0     1451131         277025               0             0          98         0 SNMPv2-SMI::zeroDotZero
   6     lo0 softwareLoopback 16384         0                            up           up 0:0:00:00.00      67553           138              0            0          0                 0       67553            138               0             0           0         0 SNMPv2-SMI::zeroDotZero
   7   wlan0   ethernetCsmacd  1500  48000000  0:12:e:62:81:c            up           up 0:0:00:00.00   10313667        164339              0            0          0                 0           0          10900               0             0           0         0 SNMPv2-SMI::zeroDotZero

I want to be able to control, from a script, both the statuses of an interface.

For a physical interface Admin up means ifconfig iface up has been issued, whereas Oper up means the (layer 1) network link is active.

When I create another loopback admin and oper status are always identical. And I need the possibility of admin up and oper down (but not the opposite). This seems possible with gif or gre interfaces, and I could glue something together with those, but I didn't find an easy/short way of doing this.

In case you're wondering, the reason why is because the server is 24/7 SNMP monitored by an external company. If I want them to monitor an extra SNMP MIB we would need to go through the costly process of development, writing instructions, training and testing. Whereas the monitoring of network interfaces is a standard service and I could obtain the same result (monitoring of the non-standard service) by writing a script that sets the status of a virtual interface accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.