Reply
Regular Member
Posts: 320
Registered: ‎06-08-2013
Kudos: 159
Solutions: 16
Accepted Solution

High CPU usage when enabling IPv6

Hi Guys,

 

I've just enabled IPv6 over PPPoE on my ERL and (while it is working) I'm getting very high CPU usage, here's the output for top:

 

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 6543 root      20   0 13128 7272 3528 S  55.5  1.5   0:01.73 dhcpv6-pd-respo
 6561 root      20   0 11504 5616 3100 R  37.6  1.1   0:01.17 dhcpv6-pd-respo
 6566 root      20   0 10304 4492 2912 R  22.8  0.9   0:00.71 vyatta_gen_radv

 

The processes that seem to be eating it are /opt/vyatta/sbin/dhcpv6-pd-response.pl and one of these:

sudo /opt/vyatta/sbin/vyatta_gen_radvd.pl --generate-pd eth2 --type slaac
/usr/bin/perl /opt/vyatta/sbin/vyatta_gen_radvd.pl --generate-pd eth2 --type slaac

 

My IPv6 config is:

 ethernet eth0 {
     address 172.16.100.1/24
     duplex auto
     mtu 1508
     pppoe 0 {
         default-route auto
         dhcpv6-pd {
             pd 0 {
                 interface eth0 {
                 }
                 interface eth2 {
                     host-address ::dead:beef
                     prefix-id ::66
                     service slaac
                 }
                 prefix-length /56
             }
             rapid-commit enable
         }
         firewall {
             local {
                 name DirectToRouter
             }
         }
         ipv6 {
             address {
                 autoconf
             }
             dup-addr-detect-transmits 1
             enable {
             }
         }
         mtu 1500
         name-server auto
         password password
         traffic-policy {
             out OutgoingLink
         }
         user-id user@internet.com
     }
     speed auto
 }

Any ideas what's wrong?

 

Cheers,

 

Matt


Accepted Solutions
Highlighted
Regular Member
Posts: 320
Registered: ‎06-08-2013
Kudos: 159
Solutions: 16

Re: High CPU usage when enabling IPv6

Ok, I've found the problem. The ISP is responding to ia-na requests with an error and the DHCPv6 daemon is just constantly retrying.

 

The generated config is:

# This file was auto-generated by /opt/vyatta/sbin/dhcpv6-pd-client.pl
# configuration sub-system.  Do not edit it.

interface pppoe0 {
	send ia-na 0;
	request domain-name-servers, domain-name;
	send rapid-commit;
	send ia-pd 0;
	script "/opt/vyatta/sbin/ubnt-dhcp6c-script";
};

id-assoc na 0 {};

id-assoc pd 0 {
	prefix ::/56 infinity;
	prefix-interface eth2 {
		sla-id 102;
		sla-len 8;
		ifid 3735928559;
	};
};

 The problem is the existance of the empty na section. I've edited my code to this and it's all fine now:

# This file was auto-generated by /opt/vyatta/sbin/dhcpv6-pd-client.pl
# configuration sub-system.  Do not edit it.

interface pppoe0 {
	request domain-name-servers, domain-name;
	send rapid-commit;
	send ia-pd 0;
	script "/opt/vyatta/sbin/ubnt-dhcp6c-script";
};

id-assoc pd 0 {
	prefix ::/56 infinity;
	prefix-interface eth2 {
		sla-id 102;
		sla-len 8;
		ifid 3735928559;
	};
};

 

Are those na sections there for a reason? If not could they be removed?

If they are there for a reason, can we have a "set interface ethernet ethX pppoe X dhcpv6-pd no-na" option?

 

Cheers,

 

Matt

 

View solution in original post


All Replies
Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5429
Solutions: 1656
Contributions: 2

Re: High CPU usage when enabling IPv6

Yeah that does look like a bug with the PD scripts and we need to look into it. Thanks for reporting the issue.

Regular Member
Posts: 320
Registered: ‎06-08-2013
Kudos: 159
Solutions: 16

Re: High CPU usage when enabling IPv6

ok, let me know if you need more debugging info.
Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3092
Solutions: 945
Contributions: 16

Re: High CPU usage when enabling IPv6

Are you getting IPv6 addresses on your WAN and LANs?   That response script gets call every time it gets a response from the server.  One use reported getting non-stop responses.  So can you check if the pid is changing or if it's the same process stuck.  Also check if there's a file at "ls -l /tmp/junk".

EdgeMAX Router Software Development
Regular Member
Posts: 320
Registered: ‎06-08-2013
Kudos: 159
Solutions: 16

Re: High CPU usage when enabling IPv6

I've got IPv6 addresses on LAN and WAN (although my LAN ones seem a bit odd, my laptop hasn't yet picked one up but my server has 8), the pid is changing very frequently and there's no file at /tmp/junk

 

Matt 

Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3092
Solutions: 945
Contributions: 16

Re: High CPU usage when enabling IPv6


Mephi wrote:

I've got IPv6 addresses on LAN and WAN (although my LAN ones seem a bit odd, my laptop hasn't yet picked one up but my server has 8), the pid is changing very frequently and there's no file at /tmp/junk

 

Matt 


Ok, so for some reason your ISP keeps responding.  This could mean your ISP doesn't like something about your config.  Is there anything in "show dhcpv6-pd log".

EdgeMAX Router Software Development
Regular Member
Posts: 320
Registered: ‎06-08-2013
Kudos: 159
Solutions: 16

Re: High CPU usage when enabling IPv6

Yep the log contains thousands of:

Mar/17/2015 23:02:37: update_ia: status code for NA-0: no addresses
Mar/17/2015 23:02:37: client6_recvadvert: unexpected advertise

They happen every couple of seconds.

 

Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3092
Solutions: 945
Contributions: 16

Re: High CPU usage when enabling IPv6

You didn't post your whole config, so I can't see if your firewall is opening the right ports for dhcp.

EdgeMAX Router Software Development
Regular Member
Posts: 320
Registered: ‎06-08-2013
Kudos: 159
Solutions: 16

Re: High CPU usage when enabling IPv6

I haven't setup the v6 firewall yet, it's currently open... (Yeah, I know this is bad)

Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3092
Solutions: 945
Contributions: 16

Re: High CPU usage when enabling IPv6

Are you sure your ISP supports a /56 prefix?  I seen some dhcpv6-pd servers act eratic if you say request a /48 and they're only offerring a /60.  Comcast only seems to support /60 for residential service.

 

Another thing to try:

release dhcpv6-pd interface eth0

delete dhcpv6-pd duid 

renew dhcpv6-pd interface eth0

 

EdgeMAX Router Software Development
Regular Member
Posts: 320
Registered: ‎06-08-2013
Kudos: 159
Solutions: 16

Re: High CPU usage when enabling IPv6

I needed to do pppoe0 rather than eth0, but those commands didn't make any difference.

 

After running them, I've got the same IPv6 prefix (and I was told it would be /56, but I'll double check it)

 

Looking at a packet capture on my PPPoE interface (I can PM you a link to it if that'd help) I can see the router kicking off a DHCPv6-pd process, but the final Reply is coming back with a NoAddrAvail status code. 

Highlighted
Regular Member
Posts: 320
Registered: ‎06-08-2013
Kudos: 159
Solutions: 16

Re: High CPU usage when enabling IPv6

Ok, I've found the problem. The ISP is responding to ia-na requests with an error and the DHCPv6 daemon is just constantly retrying.

 

The generated config is:

# This file was auto-generated by /opt/vyatta/sbin/dhcpv6-pd-client.pl
# configuration sub-system.  Do not edit it.

interface pppoe0 {
	send ia-na 0;
	request domain-name-servers, domain-name;
	send rapid-commit;
	send ia-pd 0;
	script "/opt/vyatta/sbin/ubnt-dhcp6c-script";
};

id-assoc na 0 {};

id-assoc pd 0 {
	prefix ::/56 infinity;
	prefix-interface eth2 {
		sla-id 102;
		sla-len 8;
		ifid 3735928559;
	};
};

 The problem is the existance of the empty na section. I've edited my code to this and it's all fine now:

# This file was auto-generated by /opt/vyatta/sbin/dhcpv6-pd-client.pl
# configuration sub-system.  Do not edit it.

interface pppoe0 {
	request domain-name-servers, domain-name;
	send rapid-commit;
	send ia-pd 0;
	script "/opt/vyatta/sbin/ubnt-dhcp6c-script";
};

id-assoc pd 0 {
	prefix ::/56 infinity;
	prefix-interface eth2 {
		sla-id 102;
		sla-len 8;
		ifid 3735928559;
	};
};

 

Are those na sections there for a reason? If not could they be removed?

If they are there for a reason, can we have a "set interface ethernet ethX pppoe X dhcpv6-pd no-na" option?

 

Cheers,

 

Matt

 

Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3092
Solutions: 945
Contributions: 16

Re: High CPU usage when enabling IPv6

Actually just yesterday I added a "prefix-only" option that leave out the "send ia-na"..

EdgeMAX Router Software Development
Regular Member
Posts: 320
Registered: ‎06-08-2013
Kudos: 159
Solutions: 16

Re: High CPU usage when enabling IPv6

Wow, that's service :-)

Will it be in 1.7?

 

 

Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3092
Solutions: 945
Contributions: 16

Re: High CPU usage when enabling IPv6


Mephi wrote:

Wow, that's service :-)

Will it be in 1.7?

 

 


Yes, it's be in the next alpha/beta release after v1.7.0alpha2.

EdgeMAX Router Software Development
Reply