The Transport layer (Layer 4 of the OSI model; Layer 3 of TCP/IP) provides end-to-end communication between applications. Key responsibilities:
TCP uses a sliding window mechanism for flow control. The receiver advertises a window size — the maximum amount of data (in bytes) the sender may transmit before receiving an ACK.
TCP detects congestion (packet loss) and reduces its sending rate to avoid making congestion worse:
The Network layer (OSI Layer 3; TCP/IP Internet layer) handles logical addressing and routing. The key protocol is IP (Internet Protocol).
| Field | Size | Purpose |
|---|---|---|
| Version | 4 bits | IPv4 = 4, IPv6 = 6 |
| Header Length | 4 bits | Length of header (usually 20 bytes) |
| Total Length | 16 bits | Total packet size (header + data) |
| TTL | 8 bits | Time To Live — decremented at each router hop; discarded at 0 |
| Protocol | 8 bits | Identifies transport protocol in payload (6=TCP, 17=UDP) |
| Source IP | 32 bits | Sender's IP address |
| Destination IP | 32 bits | Intended recipient's IP address |
| Checksum | 16 bits | Header error detection |
ARP resolves an IP address to a MAC address within the same local network (LAN):
ARP only works on the local network. For remote destinations, the sender ARPs for the default gateway (router) MAC, then the router handles forwarding.
ICMP sends control and error messages. It operates at the Network layer and is not used for data transfer:
ping to test reachabilitytracerouteThe Data Link layer (OSI Layer 2) is responsible for node-to-node delivery on the same network segment. It encapsulates packets into frames and uses MAC addresses.
| Field | Size | Purpose |
|---|---|---|
| Preamble | 7 bytes | Synchronisation — alternating 10101010 pattern |
| Start Frame Delimiter | 1 byte | 10101011 — signals start of frame content |
| Destination MAC | 6 bytes | Recipient's MAC address |
| Source MAC | 6 bytes | Sender's MAC address |
| EtherType / Length | 2 bytes | Protocol type (e.g. 0x0800 = IPv4, 0x86DD = IPv6) |
| Payload (data) | 46–1500 bytes | Encapsulated IP packet |
| FCS (CRC) | 4 bytes | Frame Check Sequence — error detection using CRC |
A MAC address (Media Access Control address) is a 48-bit (6-byte) hardware address burned into a NIC at manufacture. Written as 6 hex pairs: AA:BB:CC:DD:EE:FF. The first 3 bytes = OUI (Organisationally Unique Identifier — manufacturer); the last 3 bytes = device-specific.
| MAC Address | IP Address | |
|---|---|---|
| Layer | Data Link (Layer 2) | Network (Layer 3) |
| Scope | Local — within a LAN segment | Global — end-to-end across networks |
| Format | 48-bit hex (AA:BB:CC:DD:EE:FF) | 32-bit (IPv4) or 128-bit (IPv6) |
| Assignment | Burned into NIC hardware | Assigned by DHCP or statically |
| Changes? | Changes at each network hop (router) | Stays same source→destination |
| Resolution | ARP resolves IP → MAC | DNS resolves name → IP |
CRC (Cyclic Redundancy Check) is used in Ethernet frames (FCS field). The sender performs polynomial division on the frame data and appends the remainder (checksum) to the frame. The receiver performs the same calculation — if the result doesn't match the FCS, the frame is discarded (corrupt).
8 questions · 20 marks · instantly marked
| Term | Definition |
|---|