Network Addresses (URL, Port, IP, MAC)

Context: FIT1047_MOC Β· one address type per layer β€” the table that organises half the networks exam Β· resolution between them in Address Resolution (DNS and ARP)

Quick Revision

  • 🎯 Objective: URL (application) βž” port (transport) βž” IP (network) βž” MAC (data link) β€” identity at each layer; an address identifies but does NOT route by itself.
  • ⚑ Key Constraint: IPv4 structure β€” means first 26 bits = network+subnet, last 6 = host ⟹ same-subnet test by prefix comparison.

βš–οΈ Core Decision Matrix β€” one address per layer

LayerAddressExampleIdentifies
ApplicationURLhttp://www.stanford.edua resource
Transportport (HTTP), (SMTP)the application on a host
NetworkIPa device across networks
Data LinkMAC00:23:ae:e7:52:85an interface within a LAN

πŸ“ Core

IPv4

  • 32 bits, dotted decimal βž” each dot-group = one byte: .
  • Hierarchy βž” network (e.g. Monash) | subnet (a LAN) | host β€” the split point given by the subnet mask: ≑ (26 prefix bits, -ish hosts).
  • Why hierarchy βž” a device can see immediately whether a destination shares its subnet (deliver directly) or not (send to the router).
  • Exhaustion βž” billion, roughly half practically usable β€” new IPv4 blocks are gone.

IPv6

  • 128 bits βž” addresses β€” not IPv4 but astronomically more.
  • Deliberately β€œexcessive” βž” the space buys clean hierarchy: IANA+RIR – β†’ ISP (9 bits) β†’ organisation (16 bits, ) β†’ subnet (16 bits, ) β†’ interface ID (64 bits) ⟹ every organisation gets LANs, assignment stays simple.

Ports (application addressing)

  • Why βž” several browser windows share one IP; the port pairs each response with its connection.
  • Convention βž” server ports fixed ( HTTP, SMTP), client ports random, one per connection () β€” a connection is the 4-tuple (src IP:port, dst IP:port).

⚠️ Common Mistakes

  • πŸ’‘ Address β‰  route βž” knowing says nothing about how to reach it β€” that’s routing/resolution’s job.
  • πŸ’‘ arithmetic βž” mask counts PREFIX bits; hosts get bits β€” reading it backwards wrecks subnet questions.
  • πŸ’‘ MAC is LAN-scoped βž” frames use MACs only within one subnet; crossing a router swaps frames (and MACs), never the IP.

🧠 Active Recall