Subject: Re: Configuring an IPv6 router, what do I need to configure
To: Andrew White <awhite@arc.corp.mot.com>
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
List: tech-net
Date: 03/19/2001 14:22:17
>> >(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"
>
>OK.  So I have to specify the entire address for en0 and en1, and can't
>simply specify the prefix and have the card construct the address?

	if you are sure you can mount /usr before ifconfig, you may be able
	to use sed/awk trick like below:
	ifid=`ifconfig wi0 inet6 | grep fe80: | awk '{print $2}' | sed -e 's/%.*//' -e 's/fe80:://'`
	it is not always possible.

>>         you do not need /etc/rtadvd.conf, as documented in rtadvd(8)
>>         manpage.
>As long as I specify the ifconfig.* files.

	incorrect; you need to configure interface addresses under P::x
	when you advertise prefix P::/64.  otherwise, onlink determination
	will disagree between the router and hosts, and willl show very
	strange behavior.

>Thanks very much.

	no problem!

itojun