skip to content

IP

IP delivers datagrams between networks best-effort: addresses, prefixes, and a forwarding decision made fresh at every hop. Everything above assumes IP may drop or reorder, so its promises matter.

on this pageshow

explore

questions

81 · 5 sections

In IPv4, how is a 32-bit address written in dotted decimal, and how does the subnet mask split it into network and host parts?

level: juniorimportance: must knowfreq 78%
basics
~20 s

An IPv4 address is 32 bits written as four decimal octets, each 0-255, such as 198.51.100.37. The subnet mask's one-bits mark the network part and its zero-bits the host part; ANDing address and mask gives the network.

open as a page

In IPv4, how do unicast, limited broadcast, directed broadcast and multicast differ in who receives a datagram and which addresses signal them?

level: juniorimportance: must knowfreq 60%
basics
~20 s

Unicast reaches one interface. Limited broadcast, 255.255.255.255, reaches every host on the sender's link and is never routed. A directed broadcast (a network's all-ones host address) reaches every host on that remote network. Multicast, 224.0.0.0-239.255.255.255, reaches joined group members.

open as a page

In IPv4, what is the MTU, and what happens to a datagram that is larger than the next link's MTU?

level: juniorimportance: must knowfreq 52%
basics
~20 s

The MTU is the largest IP datagram, header included, that a link carries in one frame: 1,500 bytes on Ethernet. An IPv4 router fragments a bigger datagram and only the destination reassembles it; with Don't Fragment set, the router drops it instead.

open as a page

In IPv4, what does the Time to Live field do, and what happens when a router decrements it to zero?

level: juniorimportance: must knowfreq 60%
basics
~20 s

IPv4's Time to Live is an 8-bit counter each router decrements by at least one; a router that brings it to zero discards the datagram and, for unicast, returns ICMP Time Exceeded to the source, so looping packets cannot circulate forever.

open as a page

How does IPv4 Path MTU Discovery use the Don't Fragment flag to find the largest datagram a path can carry?

level: middleimportance: must knowfreq 42%
basics
~20 s

The source assumes the path MTU equals its first link's MTU and sets DF on every datagram. A router that cannot forward one drops it and returns an ICMP error carrying the next hop's MTU; the source lowers its estimate and sends smaller.

open as a page

How is a 128-bit IPv6 address written as text, and what rules govern compressing it with :: in RFC 5952 canonical form?

level: juniorimportance: must knowfreq 62%
basics
~20 s

An IPv6 address is eight 16-bit hex groups separated by colons. RFC 5952 canonical form drops leading zeros, uses lowercase, and writes :: once, for the longest run of two or more zero groups, the first run on a tie.

open as a page

What are the three IPv6 address types, how is a packet sent to each one delivered, and why is there no broadcast?

level: juniorimportance: must knowfreq 58%
basics
~20 s

IPv6 has unicast (delivered to one interface), multicast (delivered to every member of a group, ff00::/8) and anycast (delivered to the nearest of a set, using unicast-format addresses). Broadcast was dropped; scoped multicast groups such as all-nodes ff02::1 replace it.

open as a page

In IPv6, what replaces ARP for finding a neighbour's MAC address, and why does no broadcast take part?

level: juniorimportance: must knowfreq 50%
basics
~20 s

IPv6 Neighbor Discovery (RFC 4861) replaces ARP: a host sends an ICMPv6 Neighbor Solicitation to the target's solicited-node multicast address, and the target answers with a unicast Neighbor Advertisement carrying its MAC. IPv6 has no broadcast.

open as a page

Why can an IPv6-only host not talk directly to an IPv4-only host, and which three families of transition mechanism bridge the gap?

level: juniorimportance: must knowfreq 42%
basics
~20 s

IPv4 and IPv6 are separate protocols with different headers and address sizes, so neither stack can read the other's packets. Coexistence comes from dual stack (run both), tunnelling (carry IPv6 inside IPv4) or translation (NAT64 rewriting headers).

open as a page

Apart from the longer addresses, what are the main design differences between IPv6 and IPv4?

level: juniorimportance: must knowfreq 60%
basics
~20 s

IPv6 widens addresses to 128 bits and moves work off routers: a fixed 40-byte header with extension headers, no header checksum, source-only fragmentation, multicast instead of broadcast, Neighbor Discovery instead of ARP, built-in autoconfiguration, and no NAT in its base design.

open as a page

In IPv4 CIDR notation, what does the number after the slash mean, and how do you convert /20 to a dotted-decimal subnet mask and back?

level: juniorimportance: must knowfreq 78%
basics
~20 s

The number after the slash is the prefix length: how many leading bits of the 32-bit IPv4 address are network bits. /20 is twenty ones then twelve zeros, 255.255.240.0; counting the ones in 255.255.240.0 gives 20 back.

open as a page

Which IPv4 address blocks does RFC 1918 reserve for private networks, and why are they not routed on the public internet?

level: juniorimportance: must knowfreq 78%
basics
~10 s

RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16. Anyone may reuse them without registration, so they are not unique, and routes and packets for them are kept off inter-network links.

open as a page

In IPv4, how do you work out the usable host count for a prefix length, and the smallest prefix fitting a host requirement?

level: juniorimportance: must knowfreq 76%
basics
~20 s

An IPv4 /n prefix leaves 32 - n host bits: 2^(32 - n) addresses, minus the all-zeros network and all-ones broadcast addresses. To size a subnet, pick the fewest host bits h whose 2^h - 2 covers the hosts needed.

open as a page

In IPv4 addressing, what is VLSM, and why use it instead of giving every subnet the same mask?

level: juniorimportance: must knowfreq 55%
basics
~20 s

VLSM (variable-length subnet masking) carves one IPv4 block into subnets with different prefix lengths, each sized to its segment. A single fixed mask must fit the largest segment, which wastes space on small ones and yields too few subnets.

open as a page

What does an IPv4 router do with each packet it forwards, from the moment it arrives until it leaves?

level: juniorimportance: must knowfreq 62%
basics
~20 s

An IPv4 router validates the header, finds the longest matching prefix for the destination address, decrements the TTL, resolves the next hop's link-layer address, sends the packet in a new frame, and then forgets it.

open as a page

An IPv4 routing table holds 0.0.0.0/0, 10.0.0.0/8, 10.1.0.0/16 and 10.1.1.0/24; which entry forwards a packet to 10.1.1.7, and why?

level: middleimportance: must knowfreq 58%
basics
~10 s

10.1.1.0/24 forwards it. All four entries match 10.1.1.7, and IPv4 forwarding picks the longest matching prefix, so the most specific route wins; the default route 0.0.0.0/0 is used only when nothing longer matches.

open as a page

Why must every IPv4 router decrement a packet's TTL, and how does that end a packet caught in a transient routing loop?

level: juniorimportance: should knowfreq 46%
basics
~20 s

Each router must lower the 8-bit IPv4 TTL by at least one; at zero it discards the packet and sends ICMP Time Exceeded to the source, so a looping packet dies after a bounded number of hops.

open as a page

Why does an IPv4 route name its next hop by IP address, and how does the router turn that into a sendable frame?

level: middleimportance: should knowfreq 34%
basics
~20 s

Routes are IP-layer knowledge that must work over any link, so the next hop is an IP address; the router then resolves it to a link-layer address (ARP on IPv4 Ethernet) and frames the unchanged packet to it.

open as a page

IP forwards every packet independently; why can a connection's replies return by a different path, and what breaks when a stateful firewall sees only one direction?

level: seniorimportance: should knowfreq 28%
basics
~20 s

Requests are routed by lookups of the server's address and replies by lookups of the client's, often in different routers, so paths can differ; a stateful firewall seeing one direction lacks half the connection and typically drops it.

open as a page

On an IP router, what are connected, static and default routes, and how does each one get into the routing table?

level: juniorimportance: must knowfreq 62%
basics
~20 s

A connected route appears when an interface with an address and prefix comes up; a static route is configured by hand; the default route (0.0.0.0/0, ::/0) matches everything and is used only when nothing more specific matches.

open as a page

When an IPv4 router learns one prefix from a static route, OSPF and BGP, which wins, and how does administrative distance differ from a metric?

level: middleimportance: must knowfreq 55%
basics
~20 s

Only routes for the same prefix compete. Among them the router keeps the source with the best administrative distance, an implementation-defined trust ranking where lower wins; a metric ranks routes only within one protocol. With common defaults the static route wins.

open as a page

What distinguishes an interior gateway protocol from an exterior gateway protocol, and why is BGP used between autonomous systems instead of an IGP?

level: middleimportance: should knowfreq 48%
basics
~20 s

An interior gateway protocol finds best paths inside one autonomous system; an exterior gateway protocol exchanges reachability between autonomous systems. BGP-4 fills that role because it carries AS paths and applies each operator's policy, which a shared shortest-path metric cannot express.

open as a page

How does a floating static route back up a BGP-learned default route, and which failures will it fail to catch?

level: seniorimportance: should knowfreq 35%
basics
~20 s

A floating static route is given a worse administrative distance than the dynamic route, so it stays uninstalled until that route is withdrawn. It misses failures that never withdraw the primary, and dead backup paths behind an up interface.

open as a page