Hello, list.
I hope the wide format of the text below isn't spoiled by my
mail client or yours. If it is, I've posted the identical text
to https://pastebin.com/raw/RH4RVLht .
I hope someone can explain why IPv6 default routes are omitted from
net-snmp ver 5.9.3 fetch of IP-FORWARD-MIB:inetCidrRouteTable, which
numerically is
$ snmptranslate -On IP-FORWARD-MIB:inetCidrRouteTable
.1.3.6.1.2.1.4.24.7
The issue:
Looking for the default IPv6 route(s) using command:
"snmptable -Ci localhost IP-FORWARD-MIB:inetCidrRouteTable"
is expected to display the default IPv6 route, identified by its
destination of ::/0.
The actual results:
$ snmptable -Ci localhost IP-FORWARD-MIB:inetCidrRouteTable | cat
-n | cut -b 1-168
1 SNMP table: IP-FORWARD-MIB::inetCidrRouteTable
2
3 index inetCidrRouteIfIndex inetCidrRouteType
4 ipv4."0.0.0.0".0.2.0.0.ipv4."192.168.1.1" 2 remote
5 ipv4."127.0.0.0".8.3.0.0.1.ipv4."0.0.0.0" 1 local
6 ipv4."192.168.1.0".24.3.0.0.2.ipv4."0.0.0.0" 2 local
7
ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01".128.3.0.0.4.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"
1 local
8
ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01".128.3.0.0.7.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"
1 local
9
ipv6."fe:80:00:00:00:00:00:00:00:00:00:00:00:00:00:00".64.3.0.0.5.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"
2 local
10
ipv6."fe:80:00:00:00:00:00:00:ee:a8:6b:ff:fe:f8:33:94".128.3.0.0.8.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"
2 local
11
ipv6."ff:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00".8.3.0.0.9.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"
2 local
The route exists in the low-level route table (third line of results):
$ cat /proc/net/ipv6_route
00000000000000000000000000000001 80
00000000000000000000000000000000 00 00000000000000000000000000000000
00000100 00000001 00000000 00000001 lo
fe800000000000000000000000000000 40
00000000000000000000000000000000 00 00000000000000000000000000000000
00000100 00000001 00000000 00000001 eth0
00000000000000000000000000000000 00
00000000000000000000000000000000 00 00000000000000000000000000000000
ffffffff 00000001 00000000 00200200 lo
00000000000000000000000000000001 80
00000000000000000000000000000000 00 00000000000000000000000000000000
00000000 00000004 00000000 80200001 lo
fe80000000000000eea86bfffef83394 80
00000000000000000000000000000000 00 00000000000000000000000000000000
00000000 00000002 00000000 80200001 eth0
ff000000000000000000000000000000 08
00000000000000000000000000000000 00 00000000000000000000000000000000
00000100 00000002 00000000 00000001 eth0
00000000000000000000000000000000 00
00000000000000000000000000000000 00 00000000000000000000000000000000
ffffffff 00000001 00000000 00200200 lo
Comparison results from netstat command, which _does_ display the
default IPv6 route (at line 9):
$ netstat -6rn | cat -n
1 Kernel IPv6 routing table
2 Destination Next Hop Flag Met Ref Use If
3 ::1/128 :: U 256 1 0 lo
4 fe80::/64 :: U 256 1 0 eth0
5 ::/0 :: !n -1 1 0 lo
6 ::1/128 :: Un 0 4 0 lo
7 fe80::eea8:6bff:fef8:3394/128 :: Un 0 2 0 eth0
8 ff00::/8 :: U 256 2 0 eth0
--> 9 ::/0 :: !n -1 1 0 lo
Comparison results from "ip route" command:
$ ip -6 route show table all | cat -n
1 ::1 dev lo proto kernel metric 256 pref medium
2 fe80::/64 dev eth0 proto kernel metric 256 pref medium
3 local ::1 dev lo table local proto kernel metric 0 pref medium
4 local fe80::eea8:6bff:fef8:3394 dev eth0 table local proto
kernel metric 0 pref medium
5 multicast ff00::/8 dev eth0 table local proto kernel metric 256
pref medium
All three commands were expected to show a default IPv6 route.
Only "netstat -6rn" showed the expected results.
I'm at a loss to explain this behavior.
The net-snmp version is 5.9.3:
$ snmpwalk localhost .1 | grep 'hrSWInstalledName.*net-snmp'
HOST-RESOURCES-MIB::hrSWInstalledName.1658 = STRING:
"net-snmp-5.9.3-x86_64-1_slack15.0"
Slackware 15 compiles net-snmp from a vanilla 5.9.3 source tree.
I see the same issue on CentOS release 6.10,
$ snmpwalk wiki.foo.peecee3.com .1 | grep 'hrSWInstalledName.*net-snmp'
HOST-RESOURCES-MIB::hrSWInstalledName.209 = STRING:
"net-snmp-libs-5.5-60.el6_10.2"
HOST-RESOURCES-MIB::hrSWInstalledName.759 = STRING:
"net-snmp-5.5-60.el6_10.2"
HOST-RESOURCES-MIB::hrSWInstalledName.1145 = STRING:
"net-snmp-utils-5.5-60.el6_10.2"
Given the same behavior between versions 5.5-60 and 5.9.3,
this seems not to be a recent phenomenon.
I see the same result using snmpbulkwalk; I think the output is unrevealing
so I'm not posting it here.
Thanks for looking,
--
Charles Polisher
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users