Course contents

Unit 10: Guided deploymentLesson 10.3 (3 of 5 in this unit)60 of 62 in the Cisco SD-WAN course

Connect mixed transport links

Build a private transport and an internet transport with NAT, prove reachability from each edge, and degrade a link on purpose.

Intermediate · 20 min read

You'll learn to build a private transport and an internet transport with NAT in a lab, prove reachability from each edge to the Validator, and degrade one link on purpose to watch the effect.

Technical definition

Emulated transport is a network built in a lab to stand in for a provider circuit. A private transport gives routable addresses with no translation, like a private WAN. An internet transport gives private addresses behind NAT, like a broadband line. SD-WAN runs unchanged over both, which is the point of the exercise.

The two transports

The edges in the course lab use two transports. The private one stands for MPLS and uses the colour mpls. The internet one stands for broadband and uses biz-internet. HUB-01 and BR-01 connect to both, and BR-02 connects to the internet one only. The controllers sit on the internet transport, so the private transport is reachable only between edges in this lab.

Diagram
The course lab: controllers, two transports and three edges
The course lab: controllers, two transports and three edges
The course lab: controllers, two transports and three edgesThe Manager, the Controller CTRL-01 and the Validator VAL-01 sit at the top and are reachable over the Internet transport. HUB-01 and BR-01 connect to both an MPLS transport coloured mpls and an Internet transport coloured biz-internet. BR-02 connects to the Internet transport only.Manager10.255.0.10CTRL-0110.255.0.11VAL-0110.255.0.12Internet (biz-internet)MPLS (mpls)HUB-0110.255.1.1BR-0110.255.2.1BR-0210.255.2.2Dashed: control connections to the controllers. Solid: transport links at each edge.

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Every device that must reach the controllers needs a path over a transport. BR-02 has only one, so it is the site where a single failure removes all tunnels.
Diagram
Transport addressing plan
Transport addressing plan
LinkSubnetTranslationColour
Controllers to transport router198.51.100.0/24None, public-stylen/a
HUB-01 internet link203.0.113.0/29None, public-stylebiz-internet
BR-01 internet link192.168.100.0/24NAT to a public addressbiz-internet
BR-02 internet link192.168.101.0/24NAT to a public addressbiz-internet
HUB-01 private link10.200.1.0/30Nonempls
BR-01 private link10.200.2.0/30Nonempls
All ranges are documentation or private examples. Change them to suit your lab, but keep one subnet per link.

Build the transport router

The transport router is the middle of both networks. It routes between all the subnets, translates the branch internet subnets as they leave toward the controllers, and has no knowledge of SD-WAN at all. A Linux VM works well. The commands below are for a Linux host and are examples.

Diagram
Transport router tasks
Transport router tasks

Interfaces, routing, NAT, test.

  1. Interfacesone per link
  2. Forwardingrouting on
  3. NATbranch subnets
  4. Testping the Validator
Each task can be tested before the next.
sudo sysctl -w net.ipv4.ip_forward=1 sudo iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -o eth0 -j MASQUERADE sudo iptables -t nat -A POSTROUTING -s 192.168.101.0/24 -o eth0 -j MASQUERADE

Turns on forwarding and translates the two branch internet subnets as they leave on eth0, the interface toward the controllers. Interface names differ in your VM. Stateful NAT like this is port-restricted in effect, which is what the NAT traversal lesson explains.

Prove reachability from the edges

Before involving SD-WAN, test the path. From each edge's transport interface, the Validator at 198.51.100.12 should answer. From BR-01's private link, HUB-01's private address should answer. If this fails, no later step can work.

Diagram
Order of the reachability pings
Order of the reachability pings

Ping the transport router's own address first, then the Validator through the router and NAT, then the private peer, and record each result against the plan.

  1. Routeredge pingsits own link
  2. Validatorthrough routerand NAT
  3. Private peerBR-01 to HUB-01private address
  4. Recordpass or failagainst the plan
Each ping rules out one part of the path before the next one is tried.
Example output written for this lesson, simplified; real output has more fields and a different layout
BR-01#ping 198.51.100.12 source GigabitEthernet1
Sending 5, 100-byte ICMP Echos to 198.51.100.12:
!!!!!
Success rate is 100 percent (5/5)
The edge can reach the Validator from its internet-side interface. Repeat from the private interface to the other edge's private address. A firewall in the lab that drops ping makes this test misleading, so allow ICMP for the test.

Know which tests should fail

A lab is easier to debug when you know in advance which pings must succeed and which must fail. BR-02 has no private link, so some tests that work for BR-01 are supposed to fail for BR-02. Write the expected result down before you run anything.

Diagram
Expected results for BR-01 and BR-02
Expected results for BR-01 and BR-02

BR-01 has an internet link and a private link, so both of its pings to the Validator and to HUB-01 are expected to pass. BR-02 has the internet link only, so its ping to the private address of HUB-01 is expected to fail, by design.

BR-01, two transportsInternet ping: passPrivate ping: pass
BR-02, internet onlyInternet ping: passPrivate ping: fail, by design
The difference between the two edges is the plan, not a fault.
Diagram
Reachability tests and their expected results
Reachability tests and their expected results
FromToExpectedWhy
BR-01 internet interfaceValidator, 198.51.100.12SuccessInternet transport, through NAT
BR-02 internet interfaceValidator, 198.51.100.12SuccessInternet transport, through NAT
BR-01 private interfaceHUB-01 private addressSuccessBoth are on the private transport
BR-02HUB-01 private addressFailBR-02 has no private link, by design
An expected failure that fails is a pass. An expected success that fails is the fault to chase.

Worked example: everything stopped after the VM restarted

The lab worked on Friday. On Monday the transport VM was restarted, and now BR-01 and BR-02 both fail to ping the Validator, although each can still ping the transport router's own address on its link. That pattern says the edges and the links are fine and the router in the middle is not passing traffic. Check forwarding first, then the NAT rules.

Example output written for this lesson, simplified; real output has more fields and a different layout
transport$ sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0
Forwarding is off. The value set with sysctl -w lasts until the next restart, so the restart returned it to the default. With forwarding off, the VM answers pings sent to itself and drops everything that needs to pass through it.
Example output written for this lesson, simplified; real output has more fields and a different layout
transport$ sudo iptables -t nat -L POSTROUTING -n -v
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target      prot opt in  out   source              destination
The chain has no rules and no packets, so the NAT rules are gone too. Rules added with the iptables command are also held in memory only. Turning forwarding back on is not enough: the branch addresses would then reach the controllers untranslated, so the lab would no longer behave like a broadband branch and the NAT traversal lessons would show nothing.
Diagram
Evidence from the restart case
Evidence from the restart case

The edges reach the transport router, so the links and edge addresses are fine. Forwarding is off, so the router drops traffic that must pass through. The NAT chain is empty, so even with forwarding the branches would leave untranslated.

  1. Edge to routerPing to the router's own address worksLinks and edge addresses are fine
  2. Forwardingip_forward is 0Traffic through the router is dropped
  3. NAT rulesPOSTROUTING is emptyBranches would leave untranslated
  4. Fix and keep itSet both again and save themso the next restart does not undo them
Work from the edge toward the middle: reach the router, then forwarding, then NAT.
echo "net.ipv4.ip_forward=1" | sudo tee /etc/sysctl.d/99-lab-forward.conf sudo sysctl --system sudo iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -o eth0 -j MASQUERADE sudo iptables -t nat -A POSTROUTING -s 192.168.101.0/24 -o eth0 -j MASQUERADE sudo netfilter-persistent save

Writes the forwarding setting to a file that is read at boot, applies it, adds the two NAT rules again and saves them. The last line works on a Debian or Ubuntu VM with the iptables-persistent package installed. Other distributions save NAT rules in other ways.

Impair a link on purpose

Later labs ask you to make a transport worse and watch the fabric react. On a Linux transport router the network emulation tool adds delay and loss to a chosen interface. This adds the impairment in one direction only, so for a two-way effect repeat on the other side.

sudo tc qdisc add dev eth2 root netem delay 80ms 10ms loss 3% sudo tc qdisc show dev eth2 sudo tc qdisc del dev eth2 root

Adds 80 ms of delay with 10 ms of variation and 3 percent loss on eth2, shows the setting, and then removes it. The interface name is an example. Run the last line to restore the link.

Diagram
Healthy and impaired
Healthy and impaired

Same link before and after netem.

BeforeLoss 0 percentDelay low
After netemLoss 3 percentDelay 80 ms
A path with loss is the input for application-aware routing and for BFD flaps.

The effect on a measurement depends on where the impairment sits. Netem acts on packets leaving the interface it is attached to, so a probe that goes out and comes back crosses it once or twice.

Diagram
What an 80 ms delay and 3 percent loss look like to a round-trip probe
What an 80 ms delay and 3 percent loss look like to a round-trip probe
Where it is appliedAdded round-trip delayProbes lost
One direction onlyAbout 80 ms3.0 percent
Both directions of the linkAbout 160 ms5.9 percent (1 minus 0.97 times 0.97)
Compute the expected value before you run the test. A reading far from it points at the setup, not at the fabric.

A ping test is a sample, and a lossy link often passes a small one. Each ping survives a one-way 3 percent loss with chance 0.97, so five pings in a row all succeed about 86 percent of the time even though the link is impaired. The table was computed by script from that survival chance, 0.97 for one direction and 0.97 times 0.97 for both.

Diagram
How many pings it takes to see 3 percent loss (computed)
How many pings it takes to see 3 percent loss (computed)
Pings sentNo loss seen, one directionNo loss seen, both directions
585.9 percent73.7 percent
1073.7 percent54.4 percent
2054.4 percent29.6 percent
5021.8 percent4.8 percent
1004.8 percent0.2 percent
2000.2 percentunder 0.1 percent
For a 95 percent chance of at least one loss99 pings50 pings
Chance that every ping succeeds despite the loss, assuming each ping is lost independently. A clean five-ping test is weak evidence that a link is healthy.
  • Change one thing at a time. If you add delay and loss together, you cannot say which one moved the fabric.
  • Wait a few BFD intervals before reading results; measurements are averaged over a time window.
  • Send at least 100 pings before judging a loss figure; a handful of pings can pass cleanly through a lossy link.
  • Remove impairments at the end of each exercise and confirm by pinging, so the next lab starts clean.

Learn more: Transport-Side IP and ISP ReachabilityApplication-Aware Routing Introduction

Test yourself

Predict · scenario 1

Why does the lab put NAT on the branch internet links?

Predict · scenario 2

A ping from BR-01's internet interface to the Validator fails. What next?

Predict · scenario 3

You added delay, loss and a rate limit at once and the fabric reacted. What is the problem with this?

Predict · scenario 4

After a VM restart, both edges reach the transport router's own address but not the Validator. What is the first thing to check?

Predict · scenario 5

A ping from BR-02 to HUB-01's private address fails. The lab has no private link for BR-02. What does that result mean?

Predict · scenario 6

Netem adds 3 percent loss on both directions of a link. About what loss does a round-trip probe see?

Predict · scenario 7

A lab test sends 5 pings across a link with 3 percent loss in one direction, and all 5 succeed. What does that show?

Predict · scenario 8

Netem adds 3 percent loss in both directions. About how many pings give a 95 percent chance of seeing at least one loss?

Predict · scenario 9

After the restart, forwarding is restored through a file read at boot, but the NAT chain is still empty. What is true of the lab?

FAQ

Why does the Internet side need NAT?
Real broadband branches sit behind a provider or office NAT. The lab must do the same, because NAT is what makes the Controller see a public address and port that differ from the private ones, and it is what the NAT traversal lessons are about.
Can one Linux VM serve as both transports?
Yes, with two network pairs and NAT on one side. A small router image does the same job. Pick the tool you know best; the lab only needs routing, NAT and the ability to add delay and loss.
Why impair a link on purpose?
Application-aware routing, BFD flaps and failover can only be seen when a path gets worse. A lab where every link is perfect teaches little about operations.