Common ports and application protocols

Ports let TCP and UDP tell applications apart. IP address + port = an endpoint (socket); a TCP connection is a pair of them.

The ports

Full registry: IANA’s service names and port numbers list.

HTTP notes

Client-server, with request/response pairs forming a session. It’s stateless as a protocol, but usually called connection oriented since it rides TCP. Media independent too: any data type goes.

Full walkthrough with URL anatomy and the GET cycle is in how HTTP works.

DNS notes

Name to IP lookup, the network’s 411, served by a distributed server hierarchy. Your resolver checks its cache first; a miss sends the query up to other DNS servers. The full resolution chain is in how DNS works.

Browser loads nothing but you suspect the network is fine? Test resolution directly:

bash
nslookup google.com    # Windows or Linux, no reply → DNS server unreachable

TFTP earns a special mention on routers and switches: it moves config files and IOS images. Because it’s UDP, the TFTP application itself retransmits lost pieces.

DHCP: the DORA process

A client obtains an address from a server holding a pool for its subnet. Four steps:

  1. Discover (client): a broadcast, source IP 0.0.0.0 because the client has no address yet. The whole broadcast domain hears it.
  2. Offer (server): a proposed address, including the client’s hardware address.
  3. Request (client): “I accept your offer.” This step also picks a winner if several servers offered.
  4. Acknowledge (server): lease confirmed, client initialization done.

Packet-level detail, DHCP relay, and IOS server config are in how DHCP works.

Source 0.0.0.0 and destination 255.255.255.255 here are the reserved addresses from reserved IPv4 addresses.

Router as DHCP client

Unusual (router interfaces normally get static addresses), but useful at scale: hundreds of branch routers pulling public IPs from the ISP’s DHCP server beats paying for statics.

The interface then runs DORA like any client:

console
Router(config)# interface g0/0
Router(config-if)# no shutdown
Router(config-if)# ip address dhcp

Verify with show ip interface brief: an address showing as dynamically assigned means the lease came through.