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

Our network configuration

The key takeaway from last time was that although we had made some progress with intra-network communication within each VLAN, we still could not do any inter-networking, and by extension, could not connect to the Internet (except from the router, of course).

We need inter-networking so we can…..use 3 computers at once?!

Let’s talk a little ARP

It’s important to reiterate that ARP is not an ephemeral process. IP addresses constantly change, whether you switch from using cellular data to a wi-fi network, or drive across town while using your same device, or even just that your DHCP configured IP has expired and a new one has been issued. For this reason, ARP requests are constantly being issued by all devices, to maintain a consistent cache.

Let’s do some routing

Routing is typically disabled by default. Devices with routing enabled are the links between the countless local area networks that make up the Internet.

…and just like that, we have inter-networking!

so what do we do now?

Out the back door with iptables and NAT

Something like that…
IP masquerading, visualized.

The manipulation and filtering of packets is part of the networking layer implemented by the OS, but there are tools which allow for end users to execute actions in the user space, that can modify the actions taken by the networking layer. For Linux, the module that implements this is known as netfilter, and the command exposed to users is known as iptables.

To enable IP masquerading, we need to modify our router’s NAT table, like below:

What else can we do with iptables?

Looking Forward

--

--

--

Working on storage management and infrastructure at Azure SQL

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Why Do Introductory CS Courses Overlook Nurturing Passion?

Linux Commands for Developers

Chaining Spark SQL Functions and User Defined Functions

Popping Shells and Jumping Fences

automation is the new black

How we’ve upgraded Magento without a second of downtime

How to Integrate the New ‘Sign in with Apple’ Button in Your iOS App?

The Boolean Satisfiability Problem vilely censured.

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

More from Medium

Why we should use tasks hour estimate

GitHub Copilot: 6 Months Later

Revert those changes in Git

An artisan sometimes makes his tools