6

Is there any way to show a total count of interfaces that are in status "up" on a cisco router?

The purpose is to let a script go through all routers and show a summarization count of "up" interfaces.

Sebastian Wiesinger
  • 8,157
  • 3
  • 37
  • 62
Bulki
  • 2,413
  • 7
  • 27
  • 44

2 Answers2

6

You can show all interfaces that are up by:

show interfaces status | include connected

Then your script can count them.

The show interfaces status cli command shows you all interfaces. The interfaces that are "up" are in the connected state. The | include connected shows only the lines of the output that contain the word "connected".

Newer Cisco IOS contain a count parameter that can count lines which match a regex. This is not available on all IOS versions.

Sebastian Wiesinger
  • 8,157
  • 3
  • 37
  • 62
1

You may also use these commands:

sh ip int bri | include up
sh int des | include up

chris
  • 357
  • 4
  • 13