IP Addressing Cross-Concept Problems: Subnet Decisions, Longest-Prefix Routing and Fragmentation
Follow one IPv4 datagram from a /27 source LAN through local-delivery logic, an overlapping routing table and exact fragmentation fields.
KnowledgeGate Team
Exam prep & CS education

A cross-concept IPv4 question rarely stops after the network address. It can use that answer to decide whether a destination is local, select a route and fragment the datagram for the selected link. The calculations use addresses, masks, routes, MTUs, lengths and offsets. Use GATE CS Exam Preparation for the wider study path.
1. IP addressing cross-concept problems are a decision chain, not a new protocol
Cross-concept questions connect two or more IP-addressing decisions. They do not define an Internet-layer protocol, address class or routing method. The task is to preserve each intermediate result and feed it into the next decision.
Solve them carefully in one direction: decode the source prefix, classify the destination as local or remote, choose the Layer 2 next hop, perform the router's longest-prefix lookup, compare the datagram size with the outgoing MTU, then write the fragment fields. Each answer feeds the next step. If network, usable-host and broadcast calculations are not yet comfortable, revise IP Addressing and Subnetting Explained first. The important connection is the hand-off between concepts.
2. IPv4 prefix calculation fixes the source LAN boundaries
Host H1 is 192.168.10.34/27. Its default gateway is 192.168.10.62, and local peer H2 is 192.168.10.50. Its illustrative incoming-link MTU is 4,500 bytes, enough for the later 4,000-byte datagram.
A /27 prefix gives mask 255.255.255.224. The last-octet block size is 256 - 224 = 32. Since 34 lies in the .32-.63 block, the network is 192.168.10.32, usable hosts run from 192.168.10.33 to 192.168.10.62, and the broadcast is 192.168.10.63.
Address | Role | Result after | Validity |
|---|---|---|---|
| H1 |
| Usable host |
| H2 |
| Usable host |
| Gateway |
| Usable host |
Thus H2 and the gateway are both inside the block, and neither is the network nor broadcast address.
3. The subnet result decides direct delivery or default-gateway delivery
At this source host, H1 applies its own /27 mask when testing a destination. For H2, 192.168.10.34 AND 255.255.255.224 and 192.168.10.50 AND 255.255.255.224 both produce 192.168.10.32. H1 therefore resolves H2's MAC address and sends the frame directly. It still builds an IP datagram, whose destination is 192.168.10.50; direct delivery describes the current link, not a different packet type.
Now use remote destination D, 172.16.5.200. Masking it with /27 gives 172.16.5.192, not H1's 192.168.10.32. H1 resolves the MAC address of gateway 192.168.10.62 and sends the first-hop frame there. The gateway removes that frame before routing the datagram onward. Its IP destination remains 172.16.5.200.
That distinction matters: subnet membership selects the immediate Layer 2 recipient. It does not replace the end-to-end IP destination. Assume there is no NAT anywhere in this scenario.

4. Longest-prefix matching chooses the router's outgoing path
Router R1 receives the datagram and checks D against this deliberately overlapping table. Row order has no role in the decision.
Destination prefix | Next hop | Relevant link detail |
|---|---|---|
|
| Not selected |
|
| Not selected |
|
| Output MTU |
|
| Default route |
Destination 172.16.5.200 matches /16. The /22 mask is 255.255.252.0, giving the range 172.16.4.0-172.16.7.255, so /22 also matches. The /25 range is 172.16.5.128-172.16.5.255, so that entry matches too.
The /25 entry wins because 25 matching prefix bits are more specific than 22, 16 or 0. This decision supplies next hop 10.0.4.2 and outgoing MTU 1,500 bytes. Neither the first matching row, the numerically closest-looking network nor the default route can replace longest-prefix comparison.
5. IPv4 fragmentation follows the chosen link's MTU
IPv4 and Network Layer Protocols: Complete Guide with Worked Examples for GATE CS connects header fields with ARP, ICMP, DHCP and NAT. For deeper fragmentation practice, IP Fragmentation and MTU Explained continues into re-fragmentation, DF and lost-fragment behaviour. The 4,000-byte baseline takes on a different role here: it begins only after the /27 delivery test and /25 route choice, so the selected route supplies the 1,500-byte MTU.
R1 received a 4,000-byte IPv4 datagram over the 4,500-byte-MTU source LAN. It has a 20-byte header with no options and a 3,980-byte payload. Its Identification is 0x4A3B, DF = 0, original MF = 0, fragment offset is 0, and TTL is 64. The selected /25 output link has MTU 1,500 bytes, so R1 must fragment it.
The MTU includes a new header on every fragment. The largest non-final payload is therefore:
floor((1500 - 20) / 8) x 8 = floor(1480 / 8) x 8 = 185 x 8 = 1,480 bytes
Offsets count 8-byte payload units, which is why every non-final payload must be a multiple of 8.
Fragment | Payload bytes | Total length | Payload byte range | Offset | MF | TTL | Identification |
|---|---|---|---|---|---|---|---|
1 | 1,480 | 1,500 |
| 0 | 1 | 63 |
|
2 | 1,480 | 1,500 |
| 185 | 1 | 63 |
|
3 | 1,020 | 1,040 |
| 370 | 0 | 63 |
|
Check the payload: 1,480 + 1,480 + 1,020 = 3,980 bytes. Fragment 2's offset is 1,480 / 8 = 185; fragment 3's is 2,960 / 8 = 370. Adding each new 20-byte header produces lengths 1,500, 1,500 and 1,040.
R1 decrements TTL once from 64 to 63, so all fragments carry 63 and the same Identification. The final payload need not be divisible by 8. Only the destination reassembles the datagram.

6. IP addressing traps that create plausible wrong answers
Read every trap as mistake, consequence, then correction:
Mistake | Consequence | Correction |
|---|---|---|
Treat | Wrong block | It leaves 5 host bits |
Call | Broadcast used as a host | Usable range ends at |
ARP for remote D | Non-local MAC requested | Resolve the gateway's MAC |
Replace D with the gateway IP | End-to-end destination breaks | Change only the first-hop MAC |
Choose the first route |
| Compare all matches; select |
Store offset | Bytes replace 8-byte units | Store |
Subtract one header overall | Fragment lengths are wrong | Add a header per fragment |
Align the final payload | Valid bytes are discarded | Only non-final payloads need alignment |
Reassemble at the next hop | Routers do extra work | Reassemble only at the destination |
Decrement TTL per fragment | One hop appears as several | R1 gives every fragment TTL |
If DF = 1, R1 cannot fragment this 4,000-byte datagram for a 1,500-byte link. It discards the datagram and returns ICMP Destination Unreachable, Fragmentation Needed (Type 3, Code 4).
7. How exams combine subnetting, forwarding and fragmentation
A problem can ask you to derive network or broadcast addresses, validate a gateway, choose local or remote delivery, identify the first frame's MAC target, compare prefixes, calculate fragment payloads, fill length, offset and MF fields, or track TTL and IP addresses.
On scratch paper: draw the source block, mark network and broadcast, AND both endpoints, write every matching route, circle the longest prefix, copy its MTU, separate header and payload, round non-final payloads down to an 8-byte multiple, build byte ranges, divide starting bytes by 8 for offsets, then verify the payload sum.
8. IP addressing cross-concept problems in the short version
The prefix fixes the local block. The masked comparison chooses direct or gateway delivery. Longest-prefix matching selects the path, whose MTU determines fragment sizes and offsets.
For revision, change D to 172.16.5.100. It matches /16 and /22, but not 172.16.5.128/25, so /22 -> 10.0.3.2 wins. Fragmentation cannot be recomputed until that route's outgoing MTU is supplied. Continue with GATE Guidance by Sanchit Sir for structured study. Move to timed practice only after you can reproduce both the fragment table and the alternate-route decision without notes.
Keep learning
Ethernet Cross-Concept MCQs: 12 Solved Data Link Layer Questions
Solve 12 Ethernet questions spanning devices, MAC structure, CSMA/CD, STP, VLANs, collision domains, switch port accounting and frame payload conversion.
Data Link Layer Flow Control: Stop-and-Wait, Sliding Windows and Worked Numericals
Build a reliable method for DLL flow-control problems by tracing one link from frame timing to windows, receiver credit, sequence-space limits and ACK policy.
Mobile Technology Cross-Concept Problems: Cellular Reuse, Handoff and End-to-End Data Flow
Follow one connected mobile-network scenario from frequency reuse and handoff timing to routing, buffering and a transport-window bottleneck.
Language Design Cross-Concept Problems: Syntax, Types, Scope and Runtime Traces
Trace a small toy-language program from parse tree to type proof, closure bindings and the printed value 12. The method also shows where mixed-concept variants fail.





