07-31-2003 07:28 AM - edited 03-02-2019 09:16 AM
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
Solved! Go to Solution.
07-31-2003 09:26 AM
You can use "show ip sockets" command for that.
07-31-2003 09:26 AM
You can use "show ip sockets" command for that.
08-07-2003 04:12 AM
also "show tcp brief"
04-03-2012 07:01 AM
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) | ||||
Prot | Local Address | Foreign Address | Service | State |
tcp | *:22 | *:0 | SSH-Server | LISTEN |
tcp | *:23 | *:0 | Telnet | LISTEN |
tcp | *:15074 | 10.6.6.6:49 | IOS host service | ESTABLIS |
tcp | *:22 | 10.1.1.1:11321 | SSH-Server | ESTABLIS |
tcp | *:64583 | 10.2.2.2:49 | IOS host service | ESTABLIS |
udp | *:49 | 10.3.3.3:0 | SSH Process | LISTEN |
udp | *:49 | 10.4.4.4:0 | SSH Process | LISTEN |
udp | *:49 | 10.6.6.6:0 | SSH Process | LISTEN |
udp | *:63169 | *:0 | IP SNMP | LISTEN |
udp | *:67 | *:0 | DHCPD Receive | LISTEN |
udp | *:123 | *:0 | NTP | LISTEN |
udp | *:54084 | 10.7.7.7:162 | IOS host service | ESTABLIS |
udp | *:161 | *:0 | IP SNMP | LISTEN |
udp | *:161 | *:0 | IP SNMP | LISTEN |
udp | *:162 | *:0 | IP SNMP | LISTEN |
udp | *:162 | *:0 | IP SNMP | LISTEN |
udp | *:54046 | *:0 | IP SNMPV6 | LISTEN |
10-30-2012 02:55 PM
Tony
Do you know what feature in the 12.4(x)T code supports "sh control-plane host open-ports"?
04-21-2014 04:39 AM
Thanks about your valuable response !
This commands are only available on Cisco routers, tell me the command for
Cisco ASA / PIX and switches ?
08-01-2014 08:20 AM
nareshmahato,
For ASAs, use sh asp table sockets
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide