Home > Networking Tips > Routing and Switching > How (and why) to turn a Linux server into a router
Networking Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ROUTING AND SWITCHING

How (and why) to turn a Linux server into a router


Peter Harrison
06.30.2005
Rating: -4.30- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


For more IT articles and tips specific to small and midsized businesses, visit SearchSMB.com.

Most IT managers think routers are overpriced -- that's what Peter Harrison discovered that while he was researching The Linux Quick Fix Notebook, a new book from Prentice Hall PTR. In this tip, Harrison explains why Linux can reduce the cost of routers and how to make that happen. - Editor

The cost of routers continues to decline, but in many cases they are still not cheap enough to be approved quickly by the finance department. There are a number of scenarios where a Linux-based router could be desirable:

  • If a router is needed for a proof-of-concept project, and cost is a prohibitive factor, then an IT manager could consider converting a spare, possibly obsolete, server into a Linux-based router.
  • In some cases the purchase of routing equipment may be in the budget, but staff members want to get some hands-on practice with a cheap router. They could use a Linux router to familiarize themselves with networking concepts ahead of formal training on and the arrival of the intended equipment.
  • Not all equipment can be covered by maintenance contracts when budgets are tight. If an unsupported departmental router fails, and delays are expected in renewing the contract or finding funds to hire a contractor and/or pay for a replacement, then a Linux router could be an option.
  • In some countries, purpose-built routers may be unavailable, prohibitively expensive, or lacking local sales and support representation. In such cases, cheap Linux server-based routers can be a viable alternative.

More advice from Peter Harrison

Comparing security on Linux and Windows

Fixing the lack of Linux documentation

How to integrate and secure Linux

Improving network performance takes teamwork

The previous examples give the impression that a Linux-based router should be considered as a last resort. This is not so. If configured and planned correctly, a Linux-based server converted to a router can be a serious competitor to many small office and departmental routers. Gigahertz server CPUs, plentiful RAM and fast disks can be purchased relatively cheaply. Linux-based routers can increasingly outperform purpose-built routers in the most commonly used tasks. In fact the bi-annual U.S. LinuxWorld Conference frequently showcases many Linux-based routing appliances. The proprietary router manufacturers have recognized this threat and are now increasingly offering all-in-one units that offer routing, switching, firewalls, VPN and VOIP services.

The Linux Quagga application is a case in point. It provides independent daemons that run dynamic routing protocols such as RIP, OSPF and BGP. Each daemon listens on its own separate purpose-built TCP port for telnet logins. Once you log in, the telnet command line virtually mimics a Cisco router. The OSPF telnet session only allows OSPF commands, and the RIP and BGP sessions only allow their respective commands. Commands take effect instantaneously and can be permanently saved in the /etc directory using the familiar Cisco write memory command. This is fun stuff for the techies and eye-opening stuff for their managers.

Routers usually require multiple interfaces across which they pass traffic. Fast Ethernet NICs for Linux are cheap. If you can't get your hands on a spare one, don't worry; the latest versions of Linux all support 802.1q VLAN tagging, which allows you to trunk multiple VLANs from a switch up to s single NIC on your Linux router.

For the least headaches, leave the Linux kernel alone. Streamlining it so as to support only basic system operation and networking functionality will definitely speed things up, but it can take time to determine all the unexpected interdependencies and maximize your optimizations. Give it a try if you have the time and support staff to do it.

Quagga isn't necessary when simple Linux-based static routes will suffice. VLAN tagging is usually only needed when interfaces for multiple networks are in short supply. Kernel tuning can be beyond the expertise of many IT personnel. However, all three should be considered when evaluating a self-built Linux router.


Rate this Tip
To rate tips, you must be a member of SearchNetworking.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Routing and Switching
Testing LAN switch power consumption: A best practices guide
Dynamic IP routing and routing protocols
Monitor your network traffic with MRTG
How routers work: An overview for networking pros
Secure Cisco routers against IOS flaw attack
Network summarization -- Supernetting and wildcard masks
Routing: Five common, easily avoided errors
Router Expert: Building a WLAN proxy server, implementing ASR
Router Expert: Building a WLAN proxy server, implementing WPAD
Cisco IOS IP routing: Static routes

Working With Servers and Desktops
What network loss testing tools/methods calculate dropped packets from a PC?
Do I have to disable DHCP on my router to create a DHCP server?
How can I replicate the services of Active Directory (AD) in ADC?
Top 10 reasons why computers do not have network access to each other
Troubleshooting -- 'Network Know-How' Chapter 17
Windows Server 2008 IP routing configuration: Static and dynamic RIPv2
Understand Windows tracert output to troubleshoot network connectivity
Test your TCP/IP protocol stack to troubleshoot network connectivity
Checking IP configuration to troubleshoot Windows network connectivity
Physical network security key to fighting low-tech threats

Network Hardware
Unified wireless network still a work in progress for vendors
3Com acquisition confirms HP-Cisco battle for China
Juniper to CIOs: Invest in internal cloud computing networks
802.11n wireless APs bring IP video to sprawling Illinois high school
802.11n upgrade: College ditches legacy network for new vendor
Network device management overload: Engineers managing too many boxes
What is network infrastructure and what is a hybrid network?
What preventative maintenance procedures for network devices exist?
Can wireless adapters operate as client access points to make SoftAPs?
Is there VLAN software recommend for Realtek NICs?
Network Hardware Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
four-way server  (SearchNetworking.com)
mail user agent  (SearchNetworking.com)
netstat  (SearchNetworking.com)
Technical Office Protocol  (SearchNetworking.com)
Telnet  (SearchNetworking.com)
two-way server  (SearchNetworking.com)
virtual network adapter  (SearchNetworking.com)
virtual network computing  (SearchNetworking.com)
virtual systems management  (SearchNetworking.com)
VxWorks  (SearchNetworking.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Networking Solutions for Business

Alcatel-Lucent Network Business Communications Solutions

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts