Hurricane Electric's IPv6 Tunnel Broker Forums

General IPv6 Topics => IPv6 on Linux & BSD & Mac => Topic started by: smith21 on October 10, 2011, 07:43:35 AM

Title: IPv6 stateless autoconfiguration
Post by: smith21 on October 10, 2011, 07:43:35 AM
hi guys, i get ipv6 run in my network, and now i want to implement stateless autoconfiguration,
may i ask ur kindness to help me with a complete tutorial?

regard
Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 10, 2011, 07:51:08 AM
What operating system? You need a system to do Router Advertisements
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 10, 2011, 07:56:51 AM
am running centos, yeah i need the configuration fro RADVD, i tried it but still failed!

interface eth0

{
        AdvSendAdvert on;
        prefix 2001:c08:3700:100::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
        };

};

i need the complete tutorial for the server as well for the client...
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 10, 2011, 07:33:33 PM
anyone?
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 10, 2011, 10:25:42 PM
i got one nice tutorial
http://mirrors.bieringer.de/Linux+IPv6-HOWTO/hints-daemons-radvd.html

is it possible to implement through wirelss? because it is written there that it is useful for LAN network? why? what are different between simple conf, special 6to4 conf and debugging? do i need to do some ip calculation for each client?

why it always used prefix /64 while i have two /48 and /64?



Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 11, 2011, 04:59:44 AM
Yes, you can use it for wireless too...you just need to change the interface that you're advertising.

You're not running 6to4 with HE, so I wouldn't worry about it

Use the debug setup if you're having issues with your setup

A /64 is the smallest range that most programs will accept, so that's what you're stuck using.  HE gives you a /48 so you can have 64k of /64's (this is needed if you have more than one subnet

You don't need to do any calculation..RA is done for you based off the MAC address of the network adapter.
Title: Re: IPv6 stateless autoconfiguration
Post by: Jim Whitby on October 11, 2011, 05:35:42 AM
Quote from: smith21 on October 10, 2011, 07:56:51 AM
am running centos, yeah i need the configuration fro RADVD, i tried it but still failed!

interface eth0

{
        AdvSendAdvert on;
        prefix 2001:c08:3700:100::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
        };

};

i need the complete tutorial for the server as well for the client...

How did it fail?
What is the output of radvdump?
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 11, 2011, 07:30:28 AM
suppose my net shud be this way:

#ifconfig
eth0   Link encap:Ethernet  HWaddr 00:26:18:EE:C6:4F
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:28 Base address:0xe000

eth1   Link encap:Ethernet  HWaddr 00:24:01:D2:2B:D1
          inet addr:202.47.88.XX  Bcast:202.47.88.79  Mask:255.255.255.240
          inet6 addr: fe80::224:1ff:fed2:2bd1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:311913 errors:0 dropped:0 overruns:0 frame:0
          TX packets:105610 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:102114023 (97.3 MiB)  TX bytes:13764699 (13.1 MiB)
          Interrupt:20 Base address:0x8c00

he-ipv6   Link encap:IPv6-in-IPv4
          inet6 addr: 2001:470:35:XXX::2/64 Scope:Global
          inet6 addr: fe80::ca2f:584c/128 Scope:Link
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:1410 dropped:0 overruns:0 carrier:1410
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

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:1593 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1593 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:224484 (219.2 KiB)  TX bytes:224484 (219.2 KiB)

sit0    Link encap:IPv6-in-IPv4
          inet6 addr: ::202.47.88.XX/96 Scope:Compat
          inet6 addr: ::127.0.0.1/96 Scope:Unknown
          UP RUNNING NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

sit1    Link encap:IPv6-in-IPv4
          inet6 addr: fe80::ca2f:5843/64 Scope:Link
          inet6 addr: 2001:470:35:XXX::2/64 Scope:Global
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:92 errors:0 dropped:0 overruns:0 frame:0
          TX packets:172 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:17746 (17.3 KiB)  TX bytes:125612 (122.6 KiB)

which interface that's advertising in the net? i still confused about eth0  and eth1
Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 11, 2011, 08:22:18 AM
It doesn't like you're using eth0 for anything

eth1 has traffic and a public IP address.

You'll want to assign a IPv6 address to this interface too
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 11, 2011, 10:03:25 AM
so u mean i shud use eth1?
Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 11, 2011, 10:05:27 AM
From what you've shown me, yes. 

It looks like there is a network cable plugged into that interface, but it doesn't look like any traffic is flowing in or out.
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 12, 2011, 11:05:41 PM
hi guys, i need ur help

i got prefix /64 and /48 from HE, but i used /64:
2001:470:xx:xxx::/64

radvd conf:
interface eth2 {
        AdvSendAdvert on;
        MinRtrAdvInterval 3;
        prefix 2001:470:xx:xxx::/64 {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
        };
};


now i've different ifonfig because i changed my NIC:
eth0      Link encap:Ethernet  HWaddr 00:26:18:EE:C6:4F 
          inet addr:202.47.88.67  Bcast:202.47.88.79  Mask:255.255.255.240
          inet6 addr: fe80::226:18ff:feee:c64f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:628364 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10502 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:67415880 (64.2 MiB)  TX bytes:2127919 (2.0 MiB)
          Interrupt:28 Base address:0xa000

eth2      Link encap:Ethernet  HWaddr 00:40:F4:EA:7D:DD 
          inet addr:172.27.11.66  Bcast:172.27.11.255  Mask:255.255.255.0
          inet6 addr: fe80::240:f4ff:feea:7ddd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:327438 errors:336305 dropped:292246 overruns:336305 frame:0
          TX packets:838 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:31261577 (29.8 MiB)  TX bytes:86715 (84.6 KiB)
          Interrupt:20 Base address:0x4c00

he-ipv6   Link encap:IPv6-in-IPv4 
          inet6 addr: fe80::ca2f:5843/128 Scope:Link
          inet6 addr: 2001:470:35:270::2/64 Scope:Global
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:459 errors:0 dropped:0 overruns:0 frame:0
          TX packets:589 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:394222 (384.9 KiB)  TX bytes:90240 (88.1 KiB)

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:145 errors:0 dropped:0 overruns:0 frame:0
          TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:14879 (14.5 KiB)  TX bytes:14879 (14.5 KiB)



my client ifconfig:
eth0      Link encap:Ethernet  HWaddr 00:e0:4c:87:0f:8e 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:29 address 0x2000

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:1568 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1568 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:720 (720.0 B)  TX bytes:720 (720.0 B)

wlan0     Link encap:Ethernet  HWaddr 48:5d:60:53:2f:6b 
          inet addr:172.27.11.111  Bcast:172.27.11.255  Mask:255.255.255.0
          inet6 addr: fe80::4a5d:60ff:fe53:2f6b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:268742 errors:0 dropped:0 overruns:0 frame:0
          TX packets:170810 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:345570258 (345.5 MB)  TX bytes:19965989 (19.9 MB


and i try to connect them manually through eth2 setting.

successfully connect to client:
ping 172.27.11.111
PING 172.27.11.111 (172.27.11.111) 56(84) bytes of data.
64 bytes from 172.27.11.111: icmp_seq=1 ttl=64 time=13.9 ms
64 bytes from172.27.11.111: icmp_seq=2 ttl=64 time=1.93 ms
64 bytes from 172.27.11.111: icmp_seq=3 ttl=64 time=2.55 ms
^C
--- 172.27.11.111 ping statistics ---


radvdump:
[root@ip6 ~]# radvdump


^C

*doent give any response

and the client cant connect to the ipv6 yet? what shud i do?
is the connection between server and client false? thank u
Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 13, 2011, 04:07:29 AM
X'ing out IP addresses makes it hard to help

You need to assigna IPv6 address to every interface that you want to route/pass IPv6 traffic.  If those interfaces are in different subnets, assign a /64 from your /48 to each subnet
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 13, 2011, 04:51:01 AM
how to assign it?can u show me the way? i dont really know how to do that?
Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 13, 2011, 04:51:51 AM
http://www.cyberciti.biz/faq/rhel-redhat-fedora-centos-ipv6-network-configuration/
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 13, 2011, 05:20:33 AM
so u mean to conf each computer one by one without making one computer as a router for each clients through stateless conf?
Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 13, 2011, 05:34:46 AM
You can either statically assign the addresses or assign via RA

I don't know what you topology is, but if you have something like

internet --- router --- client

you need to put the tunnel ::2 address on the outside interface of the router (and I think you already have) then assign an address from your routed /64 to the inside interface of your router (say its 2001:db8:12:1) then assign another address out of that same subnet to the client behind the router (say 2001:db8:12::2
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 13, 2011, 07:09:52 AM
yes, that my topology is.

Quoteyou need to put the tunnel ::2 address on the outside interface of the router (and I think you already have)

is this what u mean?

modprobe ipv6
ip tunnel add he-ipv6 mode sit remote 216.218.221.42 local 202.47.88.67 ttl 255
ip link set he-ipv6 up
ip addr add 2001:470:35:270::2/64 dev he-ipv6
ip route add ::/0 dev he-ipv6
ip -f inet6 addr

what do u mean by inside and outside interface?
Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 13, 2011, 07:25:09 AM
the outside interface is what connects to the Internet...inside interface is the interface that connects to the rest of your network
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 14, 2011, 06:05:30 AM
in this case eth0 is the outside interface and eth2 is the inside interface?

so let say i've to conf eth0:
etc/sysconfig/network-scripts/init.ipv6-global
#server interface configuration
auto eth0
iface eth0 inet6 static
        address 2001:470:36:270::1
        netmask 64

*is it how to conf server?
and for client is wlan0 or what and how to conf it?
Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 14, 2011, 06:09:00 AM
Quote
in this case eth0 is the outside interface and eth2 is the inside interface?

I don't know...it depends on how you have your site configured.  If eth0 connects you to the internet, then yes, it's your outside address.

You can configure wlan0 the same way.  If wlan0 is in the same subnet as eth2, use an address  out of the same /64 for both of them.  If wlan0  is in a different network, you'll have to request the /48 from HE and use an separate /64 from that.
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 17, 2011, 08:47:32 PM
hi, i conf the server eth0 (as i showed u my ifconfig, eth0 is the out interface)

eth0      Link encap:Ethernet  HWaddr 00:26:18:EE:C6:4F 
          inet addr:202.47.88.67  Bcast:202.47.88.79  Mask:255.255.255.240
          inet6 addr: fe80::226:18ff:feee:c64f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2638691 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26406 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:247245133 (235.7 MiB)  TX bytes:3949177 (3.7 MiB)
          Interrupt:28 Base address:0xa000

eth2      Link encap:Ethernet  HWaddr 00:40:F4:EA:7D:DD 
          inet addr:172.27.11.66  Bcast:172.27.11.255  Mask:255.255.255.0
          inet6 addr: fe80::240:f4ff:feea:7ddd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1954651 errors:568303 dropped:661603 overruns:568303 frame:0
          TX packets:2735 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:177805561 (169.5 MiB)  TX bytes:245523 (239.7 KiB)
          Interrupt:20 Base address:0x4c00

he-ipv6   Link encap:IPv6-in-IPv4 
          inet6 addr: fe80::ca2f:5843/128 Scope:Link
          inet6 addr: 2001:470:35:270::2/64 Scope:Global
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:774 errors:0 dropped:0 overruns:0 frame:0
          TX packets:904 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:426982 (416.9 KiB)  TX bytes:123000 (120.1 KiB)

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:413 errors:0 dropped:0 overruns:0 frame:0
          TX packets:413 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:47135 (46.0 KiB)  TX bytes:47135 (46.0 KiB)

[root@ip6 etc]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:26:18:EE:C6:4F 
          inet addr:202.47.88.67  Bcast:202.47.88.79  Mask:255.255.255.240
          inet6 addr: fe80::226:18ff:feee:c64f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2641751 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26430 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:247514388 (236.0 MiB)  TX bytes:3953637 (3.7 MiB)
          Interrupt:28 Base address:0xa000

eth2      Link encap:Ethernet  HWaddr 00:40:F4:EA:7D:DD 
          inet addr:172.27.11.66  Bcast:172.27.11.255  Mask:255.255.255.0
          inet6 addr: fe80::240:f4ff:feea:7ddd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1957685 errors:568303 dropped:661603 overruns:568303 frame:0
          TX packets:2749 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:178072540 (169.8 MiB)  TX bytes:246697 (240.9 KiB)
          Interrupt:20 Base address:0x4c00

he-ipv6   Link encap:IPv6-in-IPv4 
          inet6 addr: fe80::ca2f:5843/128 Scope:Link
          inet6 addr: 2001:470:35:270::2/64 Scope:Global
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:774 errors:0 dropped:0 overruns:0 frame:0
          TX packets:904 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:426982 (416.9 KiB)  TX bytes:123000 (120.1 KiB)

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:413 errors:0 dropped:0 overruns:0 frame:0
          TX packets:413 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:47135 (46.0 KiB)  TX bytes:47135 (46.0 KiB)

eth0 conf:
auto eth0
iface eth0 inet6 static
        address 2001:470:36:270::1
        netmask 64

and in the client ifconfig
eth0      Link encap:Ethernet  HWaddr 00:e0:4c:87:0f:8e 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:29

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:286 errors:0 dropped:0 overruns:0 frame:0
          TX packets:286 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:33648 (33.6 KB)  TX bytes:33648 (33.6 KB)

wlan0     Link encap:Ethernet  HWaddr 48:5d:60:53:2f:6b 
          inet addr:172.27.11.238  Bcast:172.27.11.255  Mask:255.255.255.0
          inet6 addr: fe80::4a5d:60ff:fe53:2f6b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:297578 errors:0 dropped:0 overruns:0 frame:0
          TX packets:135554 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:356938043 (356.9 MB)  TX bytes:12017672 (12.0 MB)

so i conf wlan0:
auto wlan0
iface wlan0 inet6 static
        address 2001:470:ec64::2
        netmask 48

and conf radvdump for the server:
interface eth0 {
        AdvSendAdvert on;
        MinRtrAdvInterval 3;
        prefix 2001:470:36:270::/64 {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
        };
};

and try a program to call radvdump

[root@ip6 ~]# radvdump

^C

still give the same error... :-(
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 17, 2011, 10:16:43 PM
now, the client get ip add from server, but i dont what exactly it is

ipv6@ipv6-laptop:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:e0:4c:87:0f:8e 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:29

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:319 errors:0 dropped:0 overruns:0 frame:0
          TX packets:319 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:36224 (36.2 KB)  TX bytes:36224 (36.2 KB)

wlan0     Link encap:Ethernet  HWaddr 48:5d:60:53:2f:6b 
          inet addr:172.27.11.238  Bcast:172.27.11.255  Mask:255.255.255.0
          inet6 addr: 2001:470:36:270:4a5d:60ff:fe53:2f6b/64 Scope:Global
          inet6 addr: fe80::4a5d:60ff:fe53:2f6b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:734174 errors:0 dropped:0 overruns:0 frame:0
          TX packets:264811 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:688070763 (688.0 MB)  TX bytes:24831803 (24.8 MB)
Title: Re: IPv6 stateless autoconfiguration
Post by: k1mu on October 18, 2011, 04:17:38 AM
Quote from: smith21 on October 17, 2011, 10:16:43 PM
now, the client get ip add from server, but i dont what exactly it is
For this interface?
Quote
wlan0     Link encap:Ethernet  HWaddr 48:5d:60:53:2f:6b 
          inet6 addr: 2001:470:36:270:4a5d:60ff:fe53:2f6b/64 Scope:Global

It's getting 200:470:36:270::/64 as the prefix from your radvd.conf
Quote

interface eth0 {
        AdvSendAdvert on;
        MinRtrAdvInterval 3;
        prefix 2001:470:36:270::/64 {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
        };
};

If your routable /64 isn't 2001:470:36:270, then you'll need to fix your radvd.conf and restart radvd.

If you're wondering where the rest of the stateless address comes from, it's the MAC address of the interface converted to EUI-64.
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 18, 2011, 05:35:07 AM
QuoteIf your routable /64 isn't 2001:470:36:270, then you'll need to fix your radvd.conf and restart radvd.

what did u mean, doesn't it need to put the prefix that i got from HE 2001:470:36:270/64??
Title: Re: IPv6 stateless autoconfiguration
Post by: k1mu on October 19, 2011, 11:24:50 AM
Quote from: smith21 on October 18, 2011, 05:35:07 AM
what did u mean, doesn't it need to put the prefix that i got from HE 2001:470:36:270/64??

There are TWO networks involved. One is the tunnel between you and Hurricane Electric.
Your configuration details seem to imply that the tunnel uses 2001:470:36:270::/64, which is what you're telling RADVD to advertise to your LAN. Since that's not your network, that's not going to work. That network is only used with the connection between your endpoint and the servers at HE.

In addition to the tunnel /64, HE provides you with a routed /64 or a routed /48. That is the network that RA should be advertising to your LAN. Basically, HE sets up routing for IPv6 to send any traffic to that network prefix towards your server, which then routes the traffic onto your internal LAN.
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 21, 2011, 02:52:02 AM
this is my tunnel details:


Server IPv4 Address:216.218.221.42
Server IPv6 Address:2001:470:35:270::1/64
Client IPv4 Address:202.47.88.67
Client IPv6 Address:2001:470:35:270::2/6

Routed IPv6 Prefixes
Routed /64:2001:470:36:270::/64
Routed /48:2001:470:ec64::/48


The network which is only used with the connection between your endpoint and the servers at HE.
The conf are:

modprobe ipv6
ip tunnel add he-ipv6 mode sit remote 216.218.221.42 local 202.47.88.67 ttl 255
ip link set he-ipv6 up
ip addr add 2001:470:35:270::2/64 dev he-ipv6
ip route add ::/0 dev he-ipv6
ip -f inet6 addr


so,now i wanna make it as router that can connect multiple clients through wireless because as discussed here before that is also able to connect thru wireless (not only LAN) by using radvd.conf
radvd.conf:


interface eth0 {
        AdvSendAdvert on;
        MinRtrAdvInterval 3;
        prefix 2001:470:36:270::/64 {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
        };
};



and the router and client are in different network, so as suggested by mr.cholzhauer i shud use prefix /48 for client interface:

auto wlan0
iface wlan0 inet6 static
        address 2001:470:ec64::2
        netmask 4


for the router:

auto eth0
iface eth0 inet6 static
        address 2001:470:36:270::1
        netmask 64


#radvdump

^C
*error

and the client still cant connect to ipv6 site
client ifconfig:

ipv6@ipv6-laptop:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:e0:4c:87:0f:8e
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:29

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:319 errors:0 dropped:0 overruns:0 frame:0
          TX packets:319 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:36224 (36.2 KB)  TX bytes:36224 (36.2 KB)

wlan0     Link encap:Ethernet  HWaddr 48:5d:60:53:2f:6b
          inet addr:172.27.11.238  Bcast:172.27.11.255  Mask:255.255.255.0
          inet6 addr: [b]2001:470:36:270[/b]:4a5d:60ff:fe53:2f6b/64 Scope:Global
          inet6 addr: fe80::4a5d:60ff:fe53:2f6b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:734174 errors:0 dropped:0 overruns:0 frame:0
          TX packets:264811 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:688070763 (688.0 MB)  TX bytes:24831803 (24.8 MB)

router ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:26:18:EE:C6:4F
          inet addr:202.47.88.67  Bcast:202.47.88.79  Mask:255.255.255.240
          inet6 addr: fe80::226:18ff:feee:c64f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2638691 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26406 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:247245133 (235.7 MiB)  TX bytes:3949177 (3.7 MiB)
          Interrupt:28 Base address:0xa000

eth2      Link encap:Ethernet  HWaddr 00:40:F4:EA:7D:DD
          inet addr:172.27.11.66  Bcast:172.27.11.255  Mask:255.255.255.0
          inet6 addr: fe80::240:f4ff:feea:7ddd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1954651 errors:568303 dropped:661603 overruns:568303 frame:0
          TX packets:2735 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:177805561 (169.5 MiB)  TX bytes:245523 (239.7 KiB)
          Interrupt:20 Base address:0x4c00

he-ipv6   Link encap:IPv6-in-IPv4
          inet6 addr: fe80::ca2f:5843/128 Scope:Link
          inet6 addr: [b]2001:470:35:270::2/64 [/b]Scope:Global
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:774 errors:0 dropped:0 overruns:0 frame:0
          TX packets:904 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:426982 (416.9 KiB)  TX bytes:123000 (120.1 KiB)

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:413 errors:0 dropped:0 overruns:0 frame:0
          TX packets:413 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:47135 (46.0 KiB)  TX bytes:47135 (46.0 KiB)

i applied all ways those are discussed on this topic, shud revies from the prev discussion

regards
:)
Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 21, 2011, 03:59:20 AM
It looks like your hosts are getting an address...that's good.

First, I wouldn't bother using the 2001:470:36:270::/64 for anything...you have 64k worth of /64's in your /48, so I don't think you're going to run out

Second, you need to have a route for that /48 on your router. 
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 21, 2011, 04:12:47 AM
so i also need to assign /48 besides /64 in the router? is it something look like this code?


auto eth0
iface eth0 inet6 static
        address 2001:470:36:270::1
        netmask 64
        address 2001:470:ec64::1
        netmask 48

Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 21, 2011, 04:26:23 AM
No...the only place your /48 goes is in your routing table.  Look at "netstat -nr" to see the current one
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 23, 2011, 07:17:40 PM
this is my routing table:


[root@ip6 ~]# netstat -nr
Kernel IP routing table
Destination      Gateway                Genmask                Flags    MSS Window  irtt Iface
202.47.88.64    0.0.0.0                   255.255.255.240        U           0 0              0 eth0
172.27.11.0      0.0.0.0                   255.255.255.0            U           0 0              0 eth2
0.0.0.0              202.47.88.65         0.0.0.0                        UG         0 0              0 eth0


so, how i do create a route for that /48 on my routing table?

Title: Re: IPv6 stateless autoconfiguration
Post by: cholzhauer on October 24, 2011, 05:55:54 AM
I went and looked for a network diagram, but didn't see one

You just need to route it to the next hop...For example, I route my /48 from my tunnel server to my firewall (so my tunnel server knows where to send it)
Title: Re: IPv6 stateless autoconfiguration
Post by: smith21 on October 24, 2011, 07:15:18 AM
can u show how to do it?