Jump to content

Finding out how long ago since a connection was 'active' on a Cisco switch port


Recommended Posts

Posted

Is there any way to find out how long ago since a connection was 'active' on a Cisco switch port?

 

We are replacing our entire network and trying to prepare in advance by pulling idle connections where we can, the problem is one of our buildings has had several major refurbs over the past few years and they've completely revamped parts of it without telling us which network points they've destroyed in the process! (Generally new network points have been created for the new rooms as they then go to a secondary and third cabinet to help with space!)

Posted (edited)

I think there is a way in the logs on the switch to see when a connection became active and when it went down, however unless you have the correct date/time setup you will be none the wiser Unless it says something like *Port disconnection 1 hr ago*.

 

A similar thing can be done on Junos but not so sure about Cisco.

 

Try this: sh int | inc line protocol is|Last input

 

which outputs

 

FastEthernet0/29 is down, line protocol is down (notconnect)

Last input never, output never, output hang never

FastEthernet0/30 is up, line protocol is up (connected)

Last input never, output 00:00:07, output hang never

FastEthernet0/46 is down, line protocol is down (notconnect)

Last input never, output 6d23h, output hang never

 

The output parameter tells you when the port last saw traffic which is useful for identifying those ports that are only occasionally used.

 

EDIT: Also worth noting (for reasons beyond the scope of this question) is that "Last input" is almost always "never"

Edited by cpjitservices
  • Thanks 1
Posted
I think there is a way in the logs on the switch to see when a connection became active and when it went down, however unless you have the correct date/time setup you will be none the wiser Unless it says something like *Port disconnection 1 hr ago*.

 

A similar thing can be done on Junos but not so sure about Cisco.

 

Try this: sh int | inc line protocol is|Last input

 

which outputs

 

FastEthernet0/29 is down, line protocol is down (notconnect)

Last input never, output never, output hang never

FastEthernet0/30 is up, line protocol is up (connected)

Last input never, output 00:00:07, output hang never

FastEthernet0/46 is down, line protocol is down (notconnect)

Last input never, output 6d23h, output hang never

 

The output parameter tells you when the port last saw traffic which is useful for identifying those ports that are only occasionally used.

 

EDIT: Also worth noting (for reasons beyond the scope of this question) is that "Last input" is almost always "never"

 

Thanks for that, I was looking forward to trying it out until I remembered the switches in the particular building are stupid Catalyst Express 500 ones which don't support CLI! Roll on Wednesday...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...