You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I am a bit confused about how we get information for 1.3.6.1.2.1.4.34.1.3 i.e. ipAddressIfIndex oid which connects the interface with it's assigned IP address. I can see we dont have support for this oid in snmpagent. But I see tha values for this oid. I am guessing it's taking value from snmpd function i.e. ipAddressIfIndex_get
Describe the results you received:
admin@lnos-x1-a-csw07:~$ docker exec -it snmp bash
root@lnos-x1-a-csw07:/# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 21:20 ? 00:00:01 /usr/bin/python /usr/bin/supervisord
root 24 1 0 21:20 ? 00:00:00 /usr/sbin/rsyslogd -n
Debian-+ 34 1 0 21:20 ? 00:00:01 /usr/sbin/snmpd -f -LS4d -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf ifTable ifXTable inetCidrRouteTable ipCidr
root 42 1 12 21:20 ? 00:12:11 python3.6 -m sonic_ax_impl
root 49 0 1 22:56 ? 00:00:00 bash
root 55 49 0 22:56 ? 00:00:00 ps -ef
root@lnos-x1-a-csw07:/# gdb
(gdb) attach 34
Attaching to process 34
(gdb) b ipAddressIfIndex_get
Breakpoint 1 at 0x7f4b22739310: file ip-mib/ipAddressTable/ipAddressTable.c, line 504.
(gdb) b ip-mib/ipAddressTable/ipAddressTable.c:506
Breakpoint 2 at 0x7f4b2273931c: file ip-mib/ipAddressTable/ipAddressTable.c, line 506.
(gdb) b ip-mib/ipAddressTable/ipAddressTable.c:509
Breakpoint 3 at 0x7f4b22739325: file ip-mib/ipAddressTable/ipAddressTable.c, line 509.
(gdb) b ip-mib/ipAddressTable/ipAddressTable.c:512
Breakpoint 4 at 0x7f4b2273932e: file ip-mib/ipAddressTable/ipAddressTable.c, line 512.
(gdb) b ip-mib/ipAddressTable/ipAddressTable.c:518
Breakpoint 5 at 0x7f4b22739337: file ip-mib/ipAddressTable/ipAddressTable.c, line 518.
**After setting breakpoint, I ran snmpwalk for this oid**
(gdb) run -f -Lo
Starting program: /usr/sbin/snmpd -f -Lo
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Turning on AgentX master support.
NET-SNMP version 5.7.3
Connection from UDP: [127.0.0.1]:41687->[127.0.0.1]:161
Breakpoint 1, ipAddressIfIndex_get (rowreq_ctx=rowreq_ctx@entry=0x70e860, ipAddressIfIndex_val_ptr=0x776f70) at ip-mib/ipAddressTable/ipAddressTable.c:504
504 ip-mib/ipAddressTable/ipAddressTable.c: No such file or directory.
(gdb) bt
#0 ipAddressIfIndex_get (rowreq_ctx=rowreq_ctx@entry=0x70e860, ipAddressIfIndex_val_ptr=0x776f70) at ip-mib/ipAddressTable/ipAddressTable.c:504
#1 0x00007ffff77b9579 in _ipAddressTable_get_column (column=3, var=0x776b40, rowreq_ctx=0x70e860) at ip-mib/ipAddressTable/ipAddressTable_interface.c:864
#2 _mfd_ipAddressTable_get_values (handler=<optimized out>, reginfo=<optimized out>, agtreq_info=<optimized out>, requests=0x76acd0)
at ip-mib/ipAddressTable/ipAddressTable_interface.c:995
#3 0x00007ffff7b82e06 in _baby_steps_access_multiplexer (handler=0x6f76b0, reginfo=0x6f7100, reqinfo=0x7728d0, requests=0x76acd0) at helpers/baby_steps.c:501
#4 0x00007ffff7b97435 in netsnmp_call_handler (requests=0x76acd0, reqinfo=0x7728d0, reginfo=0x6f7100, next_handler=0x6f76b0) at agent_handler.c:526
#5 netsnmp_call_next_handler (current=current@entry=0x6f6fd0, reginfo=reginfo@entry=0x6f7100, reqinfo=reqinfo@entry=0x7728d0, requests=requests@entry=0x76acd0)
at agent_handler.c:640
#6 0x00007ffff7b832a0 in _baby_steps_helper (handler=0x6f6fd0, reginfo=0x6f7100, reqinfo=0x7728d0, requests=0x76acd0) at helpers/baby_steps.c:312
#7 0x00007ffff7b97435 in netsnmp_call_handler (requests=0x76acd0, reqinfo=0x7728d0, reginfo=0x6f7100, next_handler=0x6f6fd0) at agent_handler.c:526
#8 netsnmp_call_next_handler (current=<optimized out>, reginfo=0x6f7100, reqinfo=0x7728d0, requests=0x76acd0) at agent_handler.c:640
#9 0x00007ffff7b97435 in netsnmp_call_handler (requests=0x76acd0, reqinfo=0x7728d0, reginfo=0x6f7100, next_handler=0x6f7040) at agent_handler.c:526
#10 netsnmp_call_next_handler (current=<optimized out>, reginfo=0x6f7100, reqinfo=0x7728d0, requests=0x76acd0) at agent_handler.c:640
#11 0x00007ffff7b8b007 in table_helper_handler (handler=0x70e860, reginfo=0x6f7100, reqinfo=0x7728d0, requests=0x7ffff780c8f4) at helpers/table.c:712
#12 0x00007ffff7b96e9f in netsnmp_call_handler (requests=0x76acd0, reqinfo=0x7728d0, reginfo=0x6f7100, next_handler=0x6f9860) at agent_handler.c:526
#13 netsnmp_call_handlers (reginfo=0x6f7100, reqinfo=0x7728d0, requests=0x76acd0) at agent_handler.c:611
#14 0x00007ffff7ba4dce in handle_var_requests (asp=asp@entry=0x76b8a0) at snmp_agent.c:2676
#15 0x00007ffff7ba5a7f in handle_pdu (asp=asp@entry=0x76b8a0) at snmp_agent.c:3394
#16 0x00007ffff7ba5c78 in netsnmp_handle_request (asp=asp@entry=0x76b8a0, status=status@entry=0) at snmp_agent.c:3281
#17 0x00007ffff7ba6152 in handle_snmp_packet (op=<optimized out>, session=<optimized out>, reqid=<optimized out>, pdu=0x767ae0, magic=<optimized out>) at snmp_agent.c:1987
#18 0x00007ffff745bd31 in _sess_process_packet (sessp=0x7659d0, sp=0x765a00, isp=0x765690, transport=0x765740, opaque=0x7ac270, olength=<optimized out>,
packetptr=0x7ae290 "00\002\001\001\004\006public\240#\002\004\027\227\361@\002\001", length=50) at snmp_api.c:5441
#19 0x00007ffff745ca79 in _sess_read (sessp=0x7659d0, fdset=0x7fffffffe9c0) at snmp_api.c:5876
#20 0x00007ffff745d859 in snmp_sess_read2 (sessp=sessp@entry=0x7659d0, fdset=fdset@entry=0x7fffffffe9c0) at snmp_api.c:5908
#21 0x00007ffff745d8ab in snmp_read2 (fdset=fdset@entry=0x7fffffffe9c0) at snmp_api.c:5504
#22 0x000000000040483f in receive () at snmpd.c:1328
#23 main (argc=<optimized out>, argv=<optimized out>) at snmpd.c:1115
Describe the results you expected:
I guess this is not giving correct output as the INTERGER value does not match with ifindex value which should be the case in ideal scenario.
"The index value that uniquely identifies the interface to which this entry is applicable. The interface identified by a particular value of this index is the same interface as identified by the same value of the IF-MIB's ifIndex."
admin@lnos-x1-a-csw06:~$ show ip int
Interface IPv4 address/mask Admin/Oper
----------- ------------------- ------------
Ethernet0 10.2.1.0/31 up/up
Ethernet4 10.2.2.0/31 up/up
You are right "we dont have support for this oid in snmpagent".
If there is no implementation in snmpagent, snmpd will get the IfIndex from Linux kernel, which will be totally different from SONiC internal IfIndex.
Suggest you implement this OID in snmpagent.
Description
I am a bit confused about how we get information for
1.3.6.1.2.1.4.34.1.3
i.e.ipAddressIfIndex
oid which connects the interface with it's assigned IP address. I can see we dont have support for this oid in snmpagent. But I see tha values for this oid. I am guessing it's taking value from snmpd function i.e.ipAddressIfIndex_get
Describe the results you received:
Describe the results you expected:
I guess this is not giving correct output as the INTERGER value does not match with ifindex value which should be the case in ideal scenario.
as per net-snmp official doc,
ifindex oid
ipAddressIfIndex oid
The text was updated successfully, but these errors were encountered: