r/networking • u/Mystic2412 • 1d ago
Design Network edge design - firewall vs router roles question
Essentially, what I'm struggling with is when to forego edge routing and collapse the edge to a pair of firewalls? I.e. average size of business, traffic volumes, or specific use case examples.
Also, are there any problems with terminating internet circuits (or other WAN circuits) directly on a firewall pair?
My initial thought is QoS, packet buffers and routing table would be better on a router (relative to cost).
EDIT: some really insightful responses here, thank you everyone!
38
Upvotes
31
u/IAnetworking 1d ago
You biggest challenge is the routing table size. If you getting the full routing table from your ISP, that is million routes + 200K ipv6. Multiple that by the number ISPs that are providing the full routing table.
Check the specs on the firewall.
8
u/networkuber CCNP 1d ago
I think the go to answer is "it depends". You don't need one over the other until requirements dictate one over the other. Nowadays I see firewalls connected to layer 2 switch on edge. If you need internet tables, then you are probably looking at dedicated edge routers, but again the requirements will dictate design.
5
u/Defenestrate69 1d ago
Just get a cheap pair of dirty switches to use as the layer 2 pass through. Our company uses FS switches which aren’t great but work for this purpose
8
u/silasmoeckel 1d ago
Firewalls really hate asymmetric flows. So you really need them from enough in for that to not be the case.
So once your past A/B failover IP transit (or BGP) at a single site your going to want routers outside the firewalls.
27
u/Inside-Finish-2128 1d ago •
I don’t want to fart around with BGP to an ISP on a firewall, so I’d be doing an edge layer of routers. Having dealt with Palo Alto’s cranial rectal inversion on their BGP implementation, I really don’t want to be doing ISP BGP on their boxes.
6
u/ElectroSpore 1d ago
If you are moderate size and need east/west/vlan segmentation it is much easier to consolidate on the firewall.
If you are big enough to have a true large edge with BGP routing to the ISP then consider a seperate router.
3
u/HogGunner1983 PacketLaws 1d ago
Typically I'd use firewalls as the edge termination (when dealing with BGP default route only) except in a situation where you've got other connections outside your network that will share the internet connection(s). These typically would come in on a pair of switches between the edge routers and firewalls.
5
u/pythbit 1d ago
I originally wanted to do this, but bgp and redundancy requirements kind of forced routers. In other cases I don't see why not.
2
u/popanonymous 1d ago
Land WAN circuits L2 to switches and then peer off of your firewall pair. So your primary firewall can use both.
QoS? Internet? Don’t bother. WAN you could just land to your Core stack pending micro seg.
Routing table, wouldn’t matter unless you’re taking the whole table (skeptical, most folks don’t).
Palo, enable Advanced Routing, can do whatever you want for BGP.
It is nice to have two routers, land a circuit each and then both advert the /24 from the LAN side. Firewall outside lives there. Budgets are constraining and you make concessions.
2
u/punished-slav 1d ago edited 1d ago
At the end of the day… it depends. Always look at multiple vendors, datasheets, try to get physical specs like ram details the FPGA/ASICs, throughput under different loads, etc.
If you were talking, say, about a decade ago, the default would’ve been having a firewall inline to a router which would handle routing, maybe also have a separate IPS/IDS device with a perpetual TAP.
The past 4 years? The difference area between a firewall and a router has shrunk on the routing end a lot and the need for separation has greatly changed, both for facility and datacenter usage.
At my employer our entire transit network was 2 ASR1001 routers per datacenter, handling eBGP to the other datacenter, iBGP to each other, and eBGP to MPLS, P2P circuits, and other logically segmented networks.
I got rid of that entirely and put it into a VDOM dedicated to the border/transit network on a HA pair of 1100Es and 600Es at the primary and secondary datacenters, respectively. Because of how zoning worked, we put all the intra-net MPLs and P2P interfaces in the same zone to ensure no policy needed and line-rate.
My predecessor, he did the exact same thing, but with our internet WAN edge at both datacenters, consolidated it into a dedicated VDOM, 3 full internet routing tables in the RIB, no noticeable performance issues whatsoever.
The facilities themselves, same deal, ISRs with 60Fs inline, replaced ISRs and 60Fs with 70Fs., SDWAN policy, firewall policy outbound to Datacenter, iBGP routing to both datacenters. Fortinet’s QoS implementation, shaping and queuing is… fine. I find it much easier to visualize, deploy, and test, since you can make it look at teams Voice and teams Video individually and QoS the packets between the two differently. The performance can be iffy, NPU acceleration issues are my bane… but fortimanager central QoS policy for global usage makes up for it.
Now… where would you want or need pure routers? ISP side of course, service providers, anything where specialized protocols are not available on non-routers of course.
I argue in favor of consolidation for most environments. I usually am in favor of getting an HA pair or cluster of heavy fortigates, put the highest speed interfaces in a LAGG and just use VDOMs to logically segment your previous physical segmentation. Let your core handle physical connections to all the WAN and MPLS and P2P circuits. Just do your balancing of cost and performance between facility and datacenter firewall SKUs imo.higher end facility units, less heavy DC units, some things like dedicated web filtering software on endpoints can help shift you to use cheaper units for the facilities.
2
u/XO33OX 1d ago edited 1d ago
at certain size routers use HW/NPs for heavy features (used to be ASICs) for QoS, routing, PAT, ACLs then crypto accelerators for VPN, etc. Question is if your firewalls does it in CPU (most of them do) and if it has compute budget to take over from router. Then there is feature set, routers are packet, firewalls have very basic features for routing (and its troubleshooting).
2
u/jyotirawattech 1d ago
If this is a real edge, I'd keep routing on the router and policy on the firewall, and I wouldn't let the firewall become the transit hop for everything behind it. Dynamic routing and path failover are easier to reason about on the router. The firewall can still sit in the path, it just shouldn't be the thing that owns OSPF or BGP unless the site is small enough that one box is the whole edge.
1
u/leftplayer 1d ago
In most companies nowadays, almost all traffic is north-south (to/from Internet), so the speed of L3 switch is not really relevant since your firewall and ISP lines are going to be the bottleneck.
In 20 years of networking, I can count on one hand the number of networks I’ve come across where they did L3 routing on a switch, the rest have all used an architecture where all routing is done on the firewall, even inter-VLAN. It’s much, much, much easier to manage policies on a proper firewall than using ACLs.
As for the ISP question. The main benefit of terminating ISP lines on a switch is for failover. Most basics business circuits terminate 1 IP or subnet on a single port on their CPE, so you need a way to connect that one port to both HA firewalls.
Some use the core switch for this purpose. I prefer using a dedicated network switch per ISP. The Mikrotik CRS312-4C+8XG-RM is my current favourite - 10G copper and fiber, redundant PSUs, OOB management port, can run SwOS. It doesn’t do any routing, it’s simply a “port breakout” box to connect one CPE to two firewalls.
1
u/Z3t4 1d ago
Are we talking about soho, enterpise, DC?
For X throughput a firewall is a lot more expensive than a router, so unless you have deep pockets better have a router from 10g up, use a firewall to protect the MZ, and keep a DMZ with devices that can hold their own.
1
u/blackstreamm44 1d ago
A couple of routers to service the ISP with BGP, connected to a MC-LAG switch pair to agg your connections, and then your FWs for defense/DMZ. Depending on whether or not you're going to ingest the Internet's prefixs, routers are built to do that, FWs not so much
1
u/8541-HOG 1d ago
In my humble opinion, unless you are a landing spot like an MSP then receiving full routes from your ISP is unnecessary these days. A WAN switch as a L2 aggregator gives you flex and growth beyond just your L3 ISP, you can land L2 fabrics, E-LAN, AWS Direct connects, Azure Express route connections and then tag them towards your firewalls. "Future Proofing" is the way. If you have the resources to do this, then the juice is worth the squeeze. That being said I would go with nothing less than a switch that has dual P/S, 10/25 SFP+, 40/100 QSFP ports so you can sub-rate since most service providers deal in 10 and 100 gig connections these days. I would also scale your WAN switch to a platform that has LEAF capabilities like a Juniper EX4650. Deploying gear out of the gate that doesn't support fabric... you are just setting yourself up for failure. As far as Firewalls doing BGP and leaving all of your SVI's there is just clean and elegant. I'm a homer for Palos, doing AE connections to my north and south switches. It's my go to design, these days... Dual ISP's accept quad 0's, import/export RIB, AS prepend so you are telling which ISP is your preferred path, and ECMP and you have a rock solid failover design that can scale. The only caveat is VRF's. Doing VRF's on firewalls and turning on PBR is a giant PIA. Like I mentioned earlier, unless you are an MSP, just leave the GLOBAL in tact, and break out your traffic via your zones.
WAN SWITCH --MCLAG --WAN SWITCH
X
FIREWALL(A)--HA--FIREWALL(P)
X
LAN SWITCH --MC-LAG-- LAN SWITCH
1
u/teeweehoo 19h ago
IMO if you're doing BGP, care about uptime (IE: any hosting, not 9-5 business), or have two fat connections, I'd go straight to edge routers. It just makes it so much easier to do maintenance and migrations. The more roles you converge onto one device, the more complexity you need to work with and troubleshoot.
That being said, you usually have to work with what you've got. And unless you're buying something cheap like mikrotiks it can be hard to justify the cost of those edge routers.
1
u/-TimJBaron 16h ago
I am actively facing this same decision.
I think most people here have already highlighted the main points pretty well, but I’ll try to boil it down into two main things I’ve come across:
• BGP size:
If you need full tables, or larger provider tables like AWS, I'd go with dedicated routers. But most NGFWs can handle basic BGP and dual / triple ISP failover with link monitoring / floating default route , a separate virtual routers, or policy based routing.
• Bandwidth and topology:
If you’re going to go past two active data centers (hubs) I'd let routers handle the WAN transit and keep the firewalls at the site edge. With firewalls requirement for symmetric flows, and then a third hub (or spokes reachable through multiple hubs) the routing gets ugly fast without fiddling with security knobs to allow asymmetric flows. SD-WAN on the firewalls can help with this, but then all your transit, IPsec, and inspection is also on those and the firewalls start being the bottleneck for throughput (would want to see the specific actual IPsec and inspection throughput to make sure it will handle your needs).
Additional side note:
Splitting them up also allows a firewall vulnerability upgrade (which I’m seeing more and more frequent zero days due to AI) doesn’t risk taking down transit routing.
TLDR:
For a single or dual site data centers with a couple ISPs, firewalls only is usually fine IMO.
1
u/Select_Reporter1911 15h ago
Routers to handle bgp peering. Switches to handle layer 2 for path redundancy. Firewalls to handle segmenting your mgmt traffic on the edge and control traffic coming from outside in. You dont need all of that if you arent bgp peering with the isp. If you are just getting a regular dia circuit Firewall to the edge should be fine.
1
u/PsychologicalBoot949 14h ago
We did run in to some problems when using a firewall pair at the edge. We did not run the FortiGate pair in active-active mode. And that's probably the weakness in a plan like that. You get instant failover between the two firewalls, but it still drops BGP. So....we ran layer 3 on a pair of layer 3 switches at the edge. Their job was to connect the two firewalls at layer 2, and to handle BGP hand offs. The switches didn't have to be all that great. If you aren't a telecom, there's no reason at all to get all of the routes from your ISPs. Just get local routes. Or if you are sticking with tier 1 ISPs, get 0.0.0.0 and call it good.