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.
On small screens, swipe sideways or focus the diagram and use the arrow keys.
| Link | Subnet | Translation | Colour |
|---|---|---|---|
| Controllers to transport router | 198.51.100.0/24 | None, public-style | n/a |
| HUB-01 internet link | 203.0.113.0/29 | None, public-style | biz-internet |
| BR-01 internet link | 192.168.100.0/24 | NAT to a public address | biz-internet |
| BR-02 internet link | 192.168.101.0/24 | NAT to a public address | biz-internet |
| HUB-01 private link | 10.200.1.0/30 | None | mpls |
| BR-01 private link | 10.200.2.0/30 | None | mpls |
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.
Interfaces, routing, NAT, test.
- Interfacesone per link
- Forwardingrouting on
- NATbranch subnets
- Testping the Validator
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 MASQUERADETurns 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.
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.
- Routeredge pingsits own link
- Validatorthrough routerand NAT
- Private peerBR-01 to HUB-01private address
- Recordpass or failagainst the plan
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)
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.
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.
| From | To | Expected | Why |
|---|---|---|---|
| BR-01 internet interface | Validator, 198.51.100.12 | Success | Internet transport, through NAT |
| BR-02 internet interface | Validator, 198.51.100.12 | Success | Internet transport, through NAT |
| BR-01 private interface | HUB-01 private address | Success | Both are on the private transport |
| BR-02 | HUB-01 private address | Fail | BR-02 has no private link, by design |
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.
transport$ sysctl net.ipv4.ip_forward net.ipv4.ip_forward = 0
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.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 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.
- Edge to routerPing to the router's own address worksLinks and edge addresses are fine
- Forwardingip_forward is 0Traffic through the router is dropped
- NAT rulesPOSTROUTING is emptyBranches would leave untranslated
- Fix and keep itSet both again and save themso the next restart does not undo them
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 saveWrites 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 rootAdds 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.
Same link before and after netem.
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.
| Where it is applied | Added round-trip delay | Probes lost |
|---|---|---|
| One direction only | About 80 ms | 3.0 percent |
| Both directions of the link | About 160 ms | 5.9 percent (1 minus 0.97 times 0.97) |
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.
| Pings sent | No loss seen, one direction | No loss seen, both directions |
|---|---|---|
| 5 | 85.9 percent | 73.7 percent |
| 10 | 73.7 percent | 54.4 percent |
| 20 | 54.4 percent | 29.6 percent |
| 50 | 21.8 percent | 4.8 percent |
| 100 | 4.8 percent | 0.2 percent |
| 200 | 0.2 percent | under 0.1 percent |
| For a 95 percent chance of at least one loss | 99 pings | 50 pings |
- 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
Why does the lab put NAT on the branch internet links?
A ping from BR-01's internet interface to the Validator fails. What next?
You added delay, loss and a rate limit at once and the fabric reacted. What is the problem with this?
After a VM restart, both edges reach the transport router's own address but not the Validator. What is the first thing to check?
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?
Netem adds 3 percent loss on both directions of a link. About what loss does a round-trip probe see?
A lab test sends 5 pings across a link with 3 percent loss in one direction, and all 5 succeed. What does that show?
Netem adds 3 percent loss in both directions. About how many pings give a 95 percent chance of seeing at least one loss?
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?