How To Determine What Interface You Are In

Unanswered Question
Jan 21st, 2009
User Badges:

I want to write an alias that will show you the details for the interface you are in without having to enter any info. So far I've come up with "alias interface info do show running-config interface" but I still need to enter "FastEthernet1/0/6" as a paramaeter after the "info" alias to show the details of that particular interface. Is there a way to pass this info along automagically?


Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
John Blakley Wed, 01/21/2009 - 07:27
User Badges:
  • Purple, 4500 points or more

Unfortunately, no. I posed this question a couple months back. Since it's got a *nix feel to it, I wondered if there was a hidden command to show where you're at in the router (like pwd). The only answer I could get back was to do a show history and trace back from there.


HTH,


John

justbailey Tue, 01/27/2009 - 08:36
User Badges:

Once you are in the router, you are then in the router, not in an interface. Like walking into a house, no matter what door you came in, you are in the house, not the door.


For example, you could enter a router through an interface 10.0.0.1. Then you ping another device. If the loopback is configured for 192.168.0.1, you present yourself as the latter, not as the interface you logged into. Hope this makes sense,


Justin

terrygwazdosky Tue, 01/27/2009 - 09:06
User Badges:

It makes perfect sense, it just isn't what I'm asking. Say you want to configure a port such as fa0/2 on a switch. Do the following:

conf t

int fa0/2

description test


And now you want to see how the port is configured. You have to type "do sh run int fa0/2". I was looking for a way to alias this like I outlined in my previous post (alias interface info do show running-config interface). Now all I have to type is info fa0/2, which is an improvement. However, I was trying to find out if there was some mechanism of IOS that could automatically pass the interface I was in (fa0/2) as the parameter after "info".

justbailey Tue, 01/27/2009 - 09:33
User Badges:

Ok, got it..I misunderstood the "interface I was in" line.


I dont think this is possible, I was just looking through the command structure available. Sounds like it could be useful though, maybe you could suggest it for future releases :-)

Actions

This Discussion