# ipv6: Prefix Delegation over PPP - how?



## Nadja (Feb 28, 2011)

Hi there!

I recently found out that my ISP supports native IPv6 via PPP/PPPoE, so I thought, I'd just give it a try. My provider mentioned that they would use prefix delegation with /56 networks. Since the FreeBSD user-ppp support IPv6, I thought it would be an easy task to solve. But I guess I as wrong 
The IPv6-handshake went well for ppp:
	
	



```
PPP ON gateway> show ipv6
IPV6CP [Opened]
 His side:        fe80::90:1a00:2a0:ee52
 My side:         fe80::214:6cff:fe2d:a83d
```
But my provider doesn't give me an IPv6-address, only an address local to the interface (inet6 fe80::214:6cff:fe2d:a83d%tun0 prefixlen 64 scopeid 0x8).

From what I understand, I need my gateway to issue a dhcp6-request on the tun0-interface to request my prefix. Then, this /56 needs to be announced by rtadvd to the local network.
I found a patch for isc-dhcp4.1-client to allow dhcp6-requests on my tun0-interface, and that doesn't look too bad:

```
Bound to *:546
Listening on Socket/tun0
Sending on   Socket/tun0
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_PD 00:00:00:00
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on tun0, interval 1030ms.
RCV: Advertise message on tun0 from fe80::90:1a00:2a0:ee52.
RCV:  X-- IA_PD 00:00:00:00
RCV:  | X-- starts 1298930307
RCV:  | X-- t1 - renew  +150
RCV:  | X-- t2 - rebind +240
RCV:  | X-- [Options]
RCV:  | | X-- IAPREFIX 2001:a60:10ff:8300::/56
RCV:  | | | X-- Preferred lifetime 300.
RCV:  | | | X-- Max lifetime 300.
RCV:  X-- Server ID: 00:02:00:00:0a:4c:45:52:58:2d:31:34:34:30:2f:37:34
message status code Success.
```

So... the problem is from here on I'm totally clueless, because my tun0-interface doesn't get an IP. I can set it manually with [CMD="ifconfig"] tun0 inet6 alias 2001:a60:10ff:8300::1[/CMD] and then I can even ping ipv6-addresses on the internet, but certain things still remain unknown to me:


How to go on from here? I read that I have to put something like this in /etc/rtadvd.conf: 
	
	



```
em0:\
addrs#1:addr="2001:a60:10ff:8300::":prefixlen#56:tc=ether:
```
but how do I get an IP from there for my gateway? rtsol refuses to work on the router.
Do I have to advertise the whole /56 via rtadvd? I thought one uses a subnet for every connected network (currently LAN and WLAN), so I need at least 2 subnets
Is there a batter way to to dhcp6 than to patch that isc-client? I'd rather use the one shipping with FreeBSD.
How to get my other Machines (windows, OSX and FreeBSD) on the network to play with ipv6 as well?
Is there a good place for information about this? I'm really surprised that prefix delegation is totally uncommon and I found close to no documentation for it.

I hope I gave enough information and I didn't sound *too* clueless 

- Nadja


----------



## SirDice (Mar 1, 2011)

I can't help you with the PPP side, I don't use it.

Rtadvd will work but you'll need to set a static IPv6 address on the interface that's serving the router advertisements. Rtsol doesn't work when you turn on routing.

Once rtadvd works your machines will automagically be assigned an IPv6 address and a gateway. Keep in mind that /etc/resolv.conf isn't touched by this process. I haven't figured out yet what the best solution is for name resolving, looks like it's going to be mDNS.

And yes, you can split up that /56 if you want to. You can advertise one segment on one interface and another on a different interface.


----------

