How to convert CentOS to a router

We can convert the CentOS to a router by installing the package Quagga on it. (The same package that was originally used in Vyatta)

 

This package includes these services that need to be initialized: zebra, bgpd, ospfd, ospf6d, rip, ripng

The service “zebra” must be configured and started and rest of them based on need.

 

# yum install quagga

 

# cp /usr/share/doc/quagga-XXXXX/zebra.conf.sample /etc/quagga/zebra.conf

# service zebra start

# chkconfig zebra on

 

For service bgpd we have

 

# cp /usr/share/doc/quagga-XXXXXXX/bgpd.conf.sample /etc/quagga/bgpd.conf

# service bgpd start

# chkconfig bgpd on

 

In order to access the CLI interface we use this command:

 

# vtysh

 

The command line syntax changes from Unix-like to Cisco-like

 

For example:

 

Router-A# show running-config

 

Router-A# configure terminal

Router-A(config)# no router bgp 7675

Router-A(config)# router bgp 100

Router-A(config)# no auto-summary

Router-A(config)# no synchronizaiton

Router-A(config-router)# neighbor 100.100.0.2 remote-as 200

Router-A(config-router)# neighbor 100.100.0.2 description “provider B”

Router-A(config-router)# exit

Router-A(config)# exit

Router-A# write

 

Reference: http://xmodulo.com/centos-bgp-router-quagga.html

 

For firewall we can use iptables but other features such as “route-map”, “prefix-list” and “as-path” are available.