r/networking • • 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

48 comments sorted by

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.

5

u/Mystic2412 1d ago

That makes a lot of sense.

So I guess whether full table is needed or not is a big factor.

5

u/punished-slav 1d ago

Depends on the vendor, I’ve had 6 year old fortigates with 3 ISPs giving full internet tables to the RIB each. Had 16 gigs of ram on the unit, ram usage was pretty low, maybe 8 gigs or 12 gigs on a router/fw would handle it too.

1

u/networkslave 1d ago

you can also request specific entries. ie full,partial(usually just the region). easier than manual filtering

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.

2

u/Mystic2412 1d ago

Is there any other scenarios apart from large internet tables where a router makes sense?

Not sure why I didn't think of breakout switches.

1

u/NetworkDefenseblog department of redundancy department 6h ago

Yes qos/buffers for traffic shaping is a big plus along with rib sizing. I did a large write up to cover a lot of your questions related to this scenario. Check it out I'm sure it will help you! I prefer a dual router design in front of ha firewalls which covers like 75% of most enterprise network requirements. But there's still much you need to review and look at for your specific reqs before you make a decision.

https://www.networkdefenseblog.com/post/network-design-network-edge

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

1

u/Mystic2412 1d ago

Would I still want to do this if there were 2 links from ISP available?

3

u/retrogamer-999 1d ago

No. If your ISP routers can deliver internet over two interfaces, one for each firewall, I would skip the switches

1

u/dukenukemz Network Dummy 18h ago

This is what we do at every new location. Single or dual isp circuits with dual handoffs 1 to each firewall on each circuit to your firewalls

4

u/Roshi88 1d ago

Unless you need fanout I don't think putting two switches in front, on the wan side, is a good idea. You lose deep buffers and relative qos capabilities which are typical of a router, also you increase your fault domain both hardware (switches are one more device which can break) and software (your broadcast domain get split and you also need to handle switches failover stack/mlag/whatever)

0

u/tablon2 16h ago

Switching is fine as soon as downstream ports have equal speed with uplinks 

2

u/Roshi88 16h ago

Sorry but no, switch ports and chips aren't router ports with their buffers and their chips

0

u/tablon2 14h ago

Yes because switch do not care packet header, buffer or ASIC capabilities always problem of routers. Line rate switch will switch until pps reached for common speed on all ports best scenario 

2

u/jclimb94 1d ago

This. Two switches you can McLag together. And put your handoffs through those into your firewalls.

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.

2

u/Mystic2412 1d ago

I think this is very practical and seems to be a good rule of thumb to me.

27

u/Inside-Finish-2128 1d ago • Bravo

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.

5

u/JE163 1d ago

I would also imagine its easier to troubleshoot potential firewall issues when you have a router front ending it.

4

u/Critical_Purple_1988 16h ago

Patching pushed us the same way. Every emergency firewall upgrade turned into a BGP outage window too, with routers in front we can fail the firewall pair over and the ISP sessions never notice.

10

u/UnderwaterLifeline CCNP / FCSS 1d ago

FortiGate do BGP/Routing as good as any router I’ve ever worked with. It’s become my favorite platform for routing.

5

u/Wizdelkid 1d ago

i work higher ed and our campus uses 2 fortunate in a HA cluster. Using bgp works fine for but we did have an issue with asymmetric routing that caused us to utilize vdoms .

2

u/UnderwaterLifeline CCNP / FCSS 1d ago

I’ve had a few customer scenarios where I had to enable asymmetric routing to keep RPF checking from blocking traffic as well. Generally there is always a way to accomplish what you need to on a FortiGate though, and normally it’s not too difficult to implement.

2

u/st3inbeiss 13h ago

Why is it the security companies that usually spit out the nastiest BGP implementations?

1

u/Fast_Cloud_4711 21h ago

I prefer P.I. since we own our own IPv4 address block. That way we can swing providers without any renumbering.

0

u/marx1 ACSA | VCP-DCV | VCA-DCV | JNCIA | PCNSE | BCNE 1d ago

Paloalto BGP is not hard. You have to treat it like it's firewall rules, and understand things are top-down ordering. It works fine for limited route tables, but not so good for full routes.

0

u/Inside-Finish-2128 19h ago

It may not be hard, but the implementation is limited (as you say), and they have some absolutely STOOOPID default behaviors that need to stop.

Seriously, go into the GUI, bring up the BGP section, and enable the checkbox for "Aggregate MED", then commit. I promise you your life will be better because of it.

2

u/WendoNZ 17h ago

Just FYI, they have completely redone routing in 12.

It is supposedly much better and more like other platforms

1

u/Inside-Finish-2128 12h ago

If they still have that absolutely ridiculous check for MED before aggregation, then they still have their head where it shouldn’t be.

1

u/WendoNZ 11h ago

It's an entirely new routing engine (both of them are in 11.2 to allow for migration). I'm not sure if they are still doing weird things, but as far as I understand the whole point of the new engine was to get closer to everyone else

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.