Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Sep 2010 15:14:29 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        loki.fab@gmail.com
Cc:        net@FreeBSD.org
Subject:   Re: Call for testers: RFC 5569 (6rd) support in stf(4)
Message-ID:  <20100924.151429.153301331.hrs@allbsd.org>
In-Reply-To: <AANLkTik5amD6Sr5CEhyVu1fnbMvkevqZQ%2BFGW5ZPcNAa@mail.gmail.com>
References:  <20100923.053236.231630719.hrs@allbsd.org> <20100924.011518.142217958.hrs@allbsd.org> <AANLkTik5amD6Sr5CEhyVu1fnbMvkevqZQ%2BFGW5ZPcNAa@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Fri_Sep_24_15_14_29_2010_101)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Ondoy <loki.fab@gmail.com> wrote
  in <AANLkTik5amD6Sr5CEhyVu1fnbMvkevqZQ+FGW5ZPcNAa@mail.gmail.com>:

lo> I haven't tried your patch yet but I need some clarifications.
lo> RFC 5969 has the following elements for 6rd configuration:
lo> IPv4MaskLen, 6rdPrefix, 6rdPrefixLen, 6rdBRIPv4Address.
lo>
lo> >From your example, I think the following takes care of
lo> 6rdPrefix and 6rdPrefixLen:
lo>   # ifconfig stf0 inet6 2001:db8:c000:0202::/32
lo>
lo> How can we configure the IPv4MaskLen and 6rdBRIPv4Address?

 6rdBRIPv4Address is a part just after prefixlen of an IPv6 address on
 the stf.  In the case of 2001:db8:c000:0202::/32, it is c000:0202 =
 192.0.2.2.  When a host wants to communicate with a BR router, just
 specifying an IPv6 address with embedded BR IPv4 address is fine.  No
 configuration of stf on that host is needed.

lo> I suspect IPv4MaskLen is fixed at zero (use all 32 bits) in this patch.(?)

 IPv4MaskLen can be set in the IPv6 routing table, not stf interface
 itself.  The stf interface accepts 6rd IPv4 packet with a whole IPv4
 source address range (this is equivalent to IPv4MaskLen=0 here) once,
 but it delivers the decapsulated IPv6 packet with a valid route only.
 So, if no route in 2001:db8::/32 which is more specific is added, no
 IPv6 packet is delivered outside of the stf.

 For example, the router has a route 2001:db8:c000:0200::/56 to
 outside of the stf, IPv4MaskLen is virtually equal to /24.

lo> As I understand from the specs, this can be variable.
lo> It seems that at the CE, the IPv4 address of the BR is automatically
lo> calculated from the dst/src IPv6 address. But what if the embedded
lo> IPv4 address is not the whole 32 bits (IPv4MaskLen > 0)?
lo>
lo> Also, you mentioned that prefixlen of stf is from 0 to 32. Is this
lo> the same as 6rdPrefixLen?
lo> I think 6rdPrefixLen can be more than 32.

 No, 6rdPrefixLen is implemented as "stf's prefixlen + 32" in the
 patch.  So, the range is from 32 to 64 in terms of 6rdPrefixLen.

 In short, a prefix with IPv4MaskLen=0 is always set to the stf, and
 IPv4MaskLen is handled in the routing table.  Yes, I agree that this
 is a bit confusing and maybe I will change the design and/or the way
 to configure it in more intuitive fashion.  It is due to some
 limitations in the internal structure of stf.

lo> Lastly, I'm a bit confused with the IPv6 default route at the CE
lo> (set to 2001:db8:c000:0201::1) since there's supposed to be
lo> no IPv6 connection between the CE and the BR, only IPv4.

 It works like following: the CE router has a route to 2001:db8::/32
 on its stf, so an IPv6 packet with no direct IPv6 connection goes to
 stf, then it will be encapsuled as a 6rd IPv4 packet, delivered to
 the BR via IPv4, and decapsuled there.  The IPv4 address of the BR is
 embedded in that address.

-- Hiroki

----Security_Multipart(Fri_Sep_24_15_14_29_2010_101)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAkycQcUACgkQTyzT2CeTzy1chQCg1hH5IY1Yj2CGHFkkjHyEJ/Hd
9swAniPnVJgEGaVQWkjlp6AFTM58M2dV
=KGtA
-----END PGP SIGNATURE-----

----Security_Multipart(Fri_Sep_24_15_14_29_2010_101)----



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