What is SD-WAN? A (Software Defined Wide Area Network) is a solution that unlike previous WAN architectures, (the type you typically see on a Visio diagram with maybe some MPLS, leased lines, and maybe some Optical DWDM etc. in them).
SD-WAN gives you a more ‘Layered‘ approach, that directs USERS to APPLICATIONS based on POLICIES.
For example, let’s say your main business CRM is a SaaS solution like SalesForce, it’s secured by https, it’s trusted, instead of sending that traffic from all your sites to the Datacenter (where your corporate firewall is) then sending it onwards, why not utilise the local internet connection on each of your sites? Now all that bandwidth is not needed on the the connection to your DC, or more importantly isn’t slowing down the accounts application that’s got it’s database ‘back-end’ in the Datacenter.
In the example below, you can see the topology is very similar. Users in Office 1, who need to go to Microsoft Office 365 (for example) can use their local internet connection. Users in Office 3 have a 5G connection on their router, and SD-WAN has calculated that using that connection is more efficient way to get to Office 365.
But it does not stop there, (hence me saying it’s more layered). To access a corporate application in the Datacenter, you can see in this example the leased line from Office 1 to the Datacenter , is running slowly and is contended, SD-WAN can calculate that if it uses its local internet connection to spin up a dynamic VPN to the Datacenter, the ‘User Experience‘ will be a lot better. Likewise for users in Office 3 SD-WAN can calculate if it spins up a Dynamic VPN to the Corporate HQ, then onwards via MPLS it’s the ‘best‘ route (based on the policies you have specified).
I like the way Juniper describe this as “Elastic Traffic Management” what it gives you, is a collection of Virtual Network Overlays for the routing of different applications.
What SD-WAN ISN’T
I was talking to a client a few weeks ago and they said;
“We are retiring our MPLS network and moving to SD-WAN”
SD-WAN is not a replacement for MPLS! Yes it can provide similar ‘connectivity’ functions. But you need to apply some common sense, if all your company sites need to speak to each other, (phone systems anyone?) Then you’re potentially replacing dedicated bandwidth with a VPN connections, (because SD-WAN will build dynamic VPNs between endpoints). So yes you can replace a lot of CPE routers, or MPLS connections or leased lines on some of your less trafficked sites. But your large offices and data centres may still need fast reliable (read expensive) links, because SD-WAN is the control plane that will steer your applications over your network, but if those links are a ‘wet piece of string’ then performance will not be great.
The best explanation I can give is SD-WAN is a WAN overlay solution, to improve user experience, and add some dynamic resiliency. Or if you are a network engineer think of it like ‘DMVPN with Intelligence‘.
What is SD-WAN, (Isn’t it Just SDN But for WANs?)
That’s a sensible assumption to make, and you can draw a lot of parallels. I prefer to think of them as two different things that share some similarities. (Central control plane, intelligence, and application based routing). But SDN is designed for Data Centers, SD-WAN covers DCs and branch sites. Also SD-WAN has the concept of “Zero Touch Provisioning”, (1. Ship your devices to site, 2. Connect them to the internet, 3. They ‘call home’ 4. They download their configs and policies automatically).
What is SD-WAN and How Do I Deploy SD-WAN?
That depends on which ‘Vendor’ you want to work with, whoever you choose, the deployment will involve deploying new (or updated) Endpoint Devices (typically routers or firewalls) and an SD-WAN Control Plane. The control plane can be an appliance (or several appliances,) or ‘Cloud Based‘. I’ve looked at three solutions. FortiGate, Meraki, and Cisco, (yes I know Cisco own Meraki). Which solution you choose will (normally) depend on what you are happy to support. Of the three I prefer FortiGate, it’s not as simple as Meraki, but if you are replacing your edge devices the cost, throughput, connectivity options make it the most sensible option. Cisco is typically ‘Ciscoesque‘, i.e. I spent about 9 days watching videos about their SD-WAN solution, it only works with ‘some’ of their endpoints (routers) and you need to put some thought into the deployment and design of the control plane. If you have a lot of in house Cisco guys and typically only ever buy Cisco, then, your hands are tied.
Related Articles, References, Credits, or External Links
I’ve had very little exposure to JUNOS and Juniper equipment, and later in the year I have to deploy some for a client in a failover cluster. So I had a good look round on the Internet, and found loads of good blog posts and KB articles like this one. The problem is they are all geared to setting up a cluster, they ASSUME you then know about security zones, how to add default routes, and setup NAT etc. So they don’t cover that. Yes you then can set up a cluster, but it has no IP addresses, and you cant pass any traffic though it! Hopefully this will redress the balance.
Solution
Before you start, you obviously need two physical firewalls running the same OS, and this whole procedure is carried out from command line, (I’m using the console cable).
Things that took me a while to grasp, that you need to know.
1. The SRX240 has 16 ports numbered ge-0/0/0 to ge-0/0/15, when you cluster them the ports on the secondary firewall (node1) are renumbered to ge-5/0/0 to ge-5/0/16.
2. As soon as you cluster the firewalls the first port (on both) is reserved for management. That’s ge-0/0/0 and ge-5/0/0 they are then refereed to as fxp0.
3. As soon as you cluster the firewalls the second port (on both) is reserved for the firewalls control plane. That’s ge-0/0/1 and ge-5/0/1 they are then refereed to as fxp1.
4. You need to dedicate another port on both firewalls for the firewalls data link this can be any port, but to keep things simple I’ll use the next free port on both firewalls (ge-0/0/2 and ge-5/0/2). These will then be referred to as fab0 and fab1 (respectively).
Thats the clustering side of things, what about the networks I’m going to connect to the firewall. Take a look at this diagram;
Both the firewalls have a connection to each network (which makes sense if they are going to fail over). I’ve got an ‘outside’ network that connects to the Internet. ‘Inside’ I’ve got two networks, (most people reading this will have one, but remember this is practice for a live client, and they have two data LANS).
As all the networks are connected in two places, where do you assign IP addresses? Well above you can see the outside connections are plugged into ge-0/0/4 and ge-5/0/4. You add both these physical interfaces to a Reth (Redundant Ethernet Interface), and you assign the IP to that. So I have three Reth interfaces, (Reth0 for outside, Reth1 for the first inside network, Reth2 for the second inside interface).
So only Reth interfaces have IP addresses? Well no, the two fxp0 interfaces on each physical firewall, also get an IP address (for out of band management), and it’s a different one for each firewall.
Step 1: SRX240 Setup a Chassis Cluster.
1. Before we start you need to delete the existing interfaces from the config (ALL of them), otherwise you will get some errors later on when you try and commit (save) the firewall config. Also remove the hostname, we will set that in a minute.
[box] delete interfaces ge-0/0/0
delete interfaces ge-0/0/1 —Repeat for the rest of the interfaces—
delete interfaces ge-0/0/14
delete interfaces ge-0/0/15
delete system host-name[/box]
2. Connect ge-0/0/0 to management network > Connect ge-5/0/0 to management network >
Connect ge-0/0/1 on Primary to ge-5/0/1 on Standby, (this can’t be changed and will be the fxp0 connection) > Connect ge-0/0/2 on Primary to ge-5/0/2 on Standby (this can be changed but will be the fab0 and fab1 connection).
3. Carry out the following procedure on BOTH firewalls. This sets the host names of the firewalls and the IP addresses of the management interfaces.
[box]set groups node0 system host-name FW-A
set groups node0 interfaces fxp0 unit 0 family inet address 192.168.254.1/24
set groups node1 system host-name FW-B
set groups node1 interfaces fxp0 unit 0 family inet address 192.168.254.2/24
set apply-groups “${node}”[/box]
4. On FW-A (the primary node0) turn on clustering.
6. Back on FW-A (the remainder of the config will be done on node0), set the configuration for the data link, notice I’m deleting the interface again, (I had a lot of bother with this so let’s play it safe). Then I’m saving the changes with a ‘commit’ command, because at this point if something is wrong it will tell you.
[box]delete interfaces ge-0/0/2
set interfaces fab0 fabric-options member-interfaces ge-0/0/2
set interfaces fab1 fabric-options member-interfaces ge-5/0/2
commit[/box]
Step 2 Create Redundancy Groups
1. Redundancy group 0 is created by default so set the priority for that one first.
[box]root@FW-A# set chassis cluster redundancy-group 0 node 0 priority 100
root@FW-A# set chassis cluster redundancy-group 0 node 1 priority 1[/box]
2. Create a new redundancy group that the Reth interfaces will use.
[box]root@FW-A# set chassis cluster redundancy-group 1 node 0 priority 100
root@FW-A# set chassis cluster redundancy-group 1 node 1 priority 1[/box]
Step 3 Define and Add Physical Interfaces to the Reth Interfaces
1. Define the number of Reth interfaces (two inside and one outside).
[box]root@FW-A# set chassis cluster reth-count 3[/box]
2. Allocate Reth0 to the physical interfaces (for outside).
{primary:node0}[edit interfaces]
root@FW-A# set ge-0/0/8 gigether-options redundant-parent reth1
root@FW-A# set ge-5/0/8 gigether-options redundant-parent reth1
root@FW-A# set reth1 redundant-ether-options redundancy-group 1
root@FW-A# set reth1 unit 0 family inet address 192.168.20.1/24 [/box]
6. Setup Reth2 (inside). Add the physical interfaces, and apply redundancy group 1 (again) then save the changes.
1. To get traffic out to the Internet. the cluster needs the IP of its ‘next-hop’, (usually the router supplied by your ISP).
Note: If you’re anything like me after you enter this you will try and ‘ping’ the router from the firewall, or ping an Internet. IP address, at this point that wont work, (you need to allocate interfaces to security zones first).
[box]root@FW-A# set routing-options static route 0.0.0.0/0 next-hop 123.123.123.1[/box]
Step 5 Add interfaces to Security Zones and Allow Traffic Out
Note: I’m simply allowing all traffic out.
1. Make sure the Security Zones ‘Trust’ and ‘Untrusted’ Exist
[box]root@FW-A# show security zones or
root@FW-A# run show security zones[/box]
2. Add the Reth0 Interface to the Untrusted zone.
[box]root@FW-A# set security zones security-zone untrust interfaces reth0.0 [/box]
3. Allow traffic.
[box]{primary:node0}[edit]
root@FW-A# set security zones security-zone untrust host-inbound-traffic system-services all
root@FW-A# set security zones security-zone untrust host-inbound-traffic protocols all[/box]
4. You can check the changes before you commit them.
5. Then add Reth1 and Reth2 to the Trusted zone and repeat the process to allow all traffic.
[box]root@FW-A# set security zones security-zone trust interfaces reth1.0
root@FW-A# set security zones security-zone trust interfaces reth2.0
root@FW-A# set security zones security-zone trust host-inbound-traffic system-services all
root@FW-A# set security zones security-zone trust host-inbound-traffic protocols all[/box]
6. Let’s check to see all that worked.
[box]
{primary:node0}[edit]
root@FW-A# show security policies from-zone trust to-zone untrust
policy trust-to-untrust {
match {
source-address any;
destination-address any;
application any;
}
then {
permit;
}
}
{primary:node0}[edit]
root@FW-A# show security policies
from-zone trust to-zone untrust {
policy trust-to-untrust {
match {
source-address any;
destination-address any;
application any;
}
then {
permit;
}
}
}
[/box]
Step 6 Allow Remote Management
1. We have two interfaces dedicated to out of band management, and we gave them an IP address earlier. Here I’m allowing remote administration via web to the J-Web console.
[box]root@FW-A# set system services web-management https interface fxp0.0[/box]
Step 7 Perform NAT on ‘Outgoing’ traffic.
1. Here we are doing what Juniper call ‘Source NAT‘ where we translate many addresses to one, (as in this case, but it can be a ‘pool’ of IP addresses). For the Cisco heads (like me) we are doing PAT.
Note: If you see Juniper mention ‘Destination NAT‘ they are usually talking about NATTING inbound traffic to one (or more) internal IP addresses.
[box] set security nat source rule-set TRUST-TO-UNTRUST from zone untrust
set security nat source rule-set TRUST-TO-UNTRUST to zone trust
set security nat source rule-set TRUST-TO-UNTRUST rule PAT-INTERFACE match source-address 192.168.0.0/16
set security nat source rule-set TRUST-TO-UNTRUST rule PAT-INTERFACE match destination-address 0.0.0.0/0
set security nat source rule-set TRUST-TO-UNTRUST rule PAT-INTERFACE then source-nat interface [/box]
Related Articles, References, Credits, or External Links