Cisco IOS Regex examples

Just like there are road shortcuts, there are IOS display shortcuts too. They are based on Cisco IOS Regex (Regular Expressions) operators.

Here are some basic Regex examples that can be useful in your day-to-day network administration.

  • Display the list of interfaces on your device

cisco-ios-regex-keyboardbanger1
Figure: Displaying the list of interfaces on the device.

  • Display all IP interfaces on the device.

cisco-ios-regex-keyboardbanger5
Figure: Displaying all IP interfaces

  • Display all IP interfaces that are in the “up…up” state

cisco-ios-regex-keyboardbanger7
Figure: Displaying all IP interfaces that are in the “up..up” state

  • Display all IP interfaces that are in the “up…down” state

cisco-ios-regex-keyboardbanger6
Figure: Displaying all IP interfaces that are in the “up..down” state

  • Count the interfaces that have “line is up” or “line protocol is up”

cisco-ios-regex-keyboardbanger2
Figure: Counting the number of interfaces that either have “line is up” or “line protocol is up”

  • Count the interfaces that are in the “up…down” state

cisco-ios-regex-keyboardbanger4
Figure: Couting the number of “up..down” interfaces

  • Count the interfaces that are in the “up…up” state

cisco-ios-regex-keyboardbanger3
Figure: Counting the number of “up..up” interfaces

Comments

Popular posts from this blog

The Thing With CUCM Device Packs

En Bloc Dialing vs Digit-By-Digit Dialing

Call Forward And Call Hunt on CUCM