cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
31418
Views
22
Helpful
6
Replies

Equivalent of netstat command on cisco router

jamesgef
Level 1
Level 1

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

prafuljaded
Level 3
Level 3

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

View solution in original post

6 Replies 6

prafuljaded
Level 3
Level 3

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

also "show tcp brief"

tony.curtis
Level 4
Level 4

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

Tony

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

Thanks about your valuable response !

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

Cisco ASA / PIX and switches ?

 

 

nareshmahato,

For ASAs, use sh asp table sockets

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: