IPv6: Dynamic Routing with Quagga and ospf6d (OSPFv3)

This is largely based on http://unquietwiki.com/tinc_quagga_ipv6.html.

Enabling Quagga and Its Daemons

The installation of Quagga and ospf6d is different on Debian/Ubuntu and on OpenWrt systems. The configuration files can be the same (in structure).

/etc/quagga/daemons (Debian/Ubuntu systems)

zebra=yes
bgpd=no
ospfd=no
ospf6d=yes
ripd=no
ripngd=no
isisd=no
Configuration of OSPF6d

/etc/quagga/ospf6d.conf

password PASSWORD
!! adapter setup :
interface LOCALNET
interface vpn6
!! router setup :
router ospf6
! replace # with the "ID" of the router :
router-id 0.0.0.#
! Redistribute static routes to OSPF6
redistribute static
redistribute connected
! On the router with the IPv6 uplink you want to
! redistribute the default route:
! (see http://wiki.shorewall.net/wiki/IPv6_ospf6d )
redistribute kernel
! Tell ospf6d witch IPv6 networks belong to which
! quagga area (enables link aggregation) :
area 0.0.0.# range GLOBAL:#::/64
area 0.0.0.# range ULA:#::/64
! Break up the Network into backbone and non-backbone areas
! (thus making this router an "area border router" - ABR) :
interface LOCALNET area 0.0.0.#
interface vpn6 area 0.0.0.0
Configuration of Zebra

/etc/quagga/zebra.conf

hostname SITENAME
password PASSWORD

interface LOCALNET
  description Local Network (usually br-lan or eth0)
  ! Enable Linux' link detection :
  link-detect
  ! Send router advertisment messages :
  no ipv6 nd suppress-ra
  ! Max time allowed between sending unsolicited
  !  multicast router advertisements (s) :
  ipv6 nd ra-interval 10
  ! Set the IPv6 address of the interface :
  ipv6 address GLOBAL:#::ffff/64
  ipv6 address ULA:#::ffff/64
  ! Set the IPv6 prefix (to advertize) :
  ipv6 nd prefix GLOBAL:#::/64
  ipv6 nd prefix ULA:#::/64

interface vpn6
  description Tinc's Tunnel Network Interface
  link-detect
  ipv6 address ULA::#/64
  ipv6 address GLOBAL::#/64

interface lo
  link-detect
  ipv6 forwarding
  ipv6 route ULA:#::/64 LOCALNET
  ipv6 route GLOBAL:#::/64 LOCALNET

! Log all messages related to the communication with the kernel at a
! priority level of informational and above to a file /tmp/zebra.log :
debug zebra kernel
log file /tmp/zebra.log informational

We need to find ways to configure static routes on routers that also do dynamic routing. These static routes must be announced through dynamic routing so other dynamic routers will learn about them without being statically configured themselves. Then add the actual static routes to zebra.conf:

! Destination Gateway
ipv6 route 2001:db8:f00f::/48 2001:db8:fedc:1::1
Quagga Command Line Prompts

To connect to the Quagga command line prompts:

telnet ::1 zebra
telnet ::1 ospf6d
## useful debug commands:
# show ipv6 ospf6 neighbor
# show ipv6 ospf6 spf tree
Firewall considerations

You have to apply these firewall rules on OpenWrt to allow forwarding from lan to the tunnel ipv6net: /etc/firewall.ipv6net

Resources

Comments