Hello!
Today we will see how Dynamic routing is configured on Linux routers because they do not support it natively. To do this we will use the suite Quagga, which includes implementations of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix platforms (FreeBSD, Linux, Solaris and NetBSD) and to modify the configuration of equipment typical orders through the Cisco IOS. Architecture
Quagga Quagga consists of several daemons that work collaboratively to build the routing table. For example, the daemon handles ripd RIP, while the daemon is ospfd which supports the OSPF protocol. To changes in the kernel routing table and for redistribution of routes between different protocols, using the zebra daemon .
Installation
If we make a production facility with a complex configuration, it would be preferable to download the code to configure and compile it with the desired options. For this example, however, install the package available in the Debian repository.
# aptitude install quagga
quagga daemons have their own terminal or VTY (a CLI) to which we connect via telnet for configuration. After installation, we can see how been added to the file / etc / services the following entries:
Configuring RIPv2
The first task is edit the file / etc / quagga / daemons to activate the protocols you want to configure on your machine and restart the service:
# nano / etc / quagga / daemons zebra
= yes
ospfd
bgpd = no = no = no
ospf6d
ripd = yes = no
ripngd
# / etc / init.d / quagga restart
Next we must create a configuration file for each daemon enabled. Each daemon has an associated file with a specific name:
zebra: bgpd: ospfd: ospf6d: ripd: ripngd: | zebra.conf bgpd.conf ospfd . conf ospf6d.conf ripd.conf ripngd.conf |
To create the configuration files, you can copy the sample files that includes the documentation:
# cp / usr / share / doc / quagga / examples / zebra.conf.sample / Etc / quagga / zebra.conf # cp / usr / share / doc / quagga / examples / ripd.conf.sample / etc / quagga / ripd.conf |
Finally, we to change the permissions, the owner and group of these files:
# chown quagga: quaggavty / etc / quagga / *. conf # chmod 640 / etc / quagga / *. conf |
and restart the service:
# / etc / init.d / quagga restart
Now we can begin to configure dynamic routing, for which we connect by telnet to the daemon VTY ripd. We asked for a password, default is zebra, but you can change the file / etc / quagga / ripd.conf:
ripd # telnet localhost Trying
: 1 ...
Trying 127.0.0.1 ...
Connected to localhost.
Escape character is'^]'.
Hello, this is Quagga (version 0.99.15).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
User Access Verification Password
:
ripd>
And we could set our Linux to work with RIP using typical Cisco IOS commands:
ripd> enable
ripd # configure terminal
ripd (config) # router rip
ripd (config-router) # network 10.0 .0.0 / 8
ripd (config-router) # network 20.0.0.0 / 8
ripd (config-router) # exit
ripd (config) # exit
ripd # write Configuration
saved to / etc / quagga / ripd.conf
Here you can find all the options with Quagga RIP settings, but if you did some After a Cisco router will see that the orders are virtually identical. Here you have the RIP configuration guide Cisco devices.
NOTE: do not forget to activate the forwarding bit machine for your route!
# echo "1"> / proc/sys/net/ipv4/ip_forward
And if you want to endure after a reboot:
# echo "net.ipv4.ip_forward = 1">> / etc / sysctl.conf
0 comments:
Post a Comment