≡ Menu

network admin

Quagga: Linux Dynamic Routing Software

I've already written about Linux static routing configuration. However, sometime you need to configure Linux routers dynamically to get changes of network connections by communicating information about which networks each router can reach and how far away those networks are. These days most network admin prefer to use OSPF or BGP over RIP. Linux and UNIX system can act as router using special software.

Quagga Software

Quagga is a network routing suite providing implementations of OSPF (v2 & v3), RIP (v1, v2 & v3) and BGP (v4) for Unix-like platforms, particularly FreeBSD, Linux, Solaris and NetBSD. Quagga is a fork of GNU Zebra. Quagga is intended to be used as a Route Server and a Route Reflector. It is not a toolkit, it provides full routing power under a new architecture.

Zebra IP Routing Manager

zebra is an IP routing manager. It provides kernel routing table updates, interface lookups, and redistribution of routes between different routing protocols. zebra is included with quagga software.

Install quagga

Debian / Ubuntu Linux user type the following command:
$ sudo apt-get install quagga
RHEL , Fedora, CentOS Linux user type the following command:
# yum install quagga

quagga Software Configuration

quagga configuration is beyond the scope of this blog post; I recommend reading official configuration documentation for further information.

Q. I am using Ubuntu Linux and I would like to know how to create alias for eth0 so that I can have multiple IP address?

A. To create alias for eth0 use ifconfig command. It is use to configure a network interface and aliases.

Assuming that your eth0 IP is 192.168.1.10 and you would like to create an alias eth0:0 with IP 192.168.1.11. Type the following command:

sudo ifconfig eth0:0 192.168.1.11 up

OR

sudo /sbin/ifconfig eth0:0 192.168.1.11 up

Verify that alias is up and running using following two command(s):

/sbin/ifconfig
ping 192.168.1.11
ping your-getway-ip

Permanent configuration

Your ethernet configuration is located in a file called /etc/network/interfaces. If you reboot system you will lost your alias. To make it permanent you need to add it network configuration file:

gksudo gedit /etc/network/interfaces

OR

sudo vi /etc/network/interfaces

Append the following configuration:

auto eth0:0
iface eth0:0 inet static
name Ethernet alias LAN card
address 192.168.1.11
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0

Save the file and restart system or restart the network:

sudo /etc/init.d/networking restart

Please note that you can also use graphical tools located at System > Administration > Networking menu. Or use the following GUI tool to setup aliases, hostname, dns settings etc:

sudo network-admin

If you want more network aliases, use eth0:1, eth0:2, eth0:N (max upto 254).

See also:

No Route to Host error and solution

I am getting error that read as No Route to Host. I am trying to ping my ISP gateway as well as DNS server but I am getting this error. How do I solve this problem?

This problem indicate networking conflicts or some sort of networking configuration problem.

Here are things to check:

Can you ping to your local router interface (such as 192.168.1.254)?

Make sure your card (eth0) is properly configured with correct IP address and router address. Use ifconfig command to configure IP address and route command to setup correct router address. If you prefer to use GUI tools:

  • redhat-config-network - Works on Red Hat and Fedora Linux/Cent OS.
  • network-admin - Debian and Other Linux distribution use this GUI too

Use above two GUI tools to setup correct IP address, DNS address and router address.

b) Make sure firewall is not blocking your access

iptables is default firewall on Linux. Run following command to see what iptables rules are setup:
# /sbin/iptables -L -n

You can temporary clear all iptables rules so that you can troubleshoot problem. If you are using Red Hat or Fedora Linux type command:
# /etc/init.d/iptables save
# /etc/init.d/iptables stop

If you are using other Linux distribution type following commands:
# iptables -F
# iptables -X
# iptables -t nat -F
# iptables -t nat -X
# iptables -t mangle -F
# iptables -t mangle -X

c) Finally make sure you are using a router and not a proxy server. Proxy servers are good for Internet browsing but not for other work such as ftp, sending ICMP request and so on.

See also: