Tower Networking Inc.

Tower Networking Inc.

Not enough ratings
Router? I hardly know her! Your rudimentary guide to what routers are
By Owl
Welcome! This is a rudimentary and very haphazard guide on how routers work! Why use a router you ask? Because switches will instantly overload your bandwith if you only use switches! Routers are an essential tool to 100% satiety!
4
   
Award
Favorite
Favorited
Unfavorite
1. What is a router?
A router is a piece of networking equipment used to direct (route) packets to a final destination. When a packet arrives on the router, the router checks the packet's address against it's own routing table. If it finds the address in its table, it forwards the packet in the direction it's meant to go. If not, then it will either send the packet down the default port (usually port0 in-game), or it will drop and lose the packet.

2. Why should I use a router? Why not a switch?
Switches can be VERY useful in certain situations, but as your tower scales larger and larger and you get more providers and consumers you'll quickly find that switches begin to overload the entire network. The reason for this is due to the fact that switches don't actually route the information to a specific address, they send the packet along every port until it reaches its final destination, even if that direction is toward someone the packet isn't meant for.

As you can see here, assuming everyone is connected to a switch, if JOE wanted to contact EMMA, it would try to ping everyone (pictured in orange) on the path toward EMMA's endpoint, and each other client trying to contact someone else would be doing the same thing at the same time for their own endpoints.

This would result in it making over 12 or so hops

The consequence of this is that, if you have 50 people trying to communicate to each other, that's potentially 50 packets at a time pinging everyone simultaneously, when if you had a router it could direct each person's packet toward the final recipient, thus preventing wasted bandwidth on the rest of the network.

However, if we use a router, it would direct Joe's packet straight to Emma assuming that it's routing table is set up correctly, so where it would ping every single person in the previous diagram, it would instead go just about 4 hops to reach its final destination and avoid taking up everyone else's bandwidth as pictured

3. So how do you set up the router?
Setting up the routers in this game is a seemingly easy task, but it can prove a bit difficult as the scale of the network grows larger and larger, for this reason I will touch on both the basic setup of the router, but also how to use the RIP command to make setting your routers up easier in the late game.


First and foremost, the routing table works by

1. Checking a packet's destination address
2. Checking it's routing table for said address
3. Forwarding the packet along the port associated with that address

If we have a provider with the HWADDR 2025, and a router with the HWADDR 1010 and he was connected to Port 7 of the router, then we would enter the following command into the router using a debugger to add his address to the routing table

route add 2025 via port7 on 1010

This would mean that if any consumers attempt to access the provider who has the HWADDR 2025, it would be sent along port 7. Thus, rather than taking every possible path it could like on a switch it instead goes (more or less) directly to the provider. You still need to have a DNS server set up for consumers to access the provider HWADDR / NWADDR though! So...
4. Router default port, or how to set your DNS server up at the start
The easiest way to set up your router so that consumers can still access the DNS (Domain Name Server) to find provider's HWADDR is to use the router's default port function. By default that's port0 on the router, but it can be modified to whatever port you want using

route default via port# on <router HWADDR>

where port# is the port's number. (port0, port1, port2, etc)

What this means is that, should a packet arrive on the router that doesn't have a specified address in the routing table, it will be sent along the default port instead of dropped. In our case, this means you can set your DNS up connected to a switch which is itself connected to port0 of a router, meaning that even without routing to a specific DNS that consumer's can still access the DNS
5. The agony of setting two routers connected to each other
In brief, once you have more than one router and multiple providers it can get a little annoying. Simple things like consumer connections can be established rather simply, but for each router you need to update the routing information for all the providers on the new router to show it where to go to the NEXT router for accessing a provider. At first this isn't too bad, you COULD theoretically connect the new router's port 0 to the old router, but if you connect a provider to the second router you then need to both

1. Update THAT router's table toward that provider, and
2. Update the FIRST router's table to go to the SECOND router.

As you get a larger network and more routers this can get very, very annoying. The solution? The RIP command!

The easiest way to use the rip command is to, for each router that has a table of providers, run the following commands


rip advertise on <router HWADDR>
Which advertises that router's routing table to any other connected routers who are LISTENING, and allows them to automatically assign routes to the provider's on the advertising router's ports

rip listen on <router HWADDR>
This is the counterpart to the advertise command, this enables a router to LISTEN for the ADVERTISING router's routing table, and will then automatically set it. For example

If router 1 has a connection to 3035 on port7, and router 2 doesn't have a route set for address 3035, if router 1 is ADVERTISING, and router 2 is LISTENING, it will then route traffic for 3035 to whichever port it's connected to router 1 by. This means that you only need to set the providers connected to each route and not have to update their tables for every other router that's connected to that specific router.
9 Comments
duhhbzz 14 Oct @ 12:28am 
> Oh no, is that still the case in the game? Real switches do not work like this... this accurately describes ethernet bridges or ethernet hubs. Ethernet switches build a mac address table and listen on ports for ARP requests to determine which direction to send packets.


Yeah I was reading his explanation like wait.. is that how the game is working cause I immediately thought of arp tables and what not. I saw some switches that have VLAN tagging so surely the rest of switch technology is programmed in the game.
Owl  [author] 26 Aug @ 3:48am 
@Nayzone



The rip command is one of the proposals you can get from the app that you get floors from, click on the "proposals" tab. Unfortunately you need to wait until it shows up, or get lucky with refreshing the proposals
Blu3wolf 25 Aug @ 4:44pm 
In game wiki agrees with you... in game switches are implemented as hubs.
True Pc King 22 Aug @ 5:19pm 
i would love it if this guide could have a picture of the routes needed to make the router to router on each floor work, my brain is struggling lol was probably very close to making it work but it didn't lol
Nayzone 22 Aug @ 10:55am 
how do i get the rip command? is it available from a certain day?
Owl  [author] 20 Aug @ 7:30pm 
@Blu3wolf

It may have changed since I check, but in practice and from what I'm aware using JUST the switches will quickly overload everything on your network, which leads me to believe that it works by just broadcasting the packets on everything. Though, I may be wrong.

Case in point though is that routers help to allow for high performance and accurate packet routing
Blu3wolf 19 Aug @ 11:17pm 
> they send the packet along every port until it reaches its final destination, even if that direction is toward someone the packet isn't meant for.

Oh no, is that still the case in the game? Real switches do not work like this... this accurately describes ethernet bridges or ethernet hubs. Ethernet switches build a mac address table and listen on ports for ARP requests to determine which direction to send packets.
Owl  [author] 16 Aug @ 8:37pm 
No problem! Happy to help
Jerik 16 Aug @ 2:23pm 
You did a great job explaining things, thanks!