Configuring native IPv6 - Issues with radvd

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
2wheelsyyz
DD-WRT Novice


Joined: 02 Jun 2015
Posts: 5

PostPosted: Tue Aug 25, 2015 11:56    Post subject: Configuring native IPv6 - Issues with radvd Reply with quote
I have been trying to configure IPv6 on my router for quite some time without success. I have been able to do this on K3.0 in the past but it is really slow on my e4200 so I need to stick with K2.6.

Hopefully someone can shed some light or assist with this one.

Router: Linksys e4200
Firmware: dd-wrt.v24-27745_NEWD-2_K2.6_mega-nv60k.bin
Kernel: Linux DD-WRT 2.6.24.111 #26697 Tue Aug 25 01:12:51 CEST 2015 mips GNU/Linux

radvd fails to start properly and returns an error. Tried restarting it manually without success. Using the default configuration for radvd with a prefix 64. The configuration seems to get updated properly with my DNS information obtained from DHCP.

Code:
root@DD-WRT:/# cat /tmp/radvd.conf
interface br0
{
 IgnoreIfMissing on;
 AdvSendAdvert on;
 MinRtrAdvInterval 3;
 MaxRtrAdvInterval 10;
 AdvHomeAgentFlag off;
 AdvManagedFlag off;
 AdvOtherConfigFlag on;
 AdvLinkMTU 1480;
 prefix ::/64
 {
  AdvOnLink on;
  AdvAutonomous on;
 };
 RDNSS 2607:f798:18:10:0:640:7125:5204 2607:f798:18:10:0:640:7125:5198 {};
};


Interface br0 has a proper IPv6 address but it doesn't get advertised
Code:
root@DD-WRT:/# ifconfig br0
br0       Link encap:Ethernet  HWaddr 58:6D:8F:1D:FC:A7
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: 2607:fea8:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX/64 Scope:Global
          inet6 addr: fe80::5a6d:8fff:fe1d:fca7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1438 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1102 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:253231 (247.2 KiB)  TX bytes:571530 (558.1 KiB)


Interface vlan2 doesn't have an IPv6 (I think it should)
Code:
root@DD-WRT:/# ifconfig vlan2
vlan2     Link encap:Ethernet  HWaddr 58:6D:8F:1D:FC:A8
          inet addr:XXX.XXX.XXX.XXX  Bcast:XXX.XXX.XXX.XXX  Mask:255.255.254.0
          inet6 addr: fe80::5a6d:8fff:fe1d:fca8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1404 errors:0 dropped:0 overruns:0 frame:0
          TX packets:914 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:903148 (881.9 KiB)  TX bytes:207829 (202.9 KiB)


These are the relevant radvd logs
Code:
root@DD-WRT:/# cat /var/log/messages | grep radvd
Dec 31 19:00:08 DD-WRT daemon.info radvd[929]: version 2.10 started
Dec 31 19:00:08 DD-WRT daemon.err radvd[929]: getifaddrs failed: Invalid argument
Dec 31 19:00:08 DD-WRT daemon.warn radvd[929]: no auto-selected prefix on interface br0, disabling advertisements
Dec 31 19:00:08 DD-WRT daemon.err radvd[941]: getifaddrs failed on br0: Invalid argument
Dec 31 19:00:08 DD-WRT daemon.err radvd[941]: Unable to setsockopt NETLINK_NO_ENOBUFS: Protocol not available
Dec 31 19:00:08 DD-WRT user.info syslog: radvd : RADVD daemon successfully started
Dec 31 19:00:10 DD-WRT daemon.err radvd[941]: getifaddrs failed on br0: Invalid argument
Dec 31 19:00:15 DD-WRT user.info syslog: radvd : RADV daemon successfully stopped
Dec 31 19:00:15 DD-WRT daemon.info radvd[941]: sending stop adverts
Dec 31 19:00:15 DD-WRT daemon.info radvd[941]: removing /var/run/radvd.pid
Dec 31 19:00:15 DD-WRT daemon.info radvd[941]: returning from radvd main
Dec 31 19:00:16 DD-WRT daemon.info radvd[1383]: version 2.10 started
Dec 31 19:00:16 DD-WRT daemon.err radvd[1383]: getifaddrs failed: Invalid argument
Dec 31 19:00:16 DD-WRT daemon.warn radvd[1383]: no auto-selected prefix on interface br0, disabling advertisements
Dec 31 19:00:16 DD-WRT daemon.err radvd[1384]: getifaddrs failed on br0: Invalid argument
Dec 31 19:00:16 DD-WRT daemon.err radvd[1384]: Unable to setsockopt NETLINK_NO_ENOBUFS: Protocol not available
Dec 31 19:00:16 DD-WRT user.info syslog: radvd : RADVD daemon successfully started
Aug 25 07:48:21 DD-WRT daemon.err radvd[1384]: getifaddrs failed on br0: Invalid argument


Also, I do receive RA on vlan 2 (at least I think based on this)

Code:
root@DD-WRT:/# radvdump
#
# radvd configuration generated by radvdump 2.10
# based on Router Advertisement from fe80::212:43ff:fea9:89e5
# received by interface vlan2
#

interface vlan2
{
   AdvSendAdvert on;
   # Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump
   AdvManagedFlag on;
   AdvOtherConfigFlag on;
   AdvReachableTime 600000;
   AdvRetransTimer 0;
   AdvCurHopLimit 64;
   AdvDefaultLifetime 9000;
   AdvHomeAgentFlag off;
   AdvDefaultPreference high;
   AdvSourceLLAddress on;
   AdvLinkMTU 1500;
}; # End of interface definition
Sponsor
2wheelsyyz
DD-WRT Novice


Joined: 02 Jun 2015
Posts: 5

PostPosted: Wed Aug 26, 2015 11:10    Post subject: Reply with quote
I got my IA_NA prefix (on vlan2) by modifying the dhcp6c.conf file (adding "send ia-na 0;":

Code:
root@DD-WRT:/tmp# cat dhcp6c.conf
interface vlan2 {
 send ia-pd 0;
 send ia-na 0;
 send rapid-commit;
 request domain-name-servers;
 script "/sbin/dhcp6c-state";
};
id-assoc pd 0 {
 prefix-interface br0 {
  sla-id 0;
  sla-len 0;
 };
};
id-assoc na 0 { };


Code:
root@DD-WRT:/tmp# ifconfig vlan2
vlan2     Link encap:Ethernet  HWaddr 58:6D:8F:1D:FC:A8
          inet addr:99.234.22.8  Bcast:99.234.23.255  Mask:255.255.254.0
          inet6 addr: 2607:f798:804:e9:6cf5:dbec:a9c6:3e5b/128 Scope:Global
          inet6 addr: fe80::5a6d:8fff:fe1d:fca8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2469747 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1565307 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2003422706 (1.8 GiB)  TX bytes:220134126 (209.9 MiB)


But I still have an issue with radvd on bra

Aug 26 07:01:21 DD-WRT daemon.err radvd[6816]: getifaddrs failed on br0: Invalid argument
Aug 26 07:01:21 DD-WRT daemon.warn radvd[6816]: br0 received RS or RA on br0 but br0 is not ready and setup_iface failed
2wheelsyyz
DD-WRT Novice


Joined: 02 Jun 2015
Posts: 5

PostPosted: Thu Aug 27, 2015 14:07    Post subject: Reply with quote
Not sure what else to do with this.... I found exactly where in the code the error is thrown but being no developer, not sure how to fix this:

http://svn.dd-wrt.com/browser/src/router/radvd/device-common.c

Code:
/*
 * Saves the first link local address seen on the specified interface to iface->if_addr
 *
 */
int setup_linklocal_addr(struct Interface *iface)
{
   struct ifaddrs *addresses = 0;

   if (getifaddrs(&addresses) != 0) {
      flog(LOG_ERR, "getifaddrs failed on %s: %s", iface->props.name, strerror(errno));
   } else {
      [...]


Is there a different structure for getifaddrs when used on K2.6 (not working) and K3.0 (working)?
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum