Hurricane Electric's IPv6 Tunnel Broker Forums

General IPv6 Topics => IPv6 on Linux & BSD & Mac => Topic started by: sss123next on June 22, 2011, 03:32:13 PM

Title: IPv6 dhcp like autoconfiguration on router
Post by: sss123next on June 22, 2011, 03:32:13 PM
Hi all, i have successfuly setup ipv6 tunnel on my router and it work just fine (thx for good service), but i want autoconfiguration and default ipv6 routes on client's, what should i do for this ?
Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: cholzhauer on June 22, 2011, 05:05:57 PM
you want something called router advertisements.  if you google for router advertisements and whatever OS you're running, you should find all the info you need.
Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: sss123next on June 22, 2011, 05:13:15 PM
yes, i found some info about this, i running linux based os, i have installed radvd, but not sure about configuration, ipv6 still unclear for me to understand ..., i have done following
cat /etc/radvd.conf
interface br0
{
   AdvSendAdvert on;
   AdvLinkMTU 1280;
   MaxRtrAdvInterval 300;
   prefix 6613:1:11:5:0:0:0:/64
   {
AdvOnLink on;
AdvAutonomous on;
   };
};

i trying to configure it in similar to ipv4 way, but failing ), and about forwarding, does i need to setup something like this in sysctl or somewhere else?
clients recieving adresses in this range, but looks like does not setting up rotes on client side
Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: cholzhauer on June 22, 2011, 06:08:02 PM
I assume br0 is the correct interface

Your prefix is incorrect thought...you should use the routed /64 address from your tunnel details page

Is that the correct MTU setting for your network?
Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: sss123next on June 22, 2011, 06:15:58 PM
i set prefix same as local ipv6 adress of br0 interface in same range i think, but i may be wrong, mtu is 1450 i gues, i accessing internet via pptp connection, but also have bridge for local network connections, and runningn dhcp server for ip4 on it, and now want to add also ipv6.

ifconfig
br0       Link encap:Ethernet  HWaddr 20:cf:30:c0:2d:dc 
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: 6613:1::1/64 Scope:Global
          inet6 addr: fe80::22cf:30ff:fec0:2ddc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:60792906 errors:0 dropped:0 overruns:0 frame:0
          TX packets:99608284 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:50464012572 (46.9 GiB)  TX bytes:131262272181 (122.2 GiB)

br1       Link encap:Ethernet  HWaddr 00:30:4f:49:f8:ee 
          inet addr:10.9.23.84  Bcast:10.9.23.255  Mask:255.255.255.0
          inet6 addr: fe80::230:4fff:fe49:f8ee/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:227750625 errors:0 dropped:839257 overruns:0 frame:0
          TX packets:346030383 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:104933948188 (97.7 GiB)  TX bytes:321173843387 (299.1 GiB)

eth0      Link encap:Ethernet  HWaddr 00:30:4f:49:f8:ee 
          inet6 addr: fe80::230:4fff:fe49:f8ee/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:228035759 errors:0 dropped:0 overruns:0 frame:0
          TX packets:346032097 errors:0 dropped:0 overruns:2 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:108189637351 (100.7 GiB)  TX bytes:322025226252 (299.9 GiB)
          Interrupt:22 Base address:0xc00

eth1      Link encap:Ethernet  HWaddr 20:cf:30:c0:2d:dc 
          inet6 addr: fe80::22cf:30ff:fec0:2ddc/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:78631348 errors:0 dropped:0 overruns:0 frame:0
          TX packets:99548220 errors:0 dropped:46 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:52493321217 (48.8 GiB)  TX bytes:131227200728 (122.2 GiB)
          Interrupt:41 Base address:0x8000

he-ipv6   Link encap:IPv6-in-IPv4 
          inet6 addr: fe80::c2bb:9479/128 Scope:Link
          inet6 addr: 2001:470:1f14:1b1c::2/64 Scope:Global
          UP POINTOPOINT RUNNING NOARP  MTU:1430  Metric:1
          RX packets:42394 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25161 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:53417713 (50.9 MiB)  TX bytes:3677706 (3.5 MiB)

ifb0      Link encap:Ethernet  HWaddr 86:55:36:16:b0:76 
          inet6 addr: fe80::8455:36ff:fe16:b076/64 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:34939326 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34939326 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:13451269834 (12.5 GiB)  TX bytes:13451269834 (12.5 GiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:20772535 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20772535 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:530004831567 (493.6 GiB)  TX bytes:530004831567 (493.6 GiB)

ppp0      Link encap:Point-to-Point Protocol 
          inet addr:194.187.148.121  P-t-P:194.187.150.31  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1450  Metric:1
          RX packets:34939527 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45598385 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:13311727501 (12.3 GiB)  TX bytes:52679656787 (49.0 GiB)

tap0      Link encap:Ethernet  HWaddr 52:0d:3f:48:32:78 
          inet6 addr: fe80::500d:3fff:fe48:3278/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:990 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4728 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:83604 (81.6 KiB)  TX bytes:249303 (243.4 KiB)
Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: cholzhauer on June 22, 2011, 06:20:02 PM
Quote
i set prefix same as local ipv6 adress of br0 interface in same range i think

I'm sure the 6613: adddress you listed is not your routed /64.  look at your tunnel page, it will tell you.

If your MTU is 1450, you should change your RADVD config to match that
Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: sss123next on June 22, 2011, 06:21:34 PM
i will try, thx
Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: sss123next on June 22, 2011, 06:36:44 PM
i testing with netbook, and have following

~ # ping6 ipv6.he.net       
PING ipv6.he.net(ipv6.he.net) 56 data bytes
^C
--- ipv6.he.net ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4000ms

~ # traceroute6 ipv6.he.net
traceroute to ipv6.he.net (2001:470:0:64::2) from 2001:470:1f15:1b1c:223:8ff:fe7c:fdac, 30 hops max, 16 byte packets
1  * * *
2  *^C
~ # ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2001:470:1f15:1b1c:223:8ff:fe7c:fdac/64 scope global dynamic
       valid_lft 86294sec preferred_lft 14294sec
    inet6 6613:1::223:8ff:fe7c:fdac/64 scope global dynamic
       valid_lft 86399sec preferred_lft 14399sec
    inet6 fe80::223:8ff:fe7c:fdac/64 scope link
       valid_lft forever preferred_lft forever
~ # ip -6 route
2001:470:1f15:1b1c::/64 dev wlan0  proto kernel  metric 256  expires 86276sec mtu 1280
6613:1::/64 dev wlan0  proto kernel  metric 256  expires 86381sec mtu 1280
fe80::/64 dev wlan0  proto kernel  metric 256  mtu 1280
ff00::/8 dev wlan0  metric 256  mtu 1280
default via fe80::6c62:cfff:fe76:6990 dev wlan0  proto kernel  metric 1024  expires 894sec mtu 1280 hoplimit 64
default via fe80::22cf:30ff:fec0:2ddc dev wlan0  proto kernel  metric 1024  expires 789sec mtu 1280 hoplimit 64


on server

cat /etc/radvd.conf
interface br0
{
    AdvSendAdvert on;
    AdvLinkMTU 1450;
    MaxRtrAdvInterval 300;
    #prefix 6613:1:11:5:0:0:0:/64
    prefix 2001:470:1f15:1b1c::/64
    {
AdvOnLink on;
AdvAutonomous on;
    };
};

Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: sss123next on June 22, 2011, 06:47:27 PM
sorry, i forgot about one more router in middle between client and router with tunnel

i have something like this

router1 -- router2--client2
    |            |
    |            |
client1     client3

now i need to setup routing for client2 and client3 through router1 to internet via ipv6
Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: cholzhauer on June 22, 2011, 06:50:03 PM
you need to remove that 6613 address too
Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: sss123next on June 22, 2011, 06:58:47 PM
wait, looks like i have undestand it, i will reconfigure network on this machines and reply than.
Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: sss123next on June 23, 2011, 02:59:28 AM
i have reconfigured network but have no success, i have make bridge between all routers, and setup autoconfiguration on first, which jave ipv6 tunnel, clients receiving adress in same range as tunnel, but i can't do dataexchange via ipv6



ifconfig
br0       Link encap:Ethernet  HWaddr 32:2f:fe:9e:5d:ef 
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: 2001:470:1f15:1b1c:302f:feff:fe9e:5def/64 Scope:Global
          inet6 addr: fe80::302f:feff:fe9e:5def/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1144392 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2990169 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:444544970 (423.9 MiB)  TX bytes:4312405624 (4.0 GiB)


ping6 ipv6.google.com
PING ipv6.google.com(fx-in-x68.1e100.net) 56 data bytes
^C
--- ipv6.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms

sss@evil ~ % traceroute6 ipv6.google.com
traceroute to ipv6.l.google.com (2a00:1450:8007::68) from 2001:470:1f15:1b1c:302f:feff:fe9e:5def, 30 hops max, 24 byte packets
1  2001:470:1f15:1b1c:302f:feff:fe9e:5def (2001:470:1f15:1b1c:302f:feff:fe9e:5def)  3006.89 ms !H  3006.41 ms !H  3007.99 ms !H
Title: Re: IPv6 dhcp like autoconfiguration on router
Post by: sss123next on June 24, 2011, 10:01:27 PM
i have solved my problems, what i have done:
1. setup correct prefix in radvd
2. manually added ipv6 address on bridge interface on server