cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
637
Views
12
Helpful
3
Replies

Using CLI command properly

fabio.marino
Level 1
Level 1

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.

3 Replies 3

davy.timmermans
Level 4
Level 4

Here are 2 examples you could use:

1)

show ip int brief

ip

ip2

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

ranraju
Cisco Employee
Cisco Employee

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

Thanks, both solutions are good.

Review Cisco Networking for a $25 gift card