Execute show commands while configuring a router

I've always wanted to be able to execute a show command while configuring a router (I'm never good at remembering subinterface numbers). A while ago Cisco introduced the do configuration command that allows you to execute any exec-level command (including telnetting to another device) without leaving the current configuration mode.For example, to view the interface numbers while trying to configure an interface, use the do show ip interface brief command:

router(config-if)#do show ip interfaces brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.0.6 YES manual administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 unassigned YES manual up up
Serial0/0/0.101 172.16.1.6 YES manual up up
Serial0/1/0 unassigned YES unset administratively down down
Serial0/1/1 unassigned YES TFTP administratively down down
Loopback0 172.16.0.22 YES manual up up

2 comments:

  1. Just found your blog, it's great! ... and I have to say that this is the coolest thing to happen in IOS for a long time!

    ReplyDelete
  2. Cool trick !!

    hackathology

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.