8 bits only: Let’s build a router, part 1

Today I’m going to describe the first steps of how I set up a virtual router, to connect multiple private local access networks of virtual machines together, and eventually, to the Internet.

Your router, visualized

A router is really just a computer, which is specially configured to enable a set of devices to use a shared connection to the public internet (e.g., through a single modem/broadband connection), as well as to communicate with each other, independently of the Internet.

VM Setup

Private Network Setup

Goodbye bulky switch, hello virtualization!
Adding a network adapter for a VM in the blue network, connecting it to the blue switch

A network adapter is a hardware component of your computer which allows it to access a computer network, via a link-layer protocol. A common example that most would be familiar with is a Wi-Fi network adapter, which manages a device’s ability to access Wi-Fi networks.

Visualizing the Network

Hooking up the router

4 network adapters for our router, 1 per private network, 1 for the Internet

We have a network!

4 ethernet interfaces on our router, 1 per private switch, 1 to access the Internet

Getting some IP

To reach our goal of building a router as we know it, we’ll need to take the next step, and learn how to configure IP addresses for our network interfaces, as well as IP routing, both of which we’ll talk about next time.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aashray Anand

Aashray Anand

Working on storage management and infrastructure at Azure SQL