TCP, UDP & Network Devices
Cheat sheet · https://pcornel.dk/topic.php?topic=9
Answer
TCP sets up a connection and delivers data reliably and in order; UDP just sends datagrams. Both use port numbers to identify the application — 443 for HTTPS, 53 for DNS, 22 for SSH. Routers forward by IP address; firewalls and access lists also look at the ports.
Remember
Ping proves IP reachability, not that the port is open. A TCP connection is identified by source and destination address and port. "Connection refused" means the host answered and nothing listens; a timeout means something on the path, or the host, dropped it silently. UDP has no handshake, so silence proves little.
First checks
telnet <host> <port>from a Cisco device — tests a TCP port: "Open" or refused/timeout.Test-NetConnection <host> -Port <port>(Windows),nc -vz <host> <port>(Linux) — the same from a host.show access-lists— match counters on any filter in the path.show ip interface <interface> | include access list— is a list applied?- On the server:
netstat -anorss -ltn— is the port listening?
Commands
show ip interface brief- Compact IPv4 interface/address/protocol state.
digpingshow access-listsshow tcp briefshow control-plane host open-portsshow ip interface <interface>ss -ltnu
Verify in this order
name resolved → IP path to the server → no filter drops the port → service listening on that port → TCP handshake completes (or UDP reply returns) → application answers
Where it usually breaks
physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=9