02-27-2008 12:08 PM - edited 03-05-2019 09:25 PM
I am setting the carrier-delay on ports that are always going up and down withing a few seconds on 2900xl and 3750 switches. Is there a sh command that will let me know what int that have carrier-delay set at?
Thanx,
Mark
02-27-2008 01:45 PM
Hi, I would try using the pipe command |inc carrier or delay
example
show run | inc carries
show run | inc delay
the pipe command is good for getting detail results on interfaces and configurations.
Searching and Filtering Output of show and more Commands
You can search and filter the output for show and more commands. This functionality is useful when you need to sort through large amounts of output or if you want to exclude output that you do not need to see.
To use this functionality, enter a show or more command followed by the pipe character (|), one of the keywords begin, include, or exclude, and an expression that you want to search for or filter out:
command | {begin | include | exclude} regular-expression
This example shows how to include in the output display only lines where the expression protocol appears:
Switch# show interface | include protocol
Vlan1 is up, line protocol is up
Vlan10 is up, line protocol is down
GigabitEthernet0/1 is up, line protocol is down
GigabitEthernet0/2 is up, line protocol is up
Accessing the CLI
Before you can access the CLI, you need to connect a terminal or PC to the switch console port and power on the switch as described in the hardware installation guide that shipped with your switch. Then, to understand the boot process and the options available for assigning IP information, see "Assigning the Switch IP Address and Default Gateway."
02-28-2008 07:44 AM
Thanks for the pipe command but in using it I only get back "carrier-delay 30" with the number of lines displayed equaling the number of int I have configured. I was needing a command that would show which interfaces that have been configured differently from the default value of 2. This way I could keep track of what int have been configured to decrease the errors that keep showing up. Maybe I will have to do a "sh config" and pick through all of the int looking for what has been changed.
Thanx,
Mark
02-28-2008 02:06 PM
Okay you can do a show run int command to see the config on a certain interface, this will be easier that doing the show run. And yes the number of line usually is in response to each configuration. HTH
show run int fa1/2
show run int fa1/3
02-09-2024 04:35 AM
You could use show run | include interface | carrier-delay
11-21-2024 07:01 AM
A tad old, but there is no space in the regex; so "show run | inc interface|carrier"
The regex engine in IOS is pretty rudimentary, but there's enough there to make your job easier if you know the basics. I think most believe it's a simple string filter, but much more powerful.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide