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

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

Thanks for your reply.
I think I now see how you this is supposed to work.
What I didn't (crucially) get first was that the BR IPv4 address is configu=
red
at the CE when adding the IPv6 default route.

It is simpler to get when 6rdPrefixLen is 32 and IPv4MaskLen is 0.
Now I'm trying to figure out how to configure a CE using different
parameters (all else the same with your sample setup).

For example:
IPv4MaskLen   =3D 8
6rdPrefix        =3D 2001:db8:dd00::
6rdPrefixLen     =3D 40
6rdBRIPv4Address =3D 192.0.2.1 (c0 00 02 01)

given:
CE WAN IPv4      =3D 192.0.2.2 (c0 00 02 02)
so we'll get:
6rd delegated prefix (at the CE LAN side) =3D 2001:db8:dd00:0202::/64

To configure the LAN side interface, stf, and route:
# ifconfig fxp0 inet6 2001:db8:dd00:0202::1/64
# ifconfig stf0 inet6 2001:db8:dd00:0202::/32
# route add -inet6 default 2001:db8:ddc0:0002:0100::1
Is the above correct, or am I way off target?

Regards,
Ondoy


PS.
Please note that I refer to IPv4MaskLen, 6rdPrefix, 6rdPrefixLen and
6rdBRIPv4Address as defined in RFC 5969 (newly released doc for 6rd).


On Fri, Sep 24, 2010 at 2:14 PM, Hiroki Sato <hrs@freebsd.org> wrote:
> Ondoy <loki.fab@gmail.com> wrote
> =A0in <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> =A0 # ifconfig stf0 inet6 2001:db8:c000:0202::/32
> lo>
> lo> How can we configure the IPv4MaskLen and 6rdBRIPv4Address?
>
> =A06rdBRIPv4Address is a part just after prefixlen of an IPv6 address on
> =A0the stf. =A0In the case of 2001:db8:c000:0202::/32, it is c000:0202 =
=3D
> =A0192.0.2.2. =A0When a host wants to communicate with a BR router, just
> =A0specifying an IPv6 address with embedded BR IPv4 address is fine. =A0N=
o
> =A0configuration of stf on that host is needed.
>
> lo> I suspect IPv4MaskLen is fixed at zero (use all 32 bits) in this patc=
h.(?)
>
> =A0IPv4MaskLen can be set in the IPv6 routing table, not stf interface
> =A0itself. =A0The stf interface accepts 6rd IPv4 packet with a whole IPv4
> =A0source address range (this is equivalent to IPv4MaskLen=3D0 here) once=
,
> =A0but it delivers the decapsulated IPv6 packet with a valid route only.
> =A0So, if no route in 2001:db8::/32 which is more specific is added, no
> =A0IPv6 packet is delivered outside of the stf.
>
> =A0For example, the router has a route 2001:db8:c000:0200::/56 to
> =A0outside 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.
>
> =A0No, 6rdPrefixLen is implemented as "stf's prefixlen + 32" in the
> =A0patch. =A0So, the range is from 32 to 64 in terms of 6rdPrefixLen.
>
> =A0In short, a prefix with IPv4MaskLen=3D0 is always set to the stf, and
> =A0IPv4MaskLen is handled in the routing table. =A0Yes, I agree that this
> =A0is a bit confusing and maybe I will change the design and/or the way
> =A0to configure it in more intuitive fashion. =A0It is due to some
> =A0limitations 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.
>
> =A0It works like following: the CE router has a route to 2001:db8::/32
> =A0on its stf, so an IPv6 packet with no direct IPv6 connection goes to
> =A0stf, then it will be encapsuled as a 6rd IPv4 packet, delivered to
> =A0the BR via IPv4, and decapsuled there. =A0The IPv4 address of the BR i=
s
> =A0embedded in that address.
>
> -- Hiroki
>



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