Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

How To Determine What Interface You Are In

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.

4 REPLIES

Re: How To Determine What Interface You Are In

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

HTH, John *** Please rate all useful posts ***
New Member

Re: How To Determine What Interface You Are In

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

New Member

Re: How To Determine What Interface You Are In

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".

New Member

Re: How To Determine What Interface You Are In

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 :-)

191
Views
0
Helpful
4
Replies
CreatePlease to create content