Subject: Re: Configuring an IPv6 router, what do I need to configure
To: Andrew White <awhite@arc.corp.mot.com>
From: None <itojun@iijlab.net>
List: tech-net
Date: 03/14/2001 15:41:10
	see http://www.netbsd.org/Documentation/network/ipv6/ for more
	detailed instructions.

>I'm wanting to configure a box (running NetBSD-mac) to do IPv6 routing. 
>Obviously, I want to run rtadvd(8), but I don't know what config files I do
>and don't need, nor if I need additional routers.

	you don't need /etc/rtadvd.conf, you just need to configure interface
	addresses (en0 and en1).  rtadvd(8) will automatically guess what
	prefix to advertise.

>Let's say I want to configure two interfaces, en0 and en1.  I want en0 to
>use the prefix fec0:0:0:1::\64 and en1 to use the prefix fec0:0:0:2::\64.
>I can get this information stored in the internal routing tables by using
>/etc/ifconfig.en0
>/etc/ifconfig.en0
>inet6 fec0::1:0201:23ff:fe45:6789
>and similar for en1.  However, it would be really nice to simply specify the
>prefix somewhere and have the system figure out the IPv6 addresses itself.
>
>
>So
>
>(1) What configuration files do I need to set to have the system configure
>like this?  (What is the MINIMAL set of config files required?).

	/etc/ifconfig.en0:
	inet6 fec0::1:0201:23ff:fe45:6789 prefixlen 64 alias

	/etc/ifconfig.en1:
	inet6 fec0::2:0201:23ff:fe45:6789 prefixlen 64 alias

	/etc/rc.conf: add the following lines.
		ip6mode=router
		rtadvd=YES	rtadvd_flags="en0 en1"

	you do not need /etc/rtadvd.conf, as documented in rtadvd(8) manpage.

>(2) What daemons do I need?  rtadvd obviously.  What else?

	if you need to exchange routing with other networks, you need to run
	route6d(8) or other routing daemons.

>(3) Is this enough to allow me to do routing, or will this simply allow
>stateless autoconfiguration?  For routing between en0 and en1, what
>additional daemons do I need?
>(4) Will stateless autoconfig provide hosts on my network with enough
>information to default route through me, or do I need additional services
>(DHCPv6 or similar)?

	i don't understand what you mean here.  who do you want to
	autoconfigure?  the router or end hosts on adjacent ethernet?
	i guess the question is mixed up.  try to split questions well.

	router: routers cannot be autoconfigured.  the answer to (1) should
		be enough (and minimal) to route packets back and forth between
		en0/en1. 

	host: if you run rtadvd(8) on router, hosts will be able to get
		information about the prefix it is on, default router (the
		router running rtadvd), and interface address for this.
		you may want to put the following into /etc/rc.conf:
			ip6mode=autohost
			rtsol=YES	rtsol_flgas=interface

>(5) Ok, now I want to be a DNS also.  What else do I need?

	you need to run BIND9 on some of your machines.  also,
	you need to configure /etc/resolv.conf on every end nodes.
	(there's no well-deployed mechanisms to advertise presense of DNS
	server, yet)

itojun