Answer the question
In order to leave comments, you need to log in
How to set ifAlias interface description in Linux?
There is RHEL as an internal router and a route server. For the purpose of accounting for traffic in directions, it is necessary to mark the interfaces in a certain way in ifAlias.
On active equipment, this is easily done by adding a description on the interface, which is returned via SNMP in OID 1.3.6.1.2.1.31.1.1.1.18. However, I did not find how to do this in Linux. - does not give the desired result. This parameter does not get into SNMP at all.
Tell me, who knows how to add a "description" to the Linux interface by analogy with Cisco, for example, so that this information gets into OID 1.3.6.1.2.1.31.1.1.1.18.* ?
While snmpwalk output looks empty:
ip link set ens0 alias aliasname
snmpwalk -v2c -c public 198.18.10.10 1.3.6.1.2.1.31.1.1.1.18 (IF-MIB::ifAlias)
iso.3.6.1.2.1.31.1.1.1.18.1 = ""
iso.3.6.1.2.1.31.1.1.1.18.2 = ""
iso.3.6.1.2.1.31.1.1.1.18.5 = ""
iso.3.6.1.2.1.31.1.1.1.18.8 = ""
iso.3.6.1.2.1.31.1.1.1.18.10 = ""
iso.3.6.1.2.1.31.1.1.1.18.11 = ""
snmpwalk -v2c -c public 198.18.10.9 1.3.6.1.2.1.31.1.1.1.18 (IF-MIB::ifAlias)
iso.3.6.1.2.1.31.1.1.1.18.1 = ""
iso.3.6.1.2.1.31.1.1.1.18.2 = ""
iso.3.6.1.2.1.31.1.1.1.18.3 = STRING: "Cust: WiFi NET 2.4GHz"
iso.3.6.1.2.1.31.1.1.1.18.4 = STRING: "Cust: WiFi NET 5GHz"
iso.3.6.1.2.1.31.1.1.1.18.5 = ""
iso.3.6.1.2.1.31.1.1.1.18.6 = ""
iso.3.6.1.2.1.31.1.1.1.18.7 = ""
iso.3.6.1.2.1.31.1.1.1.18.9 = STRING: "Peering: ISP1 Uplink [10Gbit]"
iso.3.6.1.2.1.31.1.1.1.18.12 = ""
iso.3.6.1.2.1.31.1.1.1.18.13 = STRING: "Hurricane Electric IPv6 Tunnel"
iso.3.6.1.2.1.31.1.1.1.18.14 = STRING: "Cust: BRN-IPSEC [100Mbit]"
iso.3.6.1.2.1.31.1.1.1.18.15 = STRING: "Peering: L2TP Tunnel to DO"
iso.3.6.1.2.1.31.1.1.1.18.16 = ""
iso.3.6.1.2.1.31.1.1.1.18.21 = ""
iso.3.6.1.2.1.31.1.1.1.18.22 = STRING: "Cust: SRV-NET [10Gbit] (vlan 10)"
iso.3.6.1.2.1.31.1.1.1.18.25 = STRING: "Cust: MGMT"
iso.3.6.1.2.1.31.1.1.1.18.29 = STRING: "Transit: GW107-GW110 L3 Link"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question