Static routing

The routing table and its four columns, directly connected routes, the longest prefix, the default route, routes that must be written in both directions and the routing loop.

  • 32 cards
  • 6 topics
  • Free

The outline, topic by topic

Each topic is weighted the way the exam weighs it.

  1. Concepts
  2. Questions
  3. Sort and link
  4. On the diagram
  5. The steps
  6. Scenarios

A few cards from the deck

  • Routing table: what is it?

    Show the answer

    The list that every router and host consults for each packet: each destination (network and mask) is paired with a next hop and an outgoing interface.

    A host has a table too: on Linux, ip route shows it. With no matching route the packet is not sent and the error is Network is unreachable.

  • Which route is chosen for a packet addressed to 10.1.2.77?

    ```text
    default via 192.168.1.1 dev eth0
    10.0.0.0/8 via 192.168.1.2 dev eth0
    10.1.0.0/16 via 192.168.1.3 dev eth0
    10.1.2.0/24 via 192.168.1.4 dev eth0
    192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.10
    `

    • 10.1.2.0/24 via 192.168.1.4
    • 10.0.0.0/8 via 192.168.1.2
    • 10.1.0.0/16 via 192.168.1.3
    • default via 192.168.1.1
    Show the answer

    10.1.2.0/24 via 192.168.1.4

    Three routes match (/8, /16, /24) and the default route always matches; the longest prefix wins, the /24. The order of the lines does not matter.

  • A route to a network the machine is plugged into, created as soon as an interface gets its address, is a … route: it has no ….

    Show the answer

    A route to a network the machine is plugged into, created as soon as an interface gets its address, is a directly connected route: it has no next hop.

    For a destination on the connected network the machine talks straight to the target (after ARP): 192.168.1.0/24 dev eth0 has no via.

  • Next hop: what is it?

    Show the answer

    The address of the next router on the path, which must lie on a network directly connected to the machine that decides.

    A router does not know the whole path, only the neighbour to hand the packet to: the path is built hop after hop. A route whose next hop is not on a connected network is refused.