GATE CS - COMPUTER NETWORKS:Network Layer
Mastering network layer concepts and implementation.
Network Layer for GATE CS
GATE Network Layer marks come from IP addressing / subnetting, fragmentation math, and routing (distance vector / link state). Layer definitions are background.
IPv4 packet and fragmentation
MTU limits payload. Fragmentation splits a datagram; offset is in 8-byte units. More-fragments flag on all but the last.
Worked: fragmentation
Payload 4000 bytes, MTU 1500, IPv4 header 20 bytes (no options).
Max data per fragment = 1500 − 20 = 1480, which is divisible by 8.
Number of fragments = ceil(4000 / 1480) = 3.
Offsets: 0, 1480/8=185, 2960/8=370. Last fragment length = 4000 − 2×1480 = 1040 data + 20 header = 1060 bytes total.
Trap: forgetting the header size or using offsets in bytes instead of ×8.
Addressing
Classful vs CIDR. Network vs host bits. Subnet mask and number of hosts = for all-zero/all-one host parts (unless the question uses modern “0 usable” conventions — follow the paper).
Routing
- Distance vector (Bellman–Ford style): share distance tables; count-to-infinity; split horizon
- Link state (Dijkstra): flood LSAs; each router computes SPF
Match protocol names (RIP ≈ DV, OSPF ≈ LS) when asked.
Forwarding
Longest-prefix match on the forwarding table. Default route 0.0.0.0/0 when nothing else matches.
Related transport reliability: Transport Layer. Practice: GATE hub.