Wednesday 5 March 2014

Finding empty ports on a Cisco switch

Now I've started working for a new agency that has cisco switches that we look after internally and with most media agencies, there always seems to be desk moves etc. With this in mind it is always important to find free ports on the switches before a move.

Now 95% of our users have laptops so you cannot rely on the port not being active today as the user could be working away from their desk and plug back in using their ethernet cable when they are back.

A very easy way of finding free ports and when they were last used is to login to the cisco switch and run the following command:

Sh int | inc Gig|Last input

This will list all ports on the switch and show their status (connected or not connected) along with the last time data was passed through. As you can see below Port 23 is very much still in use and Port 24 is disconnected and was last used 11 weeks and 5 days ago, so I would say it is safe to re-use this port. Now remember to always check the config of the port before you re-assign the port as it's config could be important and required in the future for some random legacy system etc.

GigabitEthernet2/0/23 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 5835.d981.9a97 (bia 5835.d981.9a97)
Last input 00:00:04, output 00:00:09, output hang never

GigabitEthernet2/0/24 is down, line protocol is down (notconnect)
Hardware is Gigabit Ethernet, address is 5835.d981.9a98 (bia 5835.d981.9a98)
Last input 11w5d, output 11w5d, output hang never

Now you've saved time by not having to crawl under desks and find unpatched ports and free up ports, you can pop down the pub and have a few well earnt pints!

No comments:

Post a Comment