Was chatting with Darren at Darren’s CCIE mission yesterday. We started to discuss some of the commands we frequently used to check IP addresses etc. He thought I should do a post on it and here it is.
This first one I stumbled upon when I was going to type show ip prot but accidentally typed show ip port which turned out to be a good thing. This command show port mappings for different protocols used by IOS. If we get a task on lab to do filtering and can’t remember the port this can be really useful.
As you can see we can do an include to match on a port number or a protocol name.
The next command is one of the commands I use the most, show ip int brief | ex una. This will list all interfaces that have an IP address configured.
This is good but it will not tell us the netmask. If we have a troubleshooting task it is nice to check what IP’s are configured and if the correct netmask is used. Wit the next command we can check the netmask. Show ip int | i Internet.
If I want to verify reachability quickly I need to list all IP address configured on the devices. I use the show ip aliases command to do this. I paste the command in including a line feed on all devices and then hold alt down while I mark all the adresses.
I then put these addresses in a simple TCP script like below:
tclsh
foreach ip {
1.1.1.1
2.2.2.2
3.3.3.3
} { ping $ip}
This post should give you some tips on how to quickly discover IP addresses configured.
Hi Daniel,
I believe the command you are looking for is show protocol.
show protocol
Global values:
Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
Internet address is 155.1.146.1/24
Serial0/0 is up, line protocol is up
Internet address is 155.1.0.1/24
FastEthernet0/1 is administratively down, line protocol is down
Serial0/1 is up, line protocol is up
Internet address is 155.1.13.1/24
Loopback0 is up, line protocol is up
Internet address is 150.1.1.1/24
Using this command you can check both the IP address and mask assigned to each interface.
Hi Tommey,
Never used that command. That is a good command. Quick way to see if routing is enabled.
R1#show prot | ex down|up
Global values:
Internet Protocol routing is enabled
Internet address is 1.1.1.1/24
Internet address is 2.2.2.2/24
This will show a good summary of adresses and if routing has been enabled.
Pingback:CCIE Redistribution labs – #1 | Darren's CCIE mission
Wow you guys are awesome to blow these reminders into our ears again…thumbs up!!!
Daniel
you probably know this one already but the SECTION command is very useful
for instance show run | section (anything here to have a limited but precise view of what you need) or show ip protocols | section ? .It is better than | begin because there is less to see on the screen.It has many different applications it is worth a try.
I agree with section command but it doesn’t work with Catalysts 3560 running 12.2 version…
No, for some reason Cisco has not implemented that on Catalysts. The best you can do is to do show run | b router ospf or similar.