6relayd - IPv6 relay and autoconfiguration daemon

** Abstract **

6relayd is an IPv6-tool that relays IPv6-management protocols like router
discovery, neighbor discovery and DHCPv6 so that clients on routed (non-
bridged) interfaces can use the public address prefix, DHCPv6 and DNS-service
of a master interface. This is useful to avoid NAT in chained IPv6-routers.

6relayd can also be used as a minimalitisc autoconfiguration daemon for
Router Discovery and stateless DHCPv6 without relaying and thus act as a
minimalistic replacement for radvd and / or a full featured DHCPv6 server
if simple stateless operation and no customization is required.


** Features **

1. Configuration and setup for forwarding between local interfaces

2. Router Discovery support (solicitations and advertisements) with 2 modes
   relay:	RD relay between master and slave interfaces
   server:	RD server for slave interfaces
   a) support for rewriting announced DNS-server addresses in relay mode
   
3. DHCPv6-support with 3 modes of operation
   relay: 	mostly standards-compliant DHCPv6-relay
   transparent:	relay for broken servers not accepting messages from relays
   server:	minimalistic server for stateless DHCPv6
   a) support for rewriting announced DNS-server addresses
   
4. Proxy for Neighbor Discovery messages (solicitations and advertisments)
   a) support for auto-learning routes to the local routing table
   b) support for marking interfaces "external" not proxying NDP for them
      and only serving NDP for DAD and for traffic to the router itself
      [Warning: you should provide additional firewall rules for security]


** Compiling **

6relayd uses cmake:
* To prepare a Makefile use:  "cmake ." 
* To build / install use: "make" / "make install" afterwards.
* To build DEB or RPM packages use: "make package" afterwards.


** Relay Mode **

0. Relay mode is used when a /64-bit IPv6-Prefix should be distributed over
   several links / isolated layer 2 domains (e.g. if no prefix delegation
   is available). In this mode NDP (namely Router Discovery and Neighbor
   Discovery) messages and DHCPv6-messages are proxied. For DHCPv6 also
   server mode can be used instead of relaying if desired.

1. When starting 6relayd it is required that the master interface - where
   IPv6-service is already provided - is configured and usable.
   
2. If the upstream router doesn't provide or announce a DNS-service that is
   reachable in an at least site-local scope, a local DNS proxy (e.g. dnsmasq)
   needs to be run and configued on the same router where 6relayd is running.
   (This step can most likely be skipped in most environments.)
   
3. 6relayd is run with the appropriate parameters (e.g. -A).
   See 6relayd -h for command line parameters.


** Server Mode **

0. Server mode is used as a minimalistic alternative for full-blown servers
   like radvd or ISC DHCP if simplicity or a small footprint matter.
   Note: The master interface is unused in this mode. It should be set to '.'.

1. If there are non-local addresses assigned to the slave interface when a
   router solicitation is received, said prefixes are announced automatically
   for stateless autoconfiguration.

2. If DNS servers should be announced (DHCPv6 server-mode) then a local DNS-
   proxy (e.g. dnsmasq) needs to be run on the router itself because 6relayd
   will always announce a local address as DNS-server.

3. 6relayd is run with the appropriate parameters (e.g. -S).
   See 6relayd -h for command line parameters.
