On Mon, 26 Jun 2006 16:21:31 +0530 [EMAIL PROTECTED] wrote:
SSC> In 5.3.1.pre3 ( in Fedora core 4 Linux ), for ifTable initially
SSC> I have three column { say lo (1) , eth0 (2) and sit (3) }, once I run
SSC> "rmmod via_rhine", ifTable has four columns { lo (1) , eth0 (2) , sit
SSC> (3) and eth0(4) }.
Yes, this is a known issue. The code currently marks any interface that
disappears as down. On Linux, this only happens when the module responsible
for the interface is removed. One might expect that when the module was
re-inserted, the same ifIndex would be used, but that isn't the case. There
really isn't a good way, for the kernel or for net-snmp, to know if the 'new'
interface is really new, or simply the result of the module being removed and
re-added.
So, how does one decide when to remove a column from the ifTable? As long as
it's there, the statistics for it are still potentially useful information.
SSC> I Hope after adding the new interface, existing entries are not
SSC> cleanup/checked for existence.
To do that, we would have to determine that the 'new' eth0 is really the same
as the old one, and there is no good way to do that. Imagine a system with 2
different ethernet cards w/different drivers. If the interfaces are shutdown,
their modules removed, and then the second interface (previously eth1) is
brought up again. It will now be eth0.
SSC> Once I restarted the SNMP agent ifTable has only three column {
SSC> { lo (1) , sit (3) and eth0(4) }. Is there a way to get updated entries,
SSC> with out restarting the SNMP agent? Is there any SIGNAL to re-initialize
SSC> the ifTable with latest data?
If we can get everyone to agree that zapping the original row as soon as we
notice it is down/missing is a good idea, then it is a fairly easy change. It
would take a fairly good argument, though, to convince me. Mainly because the
restrictions that make it hard to associate old/new interfaces might not exist
on other platforms, and the MIB module code is fairly clean now. I'd hate to
start down the road towards special processing per platform if it can be
avoided.
That said, if you want to hack up your own implementation to zap entries as
soon as they disappear, take a look at _check_interface_entry_for_updates() in
ifTable/ifTable_data_access.c.
--
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.
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=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders