Building Linux L3 switch/router on x86 – Part1 – Introduction
September 1, 2011 1 Comment
1) What new does your project bring?
But if you want to know how to build our own Linux Multilayer switch/router from scratch, the next few parts of the tutorial have been written for you.
2) If it does not offer anything new why should I waste my precious time?
Firstly, it is about getting knowledge. Even if you are an experienced Linux user, they are some specific problems mentioned that could get your attention.
Secondly, no one forces you to read ;-)
3) Why not to use a ready-to-run free Linux router distribution such as Vyatta Core?
It is also an option you might consider. Vyatta is a professional network solution with its own OS. Running it is much more about getting knowledge about networking than building your own Linux router.
4) OK, you’ve got me. What do you hide in there?
Part2 – CentOS 6.0 Installation
5) What kind of hardware do I need?
An old Petium III with two Ethernet card and one Wireless card should be enough. The minimal 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 about your hardware?
- 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
- Mainboard Chipset – SiS 635T
- Memory – 2 x 512MB PC3200 DDR400 RAM 184 PIN NON ECC
- Video Chipset – NVidia Riva TNT2 M64, 32MB
- Hard Drives
- ST380011A 80GB
- ST3204231 20GB
- CD/DVD HL-DT-ST DVDRAM GSA-4163B
- Network Controllers:
7) What if I don’t have stuff to play with?
Use virtualization software instead of real hardware. They are great virtualization tools available such as Qemu, KVM or VirtualBox. Choose the one and create a new Virtual Machine. Install GNS3 software and import the Virtual Machine to GNS3.
One big 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.
8) What are we going to install?
Features, Services and Software version:
- 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 the strange 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.
I hope you find it useful.