A port number is a Layer 4 transport identifier from 0 through 65,535. It directs network data to a particular application process on the destination host, not to a physical connector. This distinction matters because one computer can run many networked applications simultaneously. section 4.3.1 section 22.1.1
Figure 22.2 PC1 sends a TCP segment to SRV1. The segment is sourced from port 50000 on PC1 and destined for port 443 on SRV1. SRV1’s reply reverses the ports: it is sourced from port 443 on SRV1 and destined for port 50000 on PC1.
Follow a client request from source port 50000 to destination port 443, then observe how the server reverses the ports in its reply. section 22.1.1
Understand a port number through its role in communication:
- The destination port identifies the service or application process receiving the message; a server running that service is said to listen on the port. section 4.3.1 section 22.1.1
- Layer 4 adds the port number in its header before Layer 3 adds the destination IP address and Layer 2 addresses the next hop. section 4.3.2
- TCP and UDP use ports, and each application-layer protocol commonly uses a particular port, such as HTTP 80, HTTPS 443, DNS 53, and SSH 22. section 22.1.1
- A connection identifies traffic using source and destination port numbers together with protocol and IP-address information; omitting a port in an ACL allows every port in that position to match. section 24.1.2
Filtering HTTPS with an extended ACL
Cisco IOS can match TCP port 443 to control HTTPS traffic: `permit tcp 192.168.1.0 0.0.0.255 192.168.3.0 0.0.0.255 eq 443` permits that source network to reach the destination network's HTTPS services. A later `deny tcp any any eq 443` denies other HTTPS traffic, while `permit ip any any` permits remaining IPv4 traffic. Every specified match parameter must match. section 24.1.2
For troubleshooting and exams, separate the jobs clearly: IP addresses deliver data to the destination host, MAC addresses deliver it across each hop, and port numbers deliver it to the correct application process. section 4.4






