Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

Regular Expression

Hi Team,

My requirement is to pull the unused copper LAN ports from all the switches in the environment. Can someone help me on the regular expression string to pull the exact output ?.

Regards,

Bala.R

Everyone's tags (4)
2 ACCEPTED SOLUTIONS

Accepted Solutions
Silver

Regular Expression

Balakrishna,

As Sathvik mentioned, there is no command to check only fibre or only copper ports. This command will tell you the total interfaces which are down.

Thanks

Ankur

"Please rate the post if found useful"

Re: Regular Expression

Well, I think it depends on the platform. Certain switches only have fastethernet interfaces across the user ports and have 4 gb interfaces that could use SFPs. That being said, if you're using fiber/copper mix on those gigabit interfaces, then you wouldn't be able to find the different in those, but you can find the difference if you're using all fiber on the gig ports and need just the fast ethernet interfaces:

sh int status | inc (Fa.*notconnect)

I do want to state that just because an interface is down or not connected doesn't mean that it's not being used. A user could be connected to a port but their laptop may not be on or they could be out of the office. The interface is only up when there is a live host on the port.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
6 REPLIES
Silver

Regular Expression

Hi,

You may try:

show ip int br | in down

This command will give us the list of all the interfaces which are down.

Thanks

Ankur

"Please rate the post if found useful"

Regular Expression

Hi Ankur,

sh ip int br | in down

will also display the fiber ports, but my requirement is to display only unused copper ports .

Regards,

Bala.R

New Member

Regular Expression

Hi Balakrishna,

There is no command to display only cpooer of fiber ports.As Ankur said you can use "show ip int brief | inc down" before you pull out the copper cables make sure none of the interfaces are genuinely down . When you are removing the copper cables you should be able to identify fiber cables.

Regards,

Sathvik

Silver

Regular Expression

Balakrishna,

As Sathvik mentioned, there is no command to check only fibre or only copper ports. This command will tell you the total interfaces which are down.

Thanks

Ankur

"Please rate the post if found useful"

Re: Regular Expression

Well, I think it depends on the platform. Certain switches only have fastethernet interfaces across the user ports and have 4 gb interfaces that could use SFPs. That being said, if you're using fiber/copper mix on those gigabit interfaces, then you wouldn't be able to find the different in those, but you can find the difference if you're using all fiber on the gig ports and need just the fast ethernet interfaces:

sh int status | inc (Fa.*notconnect)

I do want to state that just because an interface is down or not connected doesn't mean that it's not being used. A user could be connected to a port but their laptop may not be on or they could be out of the office. The interface is only up when there is a live host on the port.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

Regular Expression

Hi John,

Thanks. I was able to pull the report using below mentioned command.

sh int status | inc (notconnect.*1000-TX)

Regards,

Bala

163
Views
0
Helpful
6
Replies