cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
12727
Views
8
Helpful
5
Replies

What is the meaning of the OID '1.3.6.1.2.1.2.2.1.9'(iflastchange)?

caobo1020
Level 1
Level 1

Hi guys,

 

What is the meaning of object 'iflastchange'? I thought it was the link flap timer. Apparently it's not. Can anyone give a detail answer? I don't really understand the difinition given by cisco document.


ifLastChange OBJECT-TYPE
    SYNTAX      TimeTicks
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION            "The value of sysUpTime at the time the interface entered
            its current operational state.  If the current state was
            entered prior to the last re-initialization of the local
            network management subsystem, then this object contains a
            zero value.

 

Thanks,

Bo

2 Accepted Solutions

Accepted Solutions

Hi Bo,

 

Milan's absolutely right; I just want to give you some additional information to make use of it:

To find out when the last status change of an interface occured, you also need to query sysUptime.0 (1.3.6.1.2.1.1.3.0) .

Calculate sysUptime.0 minus ifLastChange.x and divide the result by 100

(Tiimeticks are denoted in hundredths of a second).

This value gives you the time in seconds since the last status change.

 

Just for the sake of completeness:

If the uptime is higher than 497 days, sysUptime.0 has to be set to 0 and then starts counting up again. That's because it's a 32-bit value. If you want to make a script or something like that, you have to keep that in mind.

 

Best regards,

Rolf

View solution in original post

Hi Rolf,

 

you just explained a discrepancy I found on one of my routers:

# snmpwalk -Os -c xxx -v 1 a.b.c.d  1.3.6.1.2.1.1.3.0

sysUpTimeInstance = Timeticks: (2244808702) 259 days, 19:34:47.02




# snmpwalk -Os -c xxx -v 1 a.b.c.d 1.3.6.1.2.1.2.2.1.9

ifLastChange.1 = Timeticks: (874) 0:00:08.74

ifLastChange.2 = Timeticks: (2661565865) 308 days, 1:14:18.65




a.b.c.d#sh ver
....

a.b.c.d uptime is 2 years, 3 weeks, 5 days, 22 hours, 1 minute

 

Thanks,

Milan

View solution in original post

5 Replies 5

milan.kulik
Level 10
Level 10

Hi,

IMHO, it's a timestamp of the interface last status change.

So if your router uptime is 30 days and the interface went Up two days ago, the ifLastChange value should be 28 days.

HTH,

Milan

Hi Bo,

 

Milan's absolutely right; I just want to give you some additional information to make use of it:

To find out when the last status change of an interface occured, you also need to query sysUptime.0 (1.3.6.1.2.1.1.3.0) .

Calculate sysUptime.0 minus ifLastChange.x and divide the result by 100

(Tiimeticks are denoted in hundredths of a second).

This value gives you the time in seconds since the last status change.

 

Just for the sake of completeness:

If the uptime is higher than 497 days, sysUptime.0 has to be set to 0 and then starts counting up again. That's because it's a 32-bit value. If you want to make a script or something like that, you have to keep that in mind.

 

Best regards,

Rolf

Hi Rolf,

 

you just explained a discrepancy I found on one of my routers:

# snmpwalk -Os -c xxx -v 1 a.b.c.d  1.3.6.1.2.1.1.3.0

sysUpTimeInstance = Timeticks: (2244808702) 259 days, 19:34:47.02




# snmpwalk -Os -c xxx -v 1 a.b.c.d 1.3.6.1.2.1.2.2.1.9

ifLastChange.1 = Timeticks: (874) 0:00:08.74

ifLastChange.2 = Timeticks: (2661565865) 308 days, 1:14:18.65




a.b.c.d#sh ver
....

a.b.c.d uptime is 2 years, 3 weeks, 5 days, 22 hours, 1 minute

 

Thanks,

Milan

Hi Milan,

I'm glad when I could help to unravel that.

Probably the developers of the System-MIB simply didn't expect that devices could run more then 1 1/4 years without a reboot

Best regards

Rolf

Excellent explanation.

Thanks,

Bo

Review Cisco Networking products for a $25 gift card