A Blog

Quagga and Routing

by on Mar.13, 2009, under Tinkergeek

So, after some thinking, some prodding, and some money, I started to play with networking. My home network has for the longest time always had a Linux box at the front of it doing firewalling, nat, and all the other goodies one needs on a network. Ebay provided the cheap avenue to get some “real” networking gear, and after some frantic tabs and ?’s, I got a shiny new Cisco 871 configured up to do NAT and take a DHCP address.

Eventually, I wanted to get IPv6 networking back into my house. After dealing with SiXXS for the longest time, I moved to Hurricane Electric’s free tunnel service. I’ve never been happier with a free service. However, my home Internet connection is a Verizon DSL line with a dynamic IP address. HE just uses a point to point link for providing connectivity, so I choose to home my tunnel and IPv6 space to a machine at the Purdue Computer Society. Then, I set up a static tunnel to my house and routed some space to my 871. The goal here is to always have a constant connection for the world to me, even if that constant connection leads to a box and then dead-ends. Plus, it seems sort of silly to waste a whole /48 at my house when there could be all sorts of more useful places to send my IPv6 subnet space to.

This is where Quagga comes in. I do not really want to have to maintain static routes pointed everything, I just want the routers to know about eachother and figure out the hard parts. While I’m digging the Cisco stuff, I’m certainly not interested in buying another router, but Linux does that routing thing nicely. Quagga provides the routing protocols to populate the kernel’s routing table. It seems like a match made in heaven. (As a side note, recent Quagga builds are broken with respect to advertising IPv6 routes in BGP… Check before pulling your hair out too!)

So, for testing, I installed Quagga on two Linux boxes and gave them a simple configuration (ASN’s changed to protect the innocent):

Fremont:

router bgp 65220

 bgp router-id 128.46.156.55

 neighbor 2001:470:c180:aa01::2 remote-as 65221

 neighbor 2001:470:c180:aa01::2 next-hop-self

!

 address-family ipv6

 network 2001:470:1f11:6e5::/64

 network 2001:470:c180::/48

 aggregate-address 2001:470:c180::/48

 neighbor 2001:470:c180:aa01::2 activate

 exit-address-family

Saratoga:

router bgp 65221

 bgp router-id 128.46.156.11

 neighbor 2001:470:c180:aa01::1 remote-as 65220

 neighbor 2001:470:c180:aa01::1 next-hop-self

!

 address-family ipv6

 network 2001:470:1f11:53f::/64

 network 2001:470:c159::/48

 neighbor 2001:470:c180:aa01::1 activate

 exit-address-family

Then, after configuring up /etc/network/interfaces and making all the configurations active, things just worked magically:
fremont> show ipv6 route 
Codes: K – kernel route, C – connected, S – static, R – RIPng, O – OSPFv3,
       I – ISIS, B – BGP, * – FIB route.
K>* ::/0 via 2001:470:1f10:6e5::1, he-1
C>* ::1/128 is directly connected, lo
C>* 2001:470:1f10:6e5::/64 is directly connected, he-1
B>* 2001:470:1f11:53f::/64 [20/0] via fe80::20d:93ff:fe60:9b64, eth0.11, 00:20:56
C>* 2001:470:1f11:6e5::/64 is directly connected, he-1
B>* 2001:470:c159::/48 [20/0] via fe80::20d:93ff:fe60:9b64, eth0.11, 00:20:56
S   2001:470:c180::/48 [1/0] is directly connected, null0 inactive
C>* 2001:470:c180:aa01::/64 is directly connected, eth0.11
C * fe80::/64 is directly connected, eth0.11
C * fe80::/64 is directly connected, he-1
C>* fe80::/64 is directly connected, eth0
As we can see, BGP found some routes and they got put into the routing table. In fact, it worked so well, it even passed packets!
:,
No comments for this entry yet...

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...