Sunday, February 1, 2009

Handy "sh protocol" command

OK...let me show another handy command "sh protocol". We all know that with the help of "sh ip interface brief" command we can see all the configured interfaces with the ip address and their status. But still we can't determine the configured subnet mast for the interface. So there is a better command to get the entire information along with the subnet mask. I learned this command during my CCNA studies but found that not many people actually know about this handy command. Specially now we can also determine the Network ID of configured ip address and it's subnet information too. So here we go :-)

R1#sh ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.0.0.1 YES manual up up
Serial0/0 1.1.1.1 YES manual up down
FastEthernet0/1 20.0.0.1 YES manual up up
Serial0/1 2.2.2.2 YES manual up down


R1#sh protocol
Global values:
Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
Internet address is 10.0.0.1/8
Serial0/0 is up, line protocol is down
Internet address is 1.1.1.1/30
FastEthernet0/1 is up, line protocol is up
Internet address is 20.0.0.1/8
Serial0/1 is up, line protocol is down
Internet address is 2.2.2.2/30
In newer IOS verions & platforms you may also need to add interface name specifically with command to view information:
R1#sh protocol serial 0/0
Serial0/0 is up, line protocol is down Internet address is 1.1.1.1/30
Best Regards,
Deepak Arora

No comments: