Switches or “The floor concierge”
Imagine that you want to send a package from room 69 to room 62. In a typical building you cannot go to your neighbor and give them the package, it’s rude, you need to do it through the floor concierge.
The concierge or switch has a table of everyone’s door numbers:
| Floor | Room number | Door number | |-------|-------------|-------------| | 6 | 602 | 1 | | 6 | 609 | 1 |
Remember that each room can have many doors.
In reality the switch has a table that looks like this:
| Vlan | MAC Address | Port | |------|-------------------|-------| | 6 | aa:aa:aa:aa:aa:aa | fa0/2 | | 6 | ff:ff:ff:ff:ff:ff | fa0/3 |
The concierge knows to which door exactly to deliver the package.
In other words, a switch connects computers in a network.
Now, the concierge’s capacity is limited by several factors:
- Size of the sending door - speed of your interface
- Size of the receiving door - speed of their interface
- Size of the hallway in which the package is moving - “medium speed” (cable, wireless, etc.)
- Size of the concierge desk - switch port speed
Your concierge (switch) have multple roles as well.
- Package monitoring - Traffic monitoring
- Package priority - QoS
- Bundle many doors for improved speed or redundancy - link aggregation
- Block packages from unwanted rooms - MAC filtering or port disabling
- Door monitoring - SNMP
- And many more
But, what if you want to send your package to your neighbor in the 2nd floor?
Routers or “The building concierge”
This building concierge or router is the one handling the packages from one floor to another.
In other words, a router connects many networks together.
Same as the floor concierge, it has a table of rooms, but it uses the room number rather than the door number.
| Floor destination | Room quantity | Elevator door number | Room number | Notes | |:-----------------:|:-------------:|:--------------------:|:-----------:|------------------| | 1 | 256 | 255 | 1 | Easy to deliver | | 2 | 256 | 255 | 2 | Deliver at night |
This table will translate to something like this:
| Network destination | Netmask | Gateway | Interface | Metric | |:-------------------:|:---------------:|:-----------:|:-----------:|--------| | 192.168.1.1 | 255.255.255.255 | 192.168.1.255 | 192.168.1.1 | 1 | | 192.168.2.2 | 255.255.255.255 | 192.168.2.255 | 192.168.2.2 | 10 |
The building concierge (router) has an entry for notes (metrics) to decide which route or time is best to deliver the package to its destination.
But it cannot do it alone, it needs the floors to be connected somehow… like with an elevator or gateway
This elevator behaves like a normal room, in the sense that it has a door, but it can move from floor to floor, which means that it has a door “assigned” in floor 1 and 2.
This door is managed by the building concierge (router) not the floor concierge (switch). When a package needs to leave the floor, the floor concierge sends the package to the building concierge and it deliver the package to its destination.
From the floor concierge (switch) perspective, is another room with a door number (MAC Address) and it can send/receive packages in the same way as if the packages were in the same floor.
Over time, the building concierge (router) can learn new ways to deliver the packages more efficiently and work with packages based on priority or QoS.
- Networks and subnets or building layouts
- Switches and Routers or how rooms can communicate between floors
- Network protocols or how rooms communicate
- Internet, public IPs, NAT, DNS or how to connect rooms between buildings
- High performance networking or how to speed up the communication between rooms using high speed roads and other techniques
- SDN or dynamic floor arrangement
If you want contribute, please send a pull request or open an issue to this repo
MIT License Copyright (c) 2022 Guillermo Ramirez Garcia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.