3 ms·
> E.g. in theory your router should work with level 3 and below. If you look at the configuration on a typical small but powerful router (I'll use a Juniper MX
by walrus01 6y ago
> E.g. in theory your router should work with level 3 and below.
If you look at the configuration on a typical small but powerful router (I'll use a Juniper MX204 for an example), of course it's doing things at both layers 2 and 3. It's a useful model to define what is going on with various ethernet switch fabrics, before you try to understand how it's set up at layer 3. At layer 2 you could have a 100GbE interface that carries a vlan trunk going to a 1RU 48-port switch physically adjacent to the mx204, to create local subinterfaces on the router to 10Gbps PNI peers, to downstream colocation/datacenter customers, etc.
That's all traditional "layer 2" ethernet stuff. Then your logical subinterfaces themselves are configured as BGP peers, which is of course layer 3.
Understanding the model of your theoretical MX204 you've got:
layer 1: AC or DC power, cabling, fans, physical mounting, serial console cables
also layer 1, but has an impact on how you can configure stuff at layer 2: Does this port have a short reach 100GbE CWDM4 interace in it? Or a longer reach coherent? Maybe this 10GbE port has a 1490/1550 bidi single strand in it?
layer 2: Ethernet configuration in all its myriad ways. And also things like P and PE MPLS configuration to carry a layer 2 circuit between places over your layer 3 network. Configuration for ISIS would also go in layer 2.
layer 3: bgp, ospf, all the typical "router" stuff.
- comex 6y agoI believe the parent isn’t complaining that routers do things at layers 1-3, but that they also do things at layer 4 (namely, block anything that isn’t TCP or UDP).
- TeMPOraL 6y agoIsn't this just a naming issue, though? I remember initially being confused by "switches" doing layer 3 stuff and "routers" doing layer 4 stuff, but over the years I've just learned to revise the definitions in my head; now I consider "router" to be a box that works on most layers (up to all of them with a sufficiently smart router), and "switch" to be just a cheaper router with more Ethernet ports. Layers seem OK for dividing protocols, but networks tend to be managed across all layers, so it's understandable all that functionality gets put in a single device - possibly internally structured one. I'm not a network engineer, but what I understand from the admin panel of my Mikrotik router is that the mental model here is a bunch of virtual devices, each working on one of the layers, packaged into one physical box.
- walrus01 6y agoIn terms of equipment capabilities we most certainly have switches that have sets of layer 3 capabilities, even a ten year old cisco 3750x can do basic OSPF, BGP, EIGRP etc. Often referred to as an enhanced or layer 3 switch. https://www.cisco.com/c/en/us/products/collateral/switches/catalyst-3560-x-series-switches/data_sheet_c78-584733.html https://www.cisco.com/c/en/us/products/collateral/switches/c... But you for sure wouldn't call it a router because it has nowhere near the routing table RAM, routing ability, or full set of routing configuration parameters as you would want to use on a dedicated purpose router. For your mikrotik, if you open it up or if you look at someone's teardown of one, what you'll see is a set of gigabit ethernet switch chips (perhaps 1 ASIC per every 4 ports) under heatsinks, that have purely layer 2 feature sets only. And then one CPU that runs the mikrotik routerOS which does layer 3 things. The mikrotik will have different levels of performance in packets per second capability for traffic flows that stay at purely layer 2, and another level of capability in Mbps and pps at layer 3. The OS on the mikrotik knows how to tell the switch chips how to do things at layer 2 (define this vlan, define this trunk, group certain ports into the same fabric, do 802.1x stuff, etc). for instance here's a block diagram of a mikrotik rb4011: https://i.mt.lv/cdn/product_files/RB4011iGSplusRM_180903.png https://i.mt.lv/cdn/product_files/RB4011iGSplusRM_180903.png
- junon 6y agoAside from extra hardware, routers generally have a firewall built-in and can perform NAT translations and otherwise act as a gateway. They do DHCP in most cases, too. Of course when you start to look at enterprise setups things get a little more complicated. Since routers act as gateways, they have their own IP address too. Switches are not gateways. They join two physical segments and mask them as a single logical segment. They do routing only in the most basic of senses - moving packets between the physical lines.