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 pageshowhide
explore
- IPv416 questions
- Address Structure4 questions
- Header Format6 questions
- Fragmentation and MTU6 questions
- IPv630 questions
- Address Space and Notation5 questions
- Address Types5 questions
- Simplified Header Format5 questions
- NDP and SLAAC5 questions
- Transition Mechanisms6 questions
- IPv6 vs IPv4 Differences4 questions
- CIDR24 questions
- Prefix Notation4 questions
- Subnetting Math5 questions
- VLSM5 questions
- Route Aggregation5 questions
- Special Address Ranges5 questions
- Hop-by-Hop Forwarding5 questions
- Choosing Between Route Sources6 questions
questions
81 · 5 sectionsIn IPv4, how is a 32-bit address written in dotted decimal, and how does the subnet mask split it into network and host parts?
basics
~20 sAn 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.
In IPv4, how do unicast, limited broadcast, directed broadcast and multicast differ in who receives a datagram and which addresses signal them?
basics
~20 sUnicast 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.
In IPv4, what is the MTU, and what happens to a datagram that is larger than the next link's MTU?
basics
~20 sThe 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.
In IPv4, what does the Time to Live field do, and what happens when a router decrements it to zero?
basics
~20 sIPv4'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.
How does IPv4 Path MTU Discovery use the Don't Fragment flag to find the largest datagram a path can carry?
basics
~20 sThe 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.
How is a 128-bit IPv6 address written as text, and what rules govern compressing it with :: in RFC 5952 canonical form?
basics
~20 sAn 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.
What are the three IPv6 address types, how is a packet sent to each one delivered, and why is there no broadcast?
basics
~20 sIPv6 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.
In IPv6, what replaces ARP for finding a neighbour's MAC address, and why does no broadcast take part?
basics
~20 sIPv6 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.
Why can an IPv6-only host not talk directly to an IPv4-only host, and which three families of transition mechanism bridge the gap?
basics
~20 sIPv4 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).
Apart from the longer addresses, what are the main design differences between IPv6 and IPv4?
basics
~20 sIPv6 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.
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?
basics
~20 sThe 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.
An IPv4 host's interface shows 169.254.37.12/16 instead of its usual address; what does that address signal, and how did the host choose it?
basics
~20 sIt is an RFC 3927 IPv4 link-local address: the host obtained no address from DHCP or manual configuration and assigned itself one. It picked a pseudo-random address, confirmed it was free with ARP probes, and can reach only hosts on its own link.
Which IPv4 address blocks does RFC 1918 reserve for private networks, and why are they not routed on the public internet?
basics
~10 sRFC 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.
In IPv4, how do you work out the usable host count for a prefix length, and the smallest prefix fitting a host requirement?
basics
~20 sAn 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.
In IPv4 addressing, what is VLSM, and why use it instead of giving every subnet the same mask?
basics
~20 sVLSM (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.
What does an IPv4 router do with each packet it forwards, from the moment it arrives until it leaves?
basics
~20 sAn 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.
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?
basics
~10 s10.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.
Why must every IPv4 router decrement a packet's TTL, and how does that end a packet caught in a transient routing loop?
basics
~20 sEach 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.
Why does an IPv4 route name its next hop by IP address, and how does the router turn that into a sendable frame?
basics
~20 sRoutes 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.
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?
basics
~20 sRequests 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.
On an IP router, what are connected, static and default routes, and how does each one get into the routing table?
basics
~20 sA 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.
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?
basics
~20 sOnly 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.
How do distance-vector and link-state routing protocols differ in what each router learns and how it computes its routes?
basics
~20 sA distance-vector router learns only its neighbours' distances to each destination and adds its link cost (Bellman-Ford); a link-state router floods descriptions of its own links, so every router holds the whole topology and runs shortest-path-first itself.
What distinguishes an interior gateway protocol from an exterior gateway protocol, and why is BGP used between autonomous systems instead of an IGP?
basics
~20 sAn 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.
How does a floating static route back up a BGP-learned default route, and which failures will it fail to catch?
basics
~20 sA 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.