Manual

Switching and routing

A switch delivers inside one network, a router delivers between networks. Almost everything follows from that.

Two devices move your traffic, and they work at different levels. A switch moves data around inside one network. A router moves data between networks. Once that distinction is clear, most of the vocabulary falls into place.

Two kinds of address

Every network card has a MAC address burned into it, six pairs of hexadecimal digits like 48:A9:8A:1C:22:0F. It is fixed, it belongs to the card and not to the network, and it means nothing outside the cable segment it is on.

An IP address is the opposite. It is handed out, it says where in the network you are, and it can be read by a machine on the other side of the world.

The everyday comparison: the MAC address is your name, the IP address is your street address. Postal workers deliver by street address because a name alone tells nobody where to walk. But once the letter has arrived at your building, the last step is by name.

What a switch does

A switch has ports and one table, and it fills that table by watching. When a frame comes in on port 3, the switch notes: the sender of this frame lives behind port 3. It does that for every frame, forever, so within seconds of plugging things in it knows where everybody is.

Delivery then takes one lookup. A frame for a MAC address in the table goes out of that one port, and out of no other. Nothing else on the switch sees it. That is what "switched" means and why a switch with eight busy ports does not slow down: the conversations do not meet.

If an address is not in the table yet, the switch sends the frame out of every port except the one it came in on, and learns the answer from the reply. Entries expire after a few minutes, so a laptop that moves to another port is found again without anyone doing anything.

Broadcast, and the domain it travels in

Some messages have no single recipient. "Who has address 192.168.10.5" is the obvious one, sent by a device that has an IP address and needs the MAC address behind it. A broadcast goes out of every port, and every device on the network has to look at it.

Everything a broadcast reaches is one broadcast domain. A switch is one broadcast domain, and so is a stack of switches cabled together: the frame keeps going. That is the real reason not to put a thousand devices in one network. The traffic between them is fine, it is the shouting that costs everyone a little work and a little battery.

A router does not pass broadcasts on. So a broadcast domain ends where a router begins, and one network on one side of a router is one broadcast domain.

What a bridge is

A bridge is a switch made of software. Put four ports in a bridge and they behave as if a switch were soldered between them: one network, one broadcast domain, delivery by MAC address.

That matters on a MikroTik, because the box is a router with several ports, not a router with one port and a switch next to it. Those ports do nothing together until you say so. Putting them in a bridge is what turns "five separate holes" into "a five port switch with a router attached". Most models have a switch chip that does the actual work at full speed once the bridge is set up the right way. See bridge and ports.

Fast and smart

A switch is fast because its question is small: one MAC address, one table, one port. In hardware that is nearly free, which is how a cheap switch fills every port at once.

A router asks a bigger question. Which of my networks does this address fall in, does a more specific route exist, does the firewall allow it, does the address have to be translated, is this packet part of a connection I already know. That is thinking, and thinking has a price in throughput.

So the rule of thumb writes itself. Traffic that stays inside one network should stay on the switch. Traffic that has to cross to another network, or to the internet, goes through the router, and you accept that it costs more. When you separate a camera network from the office network, you are deliberately asking the router to look at every packet between them, which is the point.

Where VLANs fit

You often want several separate networks but you do not want several sets of cables and switches. A VLAN solves that. Each frame on the cable carries a small number, the tag, and switches keep the numbered groups apart as strictly as if they were different switches. Tag 10 never reaches a port that belongs to tag 20.

So a VLAN is a broadcast domain drawn in software. One switch becomes several switches, one cable between two switches carries all of them at once, and traffic between them goes through a router, exactly as traffic between two physical networks does.

The vocabulary around this is short. A port that carries several VLANs with their numbers attached is a trunk, usually to another switch or an access point. A port that carries one VLAN without a number, for a laptop that knows nothing about tags, is an access port.

Where the tool picks this up

You say which ports belong together in bridge and ports and which separate networks you want in VLANs, and the configurator works out the tagging, the trunks and the access ports from that.

Want to try it right away? Open the configurator