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
| Layer | Address | Example | Identifies |
|---|---|---|---|
| Application | URL | http://www.stanford.edu | a resource |
| Transport | port | (HTTP), (SMTP) | the application on a host |
| Network | IP | a device across networks | |
| Data Link | MAC | 00:23:ae:e7:52:85 | an 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
For : give the binary, the subnet mask in dotted decimal, and how a peer decides if it's in the same subnet.
Answer
- Short answer: Mask ; compare the first 26 bits of both addresses β equal prefixes βΉ same subnet βΉ direct delivery, else βΉ router.
- Why: Prefix routing β hierarchical addresses make the local/remote decision a single masked comparison.
Two browser tabs both fetch from port 80 of the same server β why don't the responses mix?
Answer
- Short answer: Each tabβs connection uses a distinct random client port; the 4-tuple disambiguates.
- Why: Transport-layer identity β ports address applications/connections, IP only addresses the machine.