RE: Network interfaces rename

David Hauck <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <FCC5AC80E299464B82E1345E2C10FC9D7D8C7B04@S1P5DAG4C.EXCHPROD.USA.NET>
Hi Andreas,
 
On Tuesday, November 03, 2015 11:39 PM, Andreas Haralambopoulos wrote:
> Is it possible to change the network interfaces names ( or to create
> ‘aliases’) ?
> 
> for example
> 
> snmpwalk -v2c -c password 127.0.0.1
> 
> 
> replacing  these names
> 
> IF-MIB::ifDescr.6 = STRING: vlan10
> IF-MIB::ifDescr.7 = STRING: vlan172
> IF-MIB::ifDescr.8 = STRING: vlan11
> IF-MIB::ifDescr.9 = STRING: vlan12
> 
> to
> 
> IF-MIB::ifDescr.6 = STRING: Internet
> IF-MIB::ifDescr.7 = STRING: dmz
> IF-MIB::ifDescr.8 = STRING: guest_lan
> IF-MIB::ifDescr.9 = STRING: wifi

Not exactly what you're suggesting above but I use the agent's "override" configuration capability to override the entry's ifAlias value. See this thread for details/caveats: https://sourceforge.net/p/net-snmp/mailman/net-snmp-users/?viewmonth=201504&viewday=14.

The equivalent in your situation would be something like:
override IF-MIB::ifAlias.6 octet_str "Internet"
override IF-MIB::ifAlias.7 octet_str "dmz"
override IF-MIB::ifAlias.8 octet_str  "guest_lan"
override IF-MIB::ifAlias.9 octet_str "wifi"

I find this a nice alternative because it leaves the read-only values as-is (ifDescr and ifName) while also allowing you specify a user-defined alias for the interface. See also this post for a good summary of the inter-relationship between ifDescr, ifName, and ifAlias:
http://www.irobert.info/display/IRINFO/Understanding+ifDescr,+ifName+and+ifAlias.

Regards,
-David
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.