# Proxy NDP IPV6

## JYF

I got yesterday an IPV6 connectivity with my ISP (which is Free in France)

My network is :

ISP-----eth1-[ Gentoo Router ]-eth0----[LAN]

MY ISP announce a /64 prefix directly on eth1 link, and keep delivering all packets on eth1 instead of forwarding them to my router.

[quote]

16:56:15.975678 IP6 2a01:5d8:52f2:7d08:1::2 > orange.kame.net: ICMP6, echo request, seq 1, length 64

16:56:16.325109 IP6 fe80::207:cbff:fe21:b026 > ff02::1:ff00:2: ICMP6, neighbor solicitation, who has 2a01:5d8:52f2:7d08:1::2, length 32

[quote]

here the router fe80::207:cbff:fe21:b026 is asking with NDP where to deliver ICMP response from kame.net

I want to setup an NDP proxy but there is little do

I tried :

ip -6 neigh add proxy 2a01:5d8:52f2:7d08:1::2 dev eth1

and echo 1 > /proc/sys/net/ipv6/conf/all/proxy_ndp

but it didnt worked

server

 *Quote:*   

> 
> 
> eth1      Link encap:Ethernet  HWaddr 00:80:5F:31:D6:57  
> 
>           inet addr:82.242.125.8  Bcast:82.242.125.255  Mask:255.255.255.0
> ...

 

client on LAN 

 *Quote:*   

> 
> 
> eth0      Link encap:Ethernet  HWaddr 00:18:F3:07:70:D7  
> 
>           inet addr:172.17.17.63  Bcast:172.17.16.255  Mask:255.255.240.0
> ...

 

----------

## castor_fou

hello JYF,

as a freenaute myself, can you point me to an explanation on Gentoo to quickly set up ipv6 on my network interfaces ?

----------

## noobstate

http://www.gentoo.org/doc/en/ipv6.xml

im gona assume u have IPv4 connection right now 

i tried this but it didnt work out too well for i dont know it could of been my usb ethernet rtl81** or it could of been i was a little dumb towards the instructions but over all it didnt work out exactly as i tried (tried for weeks btw)

if u simple want IPv6 u can use 6to4 but u have to run it whereever ur connection comes in (for example INTERNET-ROUTER+(6to4)-LAN) and then the most hideous part is to have your firewall rules in tact and IPsec-tools compiled in properlly( cause i think it encrypts packets all the time) 

as for a IPv6 full blown internal network (aka ur lan clients are only IPv6 with IPv4 encapsulations inside it) i would LOVE if someone would write a howto about it. if not when i try it again ill write what i did , however last time it didnt work so i ended up giving up 

but 6to4 works great if u are on the same box as the ISP assigned IP very simple and works. its when u try to give it to your internal network is when problems arrive - ROUTES - they are not like IPv4 and dhcpcd they dont automatically start

even tough radvd is supposed to make them . but for me, no go. if u want i can post my 6to4 script which worked firewall/router side.

----------

## JYF

I found an alternative solution here : http://ip6.fr/free-broute/ (fr)

 *Quote:*   

> 
> 
> L'utilisation d'un Neighbor Discovery Proxy tel que décrit dans la RFC 4389 aurait certainement été plus propre, mais je n'ai trouvé aucunne implémentation pour Linux.
> 
> 

 

It seems there is no implementation of NDP Proxy yet on Linux  :Sad: 

castor_fou :

Freebox sends Router Asvertisment to his LAN interface, so everything which is connected directly to it is autoconfigured, just wait 5 min. If not IPV6 is not enabled on your connection.

If you want to configure manually

ip -6 addr add <prefix>:<host>/64 dev <dev>

ip -6 route add default via <prefix>::1  

<prefix> is your ipv6 prefix, which is 2a01:5d8:<ipv4 in hex> for Free (mine is 2a01:5d8:52f2:7d08 )

<host> is the address your choose for your host (not ::1, as it is reserved as the Freebox's address)

<prefix>::1 is the Freebox's adress, and your default router

----------

## yam103

Proxy Neighbor Discovery has been implemented in the linux kernel since 2.6.19. So, It should work on your configuration.

points where your configuration seems correct: 

- You have IP Forwarding installed, 

- The firewall let your packets forward between the two interfaces

- Commands for enabling ND proxy is correct

ip -6 neigh add proxy 2a01:5d8:52f2:7d08:1::2 dev eth1

and echo 1 > /proc/sys/net/ipv6/conf/all/proxy_ndp 

(you can add the line "net.ipv6.conf.all.proxy_ndp=1" in /etc/sysctl.conf for permanent config)

I think that there is a problem of routing packets on your router, because both interfaces are on the same network, with the same prefix (2a01:5d8:52f2:7d08::/64).

You should try to set on your router the following addresses: 

eth1: 2a01:5d8:52f2:7d08::2/80

eth0: 2a01:5d8:52f2:7d08:1::1/80

And on the client: 

eth0: 2a01:5d8:52f2:7d08:1::2/80

---

This solution has 2 inconvenients: 

1/ Autoconfiguration is not possible on a /80 prefix LAN (this is not your issue) - But you can still use a /64 prefix (only) on your LAN, routing of packets should still work.

2/ you have to add manually (or in a script) each time the network is reset, each client of your LAN:

ip -6 neigh add proxy <IPv6 of client> dev eth1

That's not great, because as I understood RFC 4389, the router should handle proxying clients on both LAN automatically.

----------

## JYF

mmh it works  :Very Happy:  thanks

no autoconf, but at least a true network config.

----------

## JYF

I tried to make autoconf works, it worked.

i wrote http://gentoo-wiki.com/IPV6_And_Freebox

It's only a draft, never made wiki page or howto before.

----------

