Discovery · Lesson 10

How do network addresses fit together?

Names, IP addresses, transport ports and MAC addresses describe different parts of the same exchange.

Several identifiers, one exchange

Network conversations use different identifiers for different decisions.

The Domain Name System (DNS) can resolve names to Internet Protocol (IP) addresses. A name can have several addresses, and several names can share an address. The application chooses a transport protocol and port; DNS address records do not choose that port.

On an Ethernet link, a Media Access Control (MAC) address identifies a local frame receiver. For a remote IP destination, that receiver is normally the gateway, not the remote server. Routers replace the local frame at each hop; switches normally forward within the same link-layer network.

For Transmission Control Protocol (TCP) or User Datagram Protocol (UDP), a port is a 16-bit number from 0 to 65535. IP addresses, ports and the transport protocol together distinguish endpoints and conversations; a port alone is not a globally unique identity.

An IP address is assigned to an interface, not permanently to a person or device. A prefix length is needed to determine its network. On Ethernet, Address Resolution Protocol (ARP) finds the next-hop MAC address for IPv4; IPv6 uses Neighbor Discovery. Network Address Translation (NAT) or a proxy can change addresses or ports, so the unchanged-destination model assumes neither is present.

Do not treat every address as the same kind of identity.DNS names help humans and applications identify services; IP addresses support routing; ports select services; MAC addresses deliver frames across one local link.

Build the model

Four addressing roles

01

Name

DNS provides a human-friendly label that can resolve to one or more addresses.

02

IP address

An IP address identifies an interface for routing; its network is interpreted with a prefix length.

03

Port

A TCP or UDP port identifies an endpoint together with the IP address and transport protocol.

04

MAC address

A link-layer address identifies the next local receiver for a frame.

Follow the request

Each layer answers a different question

The identifiers cooperate but are not interchangeable. DNS can change its answer, routing can choose a different path, and the local MAC destination can change at every hop.

A request moves from a DNS name to an IP address, a transport port, a next-hop MAC address, and a local Ethernet or Wi-Fi frame.
Names, IP addresses, ports, and MAC addresses serve different decisions in one exchange.

Compare the local hops

Compare three hops in a simplified, direct TCP exchange without NAT or a proxy. The server is on the router's second link; these are documentation addresses, not a live DNS result.

example.com · 192.0.2.10:53000 ↔ 203.0.113.20:443

Knowledge check

Test your addressing model