Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Mar 2000 20:18:59 +0900
From:      Yoshinobu Inoue <shin@nd.net.fujitsu.co.jp>
To:        jhay@mikom.csir.co.za
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: ipv6 and rc.conf questions
Message-ID:  <20000306201859K.shin@nd.net.fujitsu.co.jp>
In-Reply-To: <200003061037.MAA00366@zibbi.mikom.csir.co.za>
References:  <200003061037.MAA00366@zibbi.mikom.csir.co.za>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

> Hi,
> 
> I have been playing with IPv6 on a few machines and I must say that it
> is very easy to get the basic IPv6 configuration on the "endpoints" ie.
> machines with just a ethernet connection. Just a line with
> 'ipv6_enable="YES"' /etc/rc.conf and it is done.

I'm glad to know that is working. :-)

> But how do you configure an IPv6 in IPv4 tunnel in rc.conf? I can do it
> on the commandline, I'm just trying to figure out how to do it in rc.conf.
> I can get the IPv4 part configured with something like this:
> 
> gif_interfaces="gif0"
> gifconfig_gif0="146.64.84.9 146.64.8.68"
>
> But how/where do you configure the IPv6 part of the tunnel? Do you have to
> put it in the network_interfaces= section where the normal IPv4
> configuration is done?

After gif tunnel is configured by the above setup, you can just
use ifconfig to assigne any IPv4 and/or IPv6 addresses to the
gif p2p link.

Such as,
  ifconfig gif0 10.0.0.1 10.0.0.2 netmask 255.255.255.0
  ifconfig gif0 inett6 fec0:0:0:1000::1 fec0:0:0:1000::2 prefixlen 64 alias

However, an IPv6 machine already has each IPv6 link local
address on all of its interfaces by default, so it is found
that no more additional IPv6 addr is necessary on p2p links.

When you ping6 on a gif tunnel, you will see replies from IPv6
link local addresses of local machin and remote machine like below.
(if the tunnel is setup correctly on each side.)

  hoge% ping6 ff02::1%gif0
  PING6(56=40+8+8 bytes) fe80::200:eff:fe2e:dfe1 --> ff02::1
  16 bytes from fe80::200:eff:fe2e:dfe1%lo0, icmp_seq=0 hlim=64 time=5.2 ms
  16 bytes from fe80::200:e2ff:fe0d:bd18%gif0, icmp_seq=0 hlim=64 time=22.185 ms(DUP!)
  16 bytes from fe80::200:eff:fe2e:dfe1%lo0, icmp_seq=1 hlim=64 time=8.127 ms
  16 bytes from fe80::200:e2ff:fe0d:bd18%gif0, icmp_seq=1 hlim=64 time=33.705 ms(DUP!)
  ^C
  --- ff02::1%gif0 ping6 statistics ---
  2 packets transmitted, 2 packets received, +2 duplicates, 0% packet loss
  round-trip min/avg/max = 5.2/17.304/33.705 ms


If you need to reach other addrs over the tunnel, then,
  -just assigne IPv6 route to the gif tunnel using
   "route add -inet6 xxxx" command.
or
  -enable following lines on each end of machines, and reboot them.
    ipv6_gateway_enable="YES"
    ipv6_router_enable="YES"


If you did update and make world recently, please check
/usr/share/examples/IPv6/USAGE. There will be more detailed info.
A handbook chapter version is now under preparation.


> Another question, how do you add a default IPv6 route in rc.conf? There is
> an ipv6_default_interface= variable, but from the comments it looks like
> it is only meant for link local multicast addresses.

In IPv6, a host's default router is automatically registered
by receiving Router Advertisement messages from routers.
To let routers send Router Advertisement, you need to invoke
rtadvd on your router.

It will be available by enabling the following config line on
the router.

  rtadvd_enable="YES"

If you want to enable it after the reboot, then please invoke
rtadvd as root, and give it list of interface names to which
you want Router Advertisement messages to be sent over.
Such as,

 rtadvd ed0 ed1 ep0 ep1


Wmmm, should rtadvd always be invoked when 'ipv6_gateway_enable="YES" ?


Cheers,
Yoshinobu Inoue


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000306201859K.shin>