Building Linux L3 switch/router on x86 - Part1 - Introduction

1. What is your tutorials about building L3 switch offering?

Frankly, nothing. But if you want to learn how to build our own Linux Multilayer switch/router from scratch, the next several tutorials might help you.

2. Why should I waste my time on reading?

Firstly, it is about getting knowledge. Even if you are an experienced Linux user, they are some problems mentioned and solved so you can learn something new.

Secondly, no one forces you to read ;-)

3. Why not to use a Linux router distribution such as Vyatta Core?

It is also an option you might consider. Vyatta is a professional network router distribution with its own OS. Running it is much more about getting knowledge about networking than building your own Linux router.

4. OK you have my attention. What's your plan?

Part1 - Introduction, Hardware and Software Requirements

Part2 - CentOS 6.0 Installation

Part3 - Wireless Access Point Installation and Configuration

Part4 - Openvswitch Installation and Configuration

Part5 - Connecting Box to the Internet - PPPoE Configuration

Part6 - Connecting Box to the Internet - NAT and Firewall Configuration

Part7 - DDNS and NTP server Installation and Configuration

Part8 - DNS Cache Server Installation and Configuration

Part9 - DHCP server and Samba server Installation and Configuration

5. What's a minimal hardware requirement?

An old Petium III with two Ethernet card and one Wireless card should be enough. The minimal amount of RAM is 512 MB and 20 GB HardDrive disk. I recommend a computer with 1024 MB RAM and two 20 GB HardDrive disks for creating RAID-1 device. To have enough ports for end user connection three Ethernet cards should be available - one for WAN connection and two for LAN. As we are going to create an access Point, our wireless card must be compatible with Linux and a linux driver must support AP mode. Please, refer to the following URL web shorcuts:

Linux Wireless LAN Compatibility
Linux drivers for Wireless cards

6. What hardware are you using?

  •  CPU Intel Pentium III - 733Mhz, freqence ranges [500 - 1000]MHz, running 733,6 Mhz (5,5 x 133,4 Mhz)
  •  Mainboard Model - KOB 635T FSX
  •  Memory - 2 x 512MB PC3200 DDR400 RAM 184 PIN NON ECC
  •  Video Chipset - NVidia Riva TNT2 M64, 32MB
  •  Hard Drives
    • ST380011A 80GB
    • ST3204231 20GB
  •  Network Controllers:
    • 3 x Intel PRO/1000 MT Gigabit Desktop adapter (82540EM)
    • 1 x D-Link DGE-528T Gigabit Ethernet Adapter
    • 1 x Broadcom BCM 4318 [Air Force One 54g] 802.1g Wireless LAN Controller

7. What if I don't have hardware to play with?

Use virtualization software instead of real hardware. They are great virtualization software available such as Qemu, KVM or VirtualBox. Choose one and create a new Virtual Machine. Install GNS3 software and import the Virtual Machine to GNS3.

One great benefit of GNS3 software is that with just few clicks you can create a functional topology of virtualizated nodes connected with links together. GNS3 also allows you to connect your topology to the real network.

In actual version 0.8.1 it GNS3 supports Dynamips, Qemu and VirtualBox virtualizers and emulators.

8. What stuff are we going to install?

  • CentOS 6.0 - with software RAID-1
  • Linux switch - Openvswitch project, 1.2.0
  • Wireless software Access Point - Hostapd, 0.7.3
  • PPoE client - pppd 2.4.5
  •  NAT, Firewall - iptables v1.4.7
  • DNS server - BIND 9.7.0
  • DHCP server - isc-dhcpd-4.1.1-P1
  •  Samba 3.5.4-68
  • NTP client/server for LAN - 4.2.4p8
  • DDNS client - 3.8.1

9. What does a name "swouter" mean?

Basically, I named a Linux box - the  "swouter"  because it is Layer 3 switch with routing capabilities.

10. Do I need something else?

Nope. But an internet connection and your patience will be really helpful.