Re: Bug with transient interfaces (ppp)?
Wes Hardaker wrote: TA == Thomas Anders [EMAIL PROTECTED] writes: TA This problems comes up every so often on IRC and MRTG-like forums For the ifTable you'd be better off graphing by something other than ifindex anyway (say ifName). Fixes the problem ;-) Some [versions] of those tools are rumoured to: - cache the ifName-ifIndex mapping until you restart it - get confused by multiple occurences of the same ifName +Thomas -- Thomas Anders (thomas.anders at blue-cable.de) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Bug with transient interfaces (ppp)?
Robert Story wrote: It probably wouldn't be too hard to add a config option to assume that an interface of the same name is always the same, even if the kernel ifIndex changes. But I'd not want it to be the default. It would also mean that other apps that use/report the ifIndex would report the newer ifIndex, which wouldn't show up in a snmpwalk of the ifTable. This problems comes up every so often on IRC and MRTG-like forums, so it deserves further attention. There's a submitted patch for doing it by default: http://sourceforge.net/tracker/index.php?func=detailaid=1513191group_id=12694atid=312694 However, I agree it should rather be a config option instead. Are there any runtime Linux kernel tunables that affect how [transient] interfaces are reported? BTW, please note that Cisco offers a config option for ifIndex persistence like this: http://www.cisco.com/en/US/products/hw/routers/ps368/products_configuration_guide_chapter09186a008020b28c.html (This is not exactly the same issue, I know, but may be interesting to some in this context anyway.) +Thomas -- Thomas Anders (thomas.anders at blue-cable.de) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Bug with transient interfaces (ppp)?
On Thu, 10 Aug 2006 12:33:46 +0200 Thomas wrote: TA Robert Story wrote: TA It probably wouldn't be too hard to add a config option to assume that an TA interface of the same name is always the same, even if the kernel ifIndex TA changes. But I'd not want it to be the default. It would also mean that TA other apps that use/report the ifIndex would report the newer ifIndex, TA which wouldn't show up in a snmpwalk of the ifTable. TA TA This problems comes up every so often on IRC and MRTG-like forums, so it TA deserves further attention. There's a submitted patch for doing it by TA default: TA TA http://sourceforge.net/tracker/index.php?func=detailaid=1513191group_id=12694atid=312694 TA TA However, I agree it should rather be a config option instead. Actually, I kinda like this patch. Note that it does the opposite of what I was talking about above: it removes the old entry, and adds the new one with a *different* ifIndex. I don't think this will make the MRTG-like folks happy, and they usually have a fixed ifIndex configured. I would have no problem with this patch being applied, as the default even. It represents what the kernel is actually reporting to us. TA Are there any runtime Linux kernel tunables that affect how [transient] TA interfaces are reported? Not that I know of, but I've never investigated it. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Bug with transient interfaces (ppp)?
On 10/08/06, Robert Story [EMAIL PROTECTED] wrote: Actually, I kinda like this patch. Note that it does the opposite of what I was talking about above: it removes the old entry, and adds the new one with a *different* ifIndex. I don't think this will make the MRTG-like folks happy, and they usually have a fixed ifIndex configured. I think that ideally, we should support both modes of operation (configurable). A possibly-new interface could either take the same index as before, or a new one, with a config option to determine which. It probably doesn't matter which the default is, just as long as a system admin can change the behaviour as required. Dave - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Bug with transient interfaces (ppp)?
Dave Shield wrote: On 10/08/06, Robert Story [EMAIL PROTECTED] wrote: Actually, I kinda like this patch. Note that it does the opposite of what I was talking about above: it removes the old entry, and adds the new one with a *different* ifIndex. I don't think this will make the MRTG-like folks happy, and they usually have a fixed ifIndex configured. I think that ideally, we should support both modes of operation (configurable). A possibly-new interface could either take the same index as before, or a new one, with a config option to determine which. I agree. Both options can be desirable in the real world and only the sysadmin is in a position to decide what's right for him. If we decide to introduce a config token: are there significant use cases for making it a per-device (e.g. pppX) setting rather than a global one? +Thomas -- Thomas Anders (thomas.anders at blue-cable.de) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Bug with transient interfaces (ppp)?
On Thu, 10 Aug 2006 15:41:25 +0200 Thomas wrote: TA Dave Shield wrote: TA I think that ideally, we should support both modes of operation TA (configurable). A possibly-new interface could either take the same TA index as before, or a new one, with a config option to determine which. TA TA I agree. Both options can be desirable in the real world and only the TA sysadmin is in a position to decide what's right for him. I have no problem with this. Whoever decides to tackle this, however, also needs to hunt down all the other tables that use ifIndex in some fashion or another, and update them to use the data access routines to get ifIndex instead of the ioctl they currently use. Note that this implies that we get the ifIndex related routines for all the platforms that are using the ioctl ported over to the new method. Any volunteers? Financial sponsors? TA If we decide to introduce a config token: are there significant use TA cases for making it a per-device (e.g. pppX) setting rather than a TA global one? Yes, I think that would be a good thing. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Bug with transient interfaces (ppp)?
TA == Thomas Anders [EMAIL PROTECTED] writes: TA This problems comes up every so often on IRC and MRTG-like forums For the ifTable you'd be better off graphing by something other than ifindex anyway (say ifName). Fixes the problem ;-) -- Wes Hardaker Sparta, Inc. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Bug with transient interfaces (ppp)?
SO This unfortunately leave snmpd whith a bad idea of interfaces SO available on the system: SO SO # snmpwalk -c public -v1 127.0.0.1 | grep ifName SO IF-MIB::ifName.1 = STRING: lo SO IF-MIB::ifName.2 = STRING: eth0 SO IF-MIB::ifName.3 = STRING: eth1 SO IF-MIB::ifName.4 = STRING: ppp0 SO IF-MIB::ifName.5 = STRING: tun1 SO IF-MIB::ifName.8 = STRING: tun2 SO IF-MIB::ifName.9 = STRING: ppp0 SO IF-MIB::ifName.10 = STRING: ppp0 SO IF-MIB::ifName.11 = STRING: ppp0 SO IF-MIB::ifName.12 = STRING: tun2 What release are you using? snmpd 5.2.1.2-4 (Debian Testing on i386). What happens after you restart snmpd? Duplicate interface are purged, but indexes are the last assigned: # snmpwalk -c public -v1 127.0.0.1 | grep ifName IF-MIB::ifName.1 = STRING: lo IF-MIB::ifName.2 = STRING: eth0 IF-MIB::ifName.3 = STRING: eth1 IF-MIB::ifName.14 = STRING: tun2 IF-MIB::ifName.15 = STRING: tun1 IF-MIB::ifName.16 = STRING: tun82 IF-MIB::ifName.17 = STRING: ppp0 I haven't really played with vlans/tunnels, but I'm guessing they are also numbered consecutively based on the order they come up, and numbers are re-used when interfaces go down. With OpenVPN we can assign the interface name (tun0, tun1, ...) regardless of the order they bring up, we can also leave holes (you see above I have tun0, tun1 and tun82). With ppp interfaces this is not possible, as far I know. I'm not aware of MRTG internals, but I think that it add a problem on its own. It asks snmpd for interface descriptions to get the indexes, and then caches the results. So MRTG remains stuck to indexes it cached the first time, starting to display zero values when the interface goes donw/up (change index). If MRTG is started freshly (removing the cache info) when interfaces duplicates already exist, it is unable to choose the correct index. This is an example of cache file in this case (/var/lib/mrtg/_etc_mrtg_mrtg.cfg): [EMAIL PROTECTED] Descr eth02 [EMAIL PROTECTED] Descr eth13 [EMAIL PROTECTED] Descr lo 1 [EMAIL PROTECTED] Descr ppp0Dup [EMAIL PROTECTED] Descr tun1Dup [EMAIL PROTECTED] Descr tun2Dup [EMAIL PROTECTED] Descr tun82 16 [EMAIL PROTECTED] Eth Dup [EMAIL PROTECTED] Eth 00-50-fc-fa-d0-89 3 [EMAIL PROTECTED] Eth 00-50-fc-ff-31-6c 2 [EMAIL PROTECTED] Ip 127.0.0.1 1 [EMAIL PROTECTED] Ip 172.16.1.1 15 [EMAIL PROTECTED] Ip 172.16.2.2 14 [EMAIL PROTECTED] Ip 172.16.82.1 16 [EMAIL PROTECTED] Ip 192.168.2.2 2 [EMAIL PROTECTED] Ip 217.19.150.150 17 [EMAIL PROTECTED] Nameeth02 [EMAIL PROTECTED] Nameeth13 [EMAIL PROTECTED] Namelo 1 [EMAIL PROTECTED] Nameppp0Dup [EMAIL PROTECTED] Nametun1Dup [EMAIL PROTECTED] Nametun2Dup [EMAIL PROTECTED] Nametun82 16 [EMAIL PROTECTED] Type1 Dup [EMAIL PROTECTED] Type23 Dup [EMAIL PROTECTED] Type24 1 [EMAIL PROTECTED] Type6 Dup So we're kind of in a pickle, and there's no easy answer. I can fix the code so that it doesn't continue to report multiple ifIndexes with the same ifName. Best to report only the one with highest index? By the user's perspective, no problem if the ifIndex changes. Also considering the new ppp0 a totally different interface can make sense, at least it starts with new TX/RX counters... The problem is having multiple instances of the name ppp0, with the command ifconfig I see only one, so I expect the same from snmpd. -- Niccolo Rigacci Firenze - Italy --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Bug with transient interfaces (ppp)?
On Wed, 23 Nov 2005 23:29:39 +0100 [EMAIL PROTECTED] wrote: SO The internet connection is via dsl PPP, sometimes the link SO disconnect and then reconnect automatically. We also have some SO OpenVPN tunnels that sometimes disconnect/reconnect. SO SO This unfortunately leave snmpd whith a bad idea of interfaces SO available on the system: SO SO # snmpwalk -c public -v1 127.0.0.1 | grep ifName SO IF-MIB::ifName.1 = STRING: lo SO IF-MIB::ifName.2 = STRING: eth0 SO IF-MIB::ifName.3 = STRING: eth1 SO IF-MIB::ifName.4 = STRING: ppp0 SO IF-MIB::ifName.5 = STRING: tun1 SO IF-MIB::ifName.8 = STRING: tun2 SO IF-MIB::ifName.9 = STRING: ppp0 SO IF-MIB::ifName.10 = STRING: ppp0 SO IF-MIB::ifName.11 = STRING: ppp0 SO IF-MIB::ifName.12 = STRING: tun2 I've been waiting for this message. What release are you using? SO To solve the problem I have to restart snmpd. What happens after you restart snmpd? Do you get IF-MIB::ifName.1 = STRING: lo IF-MIB::ifName.2 = STRING: eth0 IF-MIB::ifName.3 = STRING: eth1 IF-MIB::ifName.4 = STRING: ppp0 IF-MIB::ifName.5 = STRING: tun1 IF-MIB::ifName.8 = STRING: tun2 or IF-MIB::ifName.1 = STRING: lo IF-MIB::ifName.2 = STRING: eth0 IF-MIB::ifName.3 = STRING: eth1 IF-MIB::ifName.5 = STRING: tun1 IF-MIB::ifName.11 = STRING: ppp0 IF-MIB::ifName.12 = STRING: tun2 SO With the old Debian (snmpd 4.2.3) this problem did not exist. The old code was based entirely on the interface order. If you have to tunnels, bring them up as you normally would. Then take them down, and bring them up in the reverse order. The names and ifIndexes will remain the same, thus mrtg will continue to work. But suddenly the graphs are swapped, and you've got no way of knowing. The new code is based on the kernel's idea of the ifIndex. And the kernel has the same problem we do. If pppN or tunN goes down, and then comes back up, how do we know that it's the same 'interface'? For example, let's say you have 2 modems and connections to 2 sites... the connections are set to auto-connect on startup. Normally site A is ppp0, and site B is ppp1. But if line trouble causes disconnects, it's a toin-coss as to which might reconnect first, and thus get assigned ppp0. Suddenly your graphs could be graphing the wrong data again. I haven't really played with vlans/tunnels, but I'm guessing they are also numbered consecutively based on the order they come up, and numbers are re-used when interfaces go down. Now, why the the interface names are re-used but the kernel's ifIndex is not, I have no idea. So we're kind of in a pickle, and there's no easy answer. I can fix the code so that it doesn't continue to report multiple ifIndexes with the same ifName. It probably wouldn't be too hard to add a config option to assume that an interface of the same name is always the same, even if the kernel ifIndex changes. But I'd not want it to be the default. It would also mean that other apps that use/report the ifIndex would report the newer ifIndex, which wouldn't show up in a snmpwalk of the ifTable. Thoughts? opinions? -- NOTE: messages sent directly to me, instead of the lists, will be deleted unless they are requests for paid consulting services. Robert Story; NET-SNMP Junkie Support: http://www.net-snmp.org/ irc://irc.freenode.net/#net-snmp Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders You are lost in a twisty maze of little standards, all different. --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders