02-23-2011 07:50 AM - 편집 03-06-2019 03:43 PM
Hi to all, i have a simple question but i eas no abel to solve it.
I have an ip address of an interface. After accessing the device i need to discovery some information, for example:
-which interface has this ip address
-netmask of the ip address
I know that i can use the "pipe" associated with some command like show ip interface and so on, but i was no able to fix it.
Thanks a lot, Fabio.
날짜: 02-23-2011 08:01 AM
Here are 2 examples you could use:
1)
show ip int brief
--> check corresponding interface (eg Gig0/0)
then re use the interface in the following command
show run int gig0/0
2)
sh interface | i Vlan|Fa|Gi|10.A.B.C
this is an or function
it will show all interfaces present and display of the interface you want to know
Vlan100 is up, line protocol is up
Internet address is 10.A.B.C/30
Vlan101 is up, line protocol is up
Vlan102 is up, line protocol is up
GigabitEthernet1/1 is administratively down, line protocol is down (disabled)
GigabitEthernet1/2 is administratively down, line protocol is down (disabled)
GigabitEthernet1/3 is up, line protocol is up (connected)
GigabitEthernet1/4 is administratively down, line protocol is down (disabled)
GigabitEthernet1/5 is up, line protocol is up (connected)
GigabitEthernet1/6 is administratively down, line protocol is down (disabled)
GigabitEthernet1/7 is up, line protocol is up (connected)
GigabitEthernet1/8 is administratively down, line protocol is down (disabled)
GigabitEthernet1/9 is up, line protocol is up (connected)
GigabitEthernet1/10 is up, line protocol is up (connected)
GigabitEthernet1/11 is up, line protocol is up (connected)
GigabitEthernet1/12 is up, line protocol is up (connected)
GigabitEthernet1/13 is up, line protocol is up (connected)
GigabitEthernet1/14 is administratively down, line protocol is down (disabled)
GigabitEthernet1/15 is administratively down, line protocol is down (disabled)
GigabitEthernet1/16 is administratively down, line protocol is down (disabled)
GigabitEthernet1/17 is administratively down, line protocol is down (disabled)
GigabitEthernet1/18 is administratively down, line protocol is down (disabled)
GigabitEthernet1/19 is administratively down, line protocol is down (disabled)
날짜: 02-23-2011 08:06 AM
The commands you could use to find out which interface has the IP address assigned (x.x.x.x)
1. "show ip int br | in x.x.x.x"
2. "show run | in x.x.x.x|interface"
3. "show run int gig y/y" ----- by now if you have found out which interface has the ip address and you need to check whats the subnet mask.
Hope this helps,
(please rate helpful posts)
Regards,
ranraju
날짜: 02-23-2011 08:30 AM
Thanks, both solutions are good.
새로운 아이디어를 발견하고 저장하세요. 전문가 답변, 단계별 가이드, 최근 주제 등 다양한 내용을 확인해 보세요.
처음이신가요? 아래 팁들을 확인해 보세요. 시스코 커뮤니티 사용하기 새 멤버 가이드