Platform Engineering · Lesson 207

Routing Beyond OSPF: RIP, EIGRP, MPLS, SD-WAN, and VRFs

Lesson 184 taught you OSPF on one floor. This lesson takes the same packet across the WAN. A laptop at a branch office asks a server at HQ for a file. Between them sit a branch router, a provider core, and an HQ router, and every one of them reads a table to decide where the packet goes next. I carry one topology through the whole lesson: branch plus HQ plus WAN. I run RIP on it and watch it pick the slow link. I run EIGRP on it and watch it pick the fast one and recover in about a second. I put MPLS labels on it, steer it with an SD-WAN policy, split it into VRFs, size its subnets with VLSM, and bridge its IPv6-only branch to the IPv4 world with NAT64. By the end you will have configured all of it in Packet Tracer, timed a failure under each protocol, and read a routing table the way you would read it on call. OSPF stays the baseline from Lesson 184. This lesson makes the comparison a measured choice, not a paragraph.

Difficulty: Advanced · Know this first: Lesson 184 - Network Switching and Routing; F16 - CIDR Notation and CIDR Calculations

Run it as:

When it breaks, I check

One thing to remember

Where the time goes

Every hop charges rent in milliseconds. The bar below is a worked example for this lesson's scenario, not a measurement from a live system, but the shape is honest: EIGRP picks the fast path, RIP picks the fewest hops, and a dead route lives until its timer fires. Step through the lesson or switch the scenario and watch the bar change.

Extra diagram · from scratch to master

The branch to HQ trip, mapped: RIP, EIGRP, labels, VRFs

Start with a branch laptop and a gateway. Add one stop at a time until the server answers, or the dead route drops the packet.

7 stops on the trip2 WAN links, one fast, one slow1 dead route, 180 seconds
Branch laptop
0 ms
Branch router
5 ms
MPLS edge
10 ms
WAN core
15 ms
HQ edge
10 ms
HQ server
20 ms
Dropped
trip ends
Request / flowResponse · the way backFailure / dead end

Try it: change the inputs and watch the trip bend

The budget bar above shows three fixed stories. This simulator lets you write your own. Move a slider and watch the branch router, the WAN core, and the answer back change in the budget bar, in the hop timings, and in the total. The numbers are a teaching example, not live measurements. The shape is the lesson: the hops on the path, the share of traffic on the slow link, and the number of equal-cost paths decide how slow the WAN feels.

2

How many hops RIP counts on the path to HQ. RIP counts hops and nothing else. Each hop on this WAN adds about 15 ms, and each hop also grows the table the branch router reads.

0

Share of traffic riding the slow backup link. RIP picks the fewest hops, so it can pick a slow link over a fast one. Every 10 percent on the slow link adds about 5 ms out and 2 ms back.

2

How many equal-cost paths EIGRP spreads the load across. Each extra path cuts the queueing wait at the WAN core. One path waits about 20 ms. Four paths wait about 5 ms.

Try this: (1) Set hops to 15, slow link to 100, paths to 1. The branch router is about 20 ms, the WAN core about 295 ms, the answer about 45 ms, and the total is about 408 ms. (2) Set hops to 1, slow link to 0, paths to 4. The branch router is about 6 ms, the WAN core about 20 ms, the answer about 25 ms, and the total is about 99 ms. Same trip. Only the hops, the slow link, and the paths changed.

Check yourself

Three questions. No score is saved anywhere — this is just you against the material.

Try it: edit the pipeline and check it

Here is the branch servers subnet from the worksheet below, with the numbers blanked out. Fill in the blanks, then run the check. The check looks for the five numbers that define a subnet: the network address, the first host, the last host, the broadcast address, and the mask. The worksheet was checked with Python before it was written, so the answers are exact.

Try breaking it on purpose: write /25 as the prefix, or write 10.20.4.128 as the first host. Run the check and watch it fail. Then press Reset and fill in the right numbers. The worksheet in Go deeper has the full table to check against.

Press "Run the check" to see whether this pipeline does what the lesson asks.

Expected output when it passes: Branch servers live on 10.20.4.128/26: hosts 10.20.4.129 to 10.20.4.190, broadcast 10.20.4.191, mask 255.255.255.192. The checker in this lesson verified all seven branch subnets the same way, and every one passed.

Basic to master

I take the same trip four times here. First I count hops with RIP. Then I count bandwidth with EIGRP. Then I label the packet and steer it with policy. Last I split the tables and size the addresses for the world.

Basic - RIP: count the hops

Definition: RIP is a distance-vector protocol. Each router tells its neighbors how far away a network is, in hops, and the neighbors add one and pass it on. The metric is the hop count and nothing else. Fifteen hops is the cap. Sixteen means unreachable. RIP sends its whole table every 30 seconds, marks a route invalid after 180 seconds of silence, and flushes it after 240 seconds. Split horizon stops a router from advertising a route back out of the interface it learned it from. Poison reverse goes one step further and advertises it back as unreachable. Both exist to stop counting to infinity, which is what happens when two routers keep telling each other a dead route is alive.

Types:

  • Distance vector, where each router learns routes from its neighbors, not from a map of the network.
  • Hop count, the only metric RIP has, capped at 15.
  • Split horizon, which stops a route from being advertised back where it came from.
  • The 30, 180, and 240 second timers: update, invalid, flush.

Uses: I use this for the oldest networks I still meet, and for the lab where I teach what a bad metric costs. Try it now: in Packet Tracer, configure router rip version 2 on BR-1 and HQ-1, run show ip route, and write down the R lines. Then shut the primary WAN link and keep pinging. Write down how long the pings fail before the backup path takes over. Practice RIP in the Packet Tracer lab.

Dimensions: At low scale RIP works, because the table is small and the timers rarely matter. What breaks first is a dead link: the route lives for up to three minutes after the link dies. It costs a protocol that notices faster, and that protocol is the next tier.

Intermediate - EIGRP: count the bandwidth

Definition: EIGRP is a distance-vector protocol that behaves like a link-state one where it matters. It keeps a topology table of every route its neighbors advertise, and it picks a successor, the best route, and a feasible successor, a backup route that is guaranteed loop-free. DUAL is the algorithm that picks them. The metric counts bandwidth and delay: 256 times 10,000,000 divided by the slowest bandwidth in kilobits per second, plus the total delay in tens of microseconds. A GigabitEthernet link scores 2,816. A FastEthernet link scores 28,160. A T1 serial link scores 2,169,856. I checked all three numbers with Python before I wrote them down. EIGRP sends triggered updates when something changes, not a full table every 30 seconds, and it notices a dead neighbor in about a second. The variance command lets it load-balance across unequal-cost paths.

Types:

  • DUAL, the algorithm that picks the successor and the feasible successor.
  • The feasible successor, a backup route that is loop-free before it is ever used.
  • The metric: bandwidth plus delay, scaled by 256.
  • Triggered updates, which go out when something changes instead of every 30 seconds.

Uses: I use this whenever the WAN has two links of different speeds, which is every WAN I have built. Try it now: in Packet Tracer, configure router eigrp 100 on BR-1 and HQ-1, run show ip eigrp topology, and write down the successor and the feasible successor. Then shut the primary WAN link and keep pinging. Write down how long the pings fail. Compare it with the RIP number from the Basic tier. Practice EIGRP in the Packet Tracer lab.

Dimensions: As the network grows, the topology table grows, because every neighbor advertises every route. What breaks is a feasible successor that does not exist: with no backup in the table, DUAL has to ask its neighbors, and the ask takes time. It costs a second path in the design, not a second protocol.

Advanced - MPLS and SD-WAN: label the packet, steer the traffic

Definition: MPLS forwards on labels, not addresses. The ingress edge pushes a label, the core swaps it hop by hop, and the egress edge pops it. LDP is the protocol that hands out the labels: neighbors agree on which label means which path, and the label-switched path is the result. An MPLS VPN is a VRF per customer on the provider edge, carried across the shared core on labels. Compare it with the VPN in Lesson 186: the Lesson 186 tunnel encrypts traffic between two sites over the public internet, and each site pair needs its own tunnel. The MPLS VPN rides the provider core, needs no tunnel per site pair, and gives each customer a private table. MPLS by itself does not encrypt, and that is the difference to name out loud. SD-WAN is the overlay on top: the underlay is the raw links, MPLS, broadband, LTE, and the overlay is the tunnels the controller builds across them. The controller holds the policy, and policy-based path selection sends voice over the low-latency link and bulk traffic over the cheap link, per application, not per address.

Types:

  • A label, 20 bits, meaningful only on one link.
  • LDP, the protocol that hands out the labels.
  • A label-switched path, the chain of labels from ingress to egress.
  • The SD-WAN controller, which holds the policy and pushes it to the branches.

Uses: I use this when the WAN has more than one kind of link, or more than one customer on the same core. Try it now: in Packet Tracer, turn on MPLS on the WAN links, run show mpls forwarding-table on each router, and trace one label from the branch edge to the HQ edge. Write down the label at each hop. Then sketch the SD-WAN version of the same topology: two underlays, one overlay, and one policy line that sends voice over the fast link. Practice MPLS and SD-WAN in the Packet Tracer lab.

Dimensions: At ten times the sites, the label table is the thing that grows, and the controller is the thing that has to stay up. What breaks is a controller outage with no local fallback: the branches keep forwarding on the last policy they got, and nobody can change it. It costs a local policy on each branch that survives the controller going away.

Master - VRFs and addressing at scale

Definition: At this level the WAN is one design, not four protocols. VRF-lite splits each site into tables: BLUE for the office, GUEST for visitors, RED for the servers. Route leaking moves one route between two tables for a shared service, and the leak is written as one import line. The addressing is sized first and aggregated second: the branch owns 10.20.4.0/22, carves one /24 now, and keeps three /24s spare. HQ advertises the 10.20.0.0/22 summary, the branch advertises its /22, and the core carries one route, 10.20.0.0/21, instead of eight /24s. The IPv6-only branch reaches the IPv4 world through a NAT64 gateway on the well-known prefix 64:ff9b::/96. The OSPF comparison from Lesson 184 is now a measured choice: OSPF converges in seconds and scales with areas, RIP converges in minutes and caps at 15 hops, EIGRP converges in about a second and needs a feasible successor to do it. Pick by the numbers, not by habit.

Types:

  • VRF-lite, separate tables on the same box, no provider core needed.
  • Route leaking, one route moved between two tables, on purpose.
  • VLSM, each subnet sized to its need, largest first.
  • Supernetting, one summary route replacing many small ones.

Uses: I use this when a new site joins the WAN, or when I review a WAN I did not build. It is also how I review addressing I did not plan: I ask for the worksheet, I check the overlaps, and I look for the ranges nobody owns. Try it now: take the design exercise below and build it in Packet Tracer on the same topology. Then run the Python checker from this lesson against your own numbers.

Dimensions: At a hundred times the sites, the addressing plan is the difference between a WAN that grows and a WAN that has to be renumbered. What breaks is a range used by hand outside the plan, and I notice it when two sites must join and their ranges overlap. It costs process: a worksheet, a checker, and a review before any new range goes live.

Go deeper

The RIP config, in full. Do this in Packet Tracer, on BR-1 and HQ-1, on the same topology from the lab. Expected output: show ip route shows R lines toward HQ, and the hop count is the metric. The version 2 line matters: version 1 sends no mask, and a classless network like 10.20.4.0/25 will not advertise right without it. The no auto-summary line matters too: without it RIP summarizes at the class boundary, and 10.20.4.0/25 becomes 10.0.0.0/8 in the table.

enable
configure terminal
router rip
 version 2
 no auto-summary
 network 10.20.4.0
 network 10.20.0.0
end

The EIGRP config, in full. Do this in Packet Tracer, on BR-1 and HQ-1, replacing the RIP config. Expected output: show ip eigrp neighbors shows one neighbor on each WAN link, and show ip eigrp topology shows a successor and a feasible successor for the HQ route. The 100 is the autonomous system number, and it must match on every router or no neighbor forms. The no auto-summary line matters for the same reason it did in RIP.

enable
configure terminal
router eigrp 100
 no auto-summary
 network 10.20.4.0 0.0.0.255
 network 10.20.0.0 0.0.3.255
end

The EIGRP metric, worked by hand and checked in code. The classic metric is 256 times 10,000,000 divided by the slowest bandwidth in kilobits per second, plus the total delay in tens of microseconds. I ran this Python on this machine. Expected output, exactly as it ran:

$ python3 -c "
def metric(bw_kbps, delay_us):
    return 256 * (10**7 // bw_kbps + delay_us // 10)
print('GigabitEthernet:', metric(1000000, 10))
print('FastEthernet:', metric(100000, 100))
print('T1 serial:', metric(1544, 20000))"
GigabitEthernet: 2816
FastEthernet: 28160
T1 serial: 2169856

What the numbers mean: the GigabitEthernet link scores 2,816 and the FastEthernet link scores 28,160, so EIGRP prefers the gigabit link by ten times, not by a little. The T1 serial link scores 2,169,856, which is why EIGRP never picks it while a faster path exists. RIP would see all three as one hop. That is the whole difference between the two protocols in one table.

The VRF-lite config, in full. Do this in Packet Tracer, on BR-1 and HQ-1. Expected output: show ip vrf interfaces shows the LAN interface in BLUE and the server interface in RED, and show ip route vrf BLUE shows the leaked server route. The rd line is the route distinguisher. It lets two VRFs hold the same subnet without colliding. The route-target import line is the leak: it pulls the server route from RED into BLUE, and nothing else comes with it.

enable
configure terminal
ip vrf BLUE
 rd 65000:1
 route-target import 65000:2
 exit
ip vrf RED
 rd 65000:2
 route-target export 65000:2
 exit
interface gigabitethernet0/0
 ip vrf forwarding BLUE
 ip address 10.20.4.1 255.255.255.128
end

The MPLS config, in full. Do this in Packet Tracer, on every WAN interface. Expected output: show mpls ldp neighbor shows one neighbor per link, and show mpls forwarding-table shows the labels. The mpls ip line turns MPLS on for the interface. The mpls ldp router-id line pins the LDP identity to the loopback, so the session survives a link flap on any one interface.

enable
configure terminal
mpls ldp router-id loopback0 force
interface gigabitethernet0/1
 mpls ip
 exit
interface gigabitethernet0/2
 mpls ip
end

The label-stack trace, worked. A packet from the branch laptop to the HQ server carries one label on this topology, because there is one level of MPLS. The branch edge pushes label 20. The core sees 20, swaps it for 17, and forwards. The penultimate router pops 17 and hands a plain packet to the HQ edge. One label, three actions: push, swap, pop. A second label appears when the packet also rides an MPLS VPN: the outer label gets the packet across the core, and the inner label names the customer VRF at the far edge. The core reads only the outer label. The inner label is read only at the egress edge, where the VRF is chosen.

MPLS VPN against the Lesson 186 VPN, side by side. The Lesson 186 tunnel encrypts traffic between two sites over the public internet, and each site pair needs its own tunnel. The MPLS VPN rides the provider core, needs no tunnel per site pair, and gives each customer a private table on the provider edge. MPLS by itself does not encrypt, and the Lesson 186 tunnel does. If the traffic must be private from the provider, the tunnel goes on top of the MPLS path, not instead of it. The two are layers, not rivals.

The VLSM worksheet, in full. The branch owns 10.20.4.0/22 and carves one /24 of it now, keeping three /24s spare for growth. I checked every number below with Python before I wrote it down. The checker ran 118 checks, and every one passed. The full log is in the lesson work directory. Here is the worksheet:

branch users 10.20.4.0/25    126 usable   10.20.4.1 - 10.20.4.126
branch servers 10.20.4.128/26   62 usable   10.20.4.129 - 10.20.4.190
branch voice 10.20.4.192/27    30 usable   10.20.4.193 - 10.20.4.222
branch printers 10.20.4.224/28   14 usable   10.20.4.225 - 10.20.4.238
WAN link 1 10.20.4.240/30     2 usable   10.20.4.241 - 10.20.4.242
WAN link 2 10.20.4.244/30     2 usable   10.20.4.245 - 10.20.4.246
WAN link 3 10.20.4.248/30     2 usable   10.20.4.249 - 10.20.4.250
spare 10.20.4.252/30

What the table means: size largest first, round up to the next power of two, and leave room to grow. The users need 120 hosts, so they take a 128 block, a /25. The servers need 50, so they take a 64 block, a /26. The voice phones need 25, so they take a 32 block, a /27. The printers need 10, so they take a 16 block, a /28. Each WAN link needs 2 hosts, so each takes a 4 block, a /30. The carved subnets total 256 addresses, one /24. The other three /24s in the /22 stay spare.

Supernetting, from the same numbers. HQ advertises the 10.20.0.0/22 summary, which covers its two /24s plus the two unused /24s in the block. The branch advertises its 10.20.4.0/22. The core carries one route, 10.20.0.0/21, instead of eight /24s. I checked the aggregation with Python. Expected output, exactly as it ran:

$ python3 -c "
import ipaddress
print(list(ipaddress.collapse_addresses([ipaddress.ip_network('10.20.0.0/22'), ipaddress.ip_network('10.20.4.0/22')])) )"
[IPv4Network('10.20.0.0/21')]

The NAT64 gateway, in full. Do this on a lab machine with a NAT64 gateway installed, not in Packet Tracer: Packet Tracer has no NAT64 gateway to configure. The well-known prefix is 64:ff9b::/96, and the last 32 bits hold the IPv4 address. I ran the embedding math on this machine. Expected output, exactly as it ran:

$ python3 -c "
import ipaddress
print(ipaddress.IPv6Address('64:ff9b::203.0.113.10'))
print(ipaddress.IPv6Address('64:ff9b::10.20.2.20'))"
64:ff9b::cb00:710a
64:ff9b::a14:214

What the output means: 203.0.113.10 becomes 64:ff9b::cb00:710a, because 203 is cb, 0 is 00, 113 is 71, and 10 is 0a. The HQ server 10.20.2.20 becomes 64:ff9b::a14:214. The branch laptop sends to the IPv6 address, the gateway unwraps it, and the server sees plain IPv4. The gateway config itself is two lines in the lab: the prefix, and the pool it translates into. The DNS64 side is the part that answers the laptop with the embedded address, and without it the laptop never learns the address to send to.

At 10x the sites, the shape holds and the numbers grow: more VRFs, more labels, a longer worksheet. At 100x, the design changes: the VRFs move from VRF-lite on each box to an MPLS VPN on the provider core, the SD-WAN controller becomes a pair with a rehearsed failover, and the addressing plan is cut by automation from the worksheet, not by hand. The routing table never stops being a table. It just gets bigger, and the checker is what keeps it honest.

One time it broke

What broke

A branch office went slow on a Monday morning, and nothing was down. Every ping answered. Every link was up. The file server at HQ took a minute to open a file that took a second on Friday. The helpdesk tickets all said the same thing: the network is slow. The branch router showed no errors. The WAN links showed no drops. The branch was not broken. It was on the wrong link.

Timeline

  • Fri 17:30,a change adds a second WAN link to the branch, a cheap backup, and the routers run RIP.
  • Mon 08:00,the first users log in. The file server crawls. Video calls freeze. The branch feels like dial-up.
  • Mon 08:40,the first tickets arrive. The network is slow. The monitoring shows the backup link at 100 percent and the primary link at zero.
  • Mon 09:10,I read the routing table on the branch router. The HQ route points at the backup link. The metric is 2 hops.
  • Mon 09:15,I read the primary path. It is 3 hops, over the fast link. RIP picked 2 hops over 3, and never asked about speed.
  • Mon 09:30,I move the branch to EIGRP. The metric counts bandwidth, the fast link wins, and the file server answers in a second again.
  • Mon 10:00,I add the backup link as a feasible successor, so the next failure moves traffic in about a second instead of three minutes.

What changed after

Three things. First, the branch runs EIGRP, not RIP, because the WAN has links of different speeds and RIP cannot see speed. Second, every new link gets a feasible successor check before it goes live: if the backup is not in the topology table, the design is not finished. Third, the runbook for a slow branch starts at the routing table, not the link counters. A link at 100 percent with a link at zero next to it is a routing decision, not a capacity problem. Try it now: run show ip route on your branch router and read the metric on the HQ route. If the metric is a hop count, ask what the fast path costs.

If you remember nothing else

Build it yourself

Design the WAN for a new branch: 200 users, 40 servers, 12 voice phones, 2 printers, and two WAN links to HQ, one fast and one slow. Size the subnets from 10.20.8.0/22, pick the routing protocol, place the VRFs, and write the reconvergence budget. It passes when every subnet fits its need, the table aggregates to one summary, the fast link carries the traffic, and a dead primary moves traffic in about a second.

Build it, step by step

  • Size each subnet from 10.20.8.0/22, largest first. Write the CIDR, the usable hosts, the first host, the last host, and the broadcast for each one. Check every number with Python before you write it down.
  • Write the summary route the branch advertises, and say how many routes it replaces in the core table.
  • Configure RIP on the topology first, then EIGRP. For each protocol, shut the primary WAN link and time how long the pings fail. Write both numbers down.
  • Put the users in VRF BLUE and the servers in VRF RED. Write the one leak that lets BLUE reach the HQ server, and say what else stays separate.
  • Write the SD-WAN policy line: which traffic takes the fast link, which takes the slow link, and what happens to voice when the fast link dies.

What success looks like

Success looks like this: the users take a /24, the servers a /26, the voice phones a /28, the printers a /29, and each WAN link a /30, all inside 10.20.8.0/22 with room spare. The branch advertises one summary. Under EIGRP the fast link carries the traffic, and the pings fail for about a second when the primary dies, against up to three minutes under RIP. Under RIP the fast link carries the traffic only if it also has the fewest hops. The leak is one line, and the guest traffic never reaches the servers.

If it fails, check this

If your users subnet does not fit 200 hosts, the /25 from this lesson is too small: 126 usable hosts cannot hold 200, and the next size up is a /24. If RIP picks the slow link again, that is the lesson working: RIP counts hops, and the fix is the protocol, not the link. If the leak lets the guest VRF reach the servers, the route-target import is too wide: import only the server subnet, never the whole table.

Next in this series: Lesson 208, High Availability, QoS, and Data-Centre Design
High Availability, QoS, and Data-Centre Design

The WAN holds together. Now the gateway must not be a single point of failure, the voice call must survive the bulk transfer, and the data centre needs a shape that scales past one floor.

Go to Lesson 208 →

Or browse the full course from the Lessons index.