Linux LAN Routing for Beginners: Part 2

Linux LAN Routing for Beginners: Part 2

by Carla Schroder

Last week we reviewed IPv4 addressing and using the network admin’s indispensable ipcalc tool: Now we’re going to make some nice LAN routers.

VirtualBox and KVM (Kernel-based Virtual Machine) are wonderful for testing routing, and the examples in this article are all performed in KVM. If you prefer to use physical hardware, then you need three computers: one to act as the router, and the other two to represent two different networks. You also need two Ethernet switches and cabling.

The examples assume a wired Ethernet LAN, and we shall pretend there are some bridged wireless access points for a realistic scenario, although we’re not going to do anything with them. (I have not yet tried all-WiFi routing and have had mixed success with connecting a mobile broadband device to an Ethernet LAN, so look for those in a future installment.)