Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Equivalent of netstat command on cisco router

Is there any way to see on what ports a Cisco router is listening to just like a "netstat -an" on UNIX would do. I could easily do a portscan to give me this report but would prefer having the information through a show command.

thx

james

1 ACCEPTED SOLUTION

Accepted Solutions
New Member

Re: Equivalent of netstat command on cisco router

You can use "show ip sockets" command for that.

6 REPLIES
New Member

Re: Equivalent of netstat command on cisco router

You can use "show ip sockets" command for that.

New Member

Re: Equivalent of netstat command on cisco router

also "show tcp brief"

New Member

Re: Equivalent of netstat command on cisco router

On newer IOS you can type a command to get a full output of ports and services.  You must be running 12.4(x)T or newer, which includes the 15.x train.  I don't think this command has been ported to switches yet.

show control-plane host open-ports

You will get an ouput similiar to the info below.  I am not sure why, but telnet shows up even though we have telnet disabled via the 'line vty' configuration.

ROUTER#sh control-plane host open-ports
Active internet connections (servers and established)
ProtLocal AddressForeign AddressServiceState
tcp*:22*:0SSH-ServerLISTEN
tcp*:23*:0TelnetLISTEN
tcp*:1507410.6.6.6:49IOS host serviceESTABLIS
tcp*:2210.1.1.1:11321SSH-ServerESTABLIS
tcp*:6458310.2.2.2:49IOS host serviceESTABLIS
udp*:4910.3.3.3:0SSH ProcessLISTEN
udp*:4910.4.4.4:0SSH ProcessLISTEN
udp*:4910.6.6.6:0SSH ProcessLISTEN
udp*:63169*:0IP SNMPLISTEN
udp*:67*:0DHCPD ReceiveLISTEN
udp*:123*:0NTPLISTEN
udp*:5408410.7.7.7:162IOS host serviceESTABLIS
udp*:161*:0IP SNMPLISTEN
udp*:161*:0IP SNMPLISTEN
udp*:162*:0IP SNMPLISTEN
udp*:162*:0IP SNMPLISTEN
udp*:54046*:0IP SNMPV6LISTEN
New Member

Equivalent of netstat command on cisco router

Tony

Do you know what feature in the 12.4(x)T code supports "sh control-plane host open-ports"?

New Member

Thanks about your valuable

Thanks about your valuable response !

This commands are only available on Cisco routers, tell me the command for 

Cisco ASA / PIX and switches ?

 

 

New Member

nareshmahato,For ASAs, use sh

nareshmahato,

For ASAs, use sh asp table sockets

12930
Views
17
Helpful
6
Replies