LOGBOOK

HELP

1 / 252
time's up — finish this card
Other keys: show • Space: good • 1-4: rate • 0: skip • 5: flag
Topic Routing Concepts

Question

What are the two primary functions of a router?

Answer

A router's two functions are: (1) determine the best path to the destination using its routing table, and (2) forward the packet toward that destination by encapsulating it in the appropriate Layer 2 frame.

Path determination (longest-prefix lookup) then forwarding (rebuild L2 frame, send).

* A router's two jobs: path determination and forwarding. *

Function 1 — Path Determination:

  • Router receives a packet on an interface
  • Examines the destination IP (Internet Protocol) address
  • Searches its routing table for the best matching route
  • The best match is determined by the longest prefix match — the route with the most specific (longest) subnet mask wins

Function 2 — Packet Forwarding:

  • After determining the best path, the router identifies the exit interface and next-hop IP
  • De-encapsulates the received Layer 2 frame
  • Re-encapsulates the packet in a new Layer 2 frame for the exit interface
  • Forwards the new frame out the exit interface

Key insight: The IP (Internet Protocol) packet (Layer 3) stays essentially unchanged hop-by-hop — only the TTL (Time to Live) decrements. But the Layer 2 frame (Ethernet header) is rebuilt at every router hop with new source and destination MACs (Media Access Control addresses).

Tip: Think of the router as a mail sorting facility: it reads the destination address (IP), determines which truck goes to that zip code (routing table), and puts the letter in a new envelope for the next leg of the journey (new L2 frame).

Go deeper:

Illustration
Public domain · Wikimedia Commons
or press any other key
Topic DHCPv4

Question

What are the four steps of the DHCP (Dynamic Host Configuration Protocol) lease process (DORA), and which messages are broadcast vs. unicast?

Answer

Discover (broadcast), Offer (unicast), Request (broadcast), Acknowledge (unicast) — remember: DORA (Discover, Offer, Request, Acknowledge).

Sequence diagram of the DHCP client-server exchange: Discover, Offer, Request and Acknowledge.

* The DHCP DORA message exchange. — Gelmo96, CC BY-SA 4.0, via Wikimedia Commons. *

Step Message Direction Type
1 DHCPDISCOVER Client → Server Broadcast
2 DHCPOFFER Server → Client Unicast
3 DHCPREQUEST Client → Server Broadcast
4 DHCPACK Server → Client Unicast

Why each step matters:

  1. Discover — Client has no IP (Internet Protocol) yet, so it broadcasts "Is there a DHCP server out there?" (destination 255.255.255.255)
  2. Offer — Server responds with an available IP address and configuration parameters
  3. Request — Client broadcasts its acceptance (broadcast so other DHCP servers know the client chose a different server)
  4. Acknowledge — Server confirms the lease and the client can start using the IP

Note: Per RFC 2131, the Offer and Acknowledge can also be sent as broadcast in some implementations.

Tip: Remember DORA — Discover, Offer, Request, Acknowledge. The pattern alternates client→server→client→server: the client asks (Discover), the server offers, the client accepts (Request), the server confirms (Ack). The two client→server messages (Discover, Request) are broadcast; the two server→client replies (Offer, Ack) are unicast.

Go deeper:

An illustration of a typical non-renewing DHCP session; each message may be either a broadcast or a unicast, depending on the DHCP client capabilities.[1]
An illustration of a typical non-renewing DHCP session; each message may be either a broadcast or a unicast, depending on the DHCP client capabilities.[1]
Gelmo96 · CC BY-SA 4.0 · Wikimedia Commons
or press any other key