cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

19055
Views
17
Helpful
6
Replies
Beginner

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
Participant

Re: Equivalent of netstat command on cisco router

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

View solution in original post

6 REPLIES 6
Participant

Re: Equivalent of netstat command on cisco router

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

View solution in original post

Beginner

Re: Equivalent of netstat command on cisco router

also "show tcp brief"

Enthusiast

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
Highlighted
Beginner

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"?

Beginner

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 ?

 

 

Beginner

nareshmahato,For ASAs, use sh

nareshmahato,

For ASAs, use sh asp table sockets

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here