Modify

Opened 2 years ago

Last modified 2 years ago

#20484 reopened defect

setting PPPoE as connection method for 'wan' should set interface for 'wan6' too

Reported by: anonymous Owned by:
Priority: high Milestone:
Component: luci Version: Trunk
Keywords: dhcpv6, ipv6 Cc:

Description

i upgraded to CC 15.05 today and i found out that if i set the wan interface to PPPoE mode then IPv6 seems broken and i won't get any error messages in the log about why...

i removed "option src_port 547 " from the firewall config... that did not help... until i figured that the router was not trying to use the PPPoE connection for IPv6...

my provider serves dual stack IPv4 and IPv6 via the same PPPoE connection and when i switched the wan interface to PPPoE mode the router didn't even bother to suggest/ask that i should use it for wan6 too... and did not even include the wan(pppoe) interface in the list of available adapters...all the IPv6 connectivity was dead...

fortunately i had some old saved tar.gz configuration files around and i figured i had to manually change the wan6 configuration in the /etc/config/network

this is working for IPv6 via the PPPoE connection established by the main wan:

config interface 'wan6'
        option ifname '@wan'
        option _orig_ifname '@wan'
        option _orig_bridge 'false'
        option proto 'dhcpv6'
        option reqprefix 'auto'
        option reqaddress 'try'

(before tweaking it, it was trying to use eth0 instead of the @wan pppoe connection)

please tweak the interface logic so that when pppoe is selected for wan the router should ask if it should also use the same connection for wan6

Attachments (0)

Change History (13)

comment:1 Changed 2 years ago by jow

  • Resolution set to worksforme
  • Status changed from new to closed

The working config you quoted actually is the default setting. The wan6 network usually uses the symbolic "@wan" ifname notation by default so that it does not matter whether wan is called eth0, pppoe-wan etc.

comment:2 Changed 2 years ago by cyrus

  • Resolution worksforme deleted
  • Status changed from closed to reopened

The config above was the default in BB and is not the default in CC, however the ppp-interface will automatically fire up an IPv6 subinterface. Please post your ppp config section so we can see what is wrong.

comment:3 Changed 2 years ago by anonymous

it's a normal pppoe config.. used to work fine on rc3 (i kept the config files from rc2 there though.. only fixed the opkg.conf paths for rc3)

now that CC...15.05 is final i used a clean firmware install and reconfigured the router from scratch without keeping any old config files.

system type : Qualcomm Atheros QCA9558 ver 1 rev 0
machine : TP-LINK TL-WR1043ND v2

and /etc/config/network looks quite normal after changing wan6 ... i use 192.168.0.1 instead of the default 192.168.1.1 router address. Since opening the ticket i changed reqaddress from "try" to "force"...i want to see if it works better this way.

Also, i assigned the wireless to be on a separate subnet than the wired network, and added firewall rules to block traffic from wireless to the internal network. The wireless subnet is ipv4-only (i disabled ipv6 on wireless).

config interface 'lan'

option ifname 'eth1'
option force_link '1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option stp '1'
option ipaddr '192.168.0.1'
option ip6assign '64'

config interface 'wan'

option ifname 'eth0'
option _orig_ifname 'eth0'
option _orig_bridge 'false'
option proto 'pppoe'
option username '----pppoe username-here---'
option password '----my-pppoe-passwd----'
option ipv6 '1'
option peerdns '0'
option dns '213.154.124.1 193.231.252.1 8.8.8.8 8.8.4.4'

config interface 'wan6'

option ifname '@wan'
option _orig_ifname '@wan'
option _orig_bridge 'false'
option proto 'dhcpv6'
option reqprefix 'auto'
option reqaddress 'force'

config interface 'WiFiNet'

option _orig_ifname 'radio0.network1'
option _orig_bridge 'false'
option proto 'static'
option ipaddr '192.168.150.1'
option netmask '255.255.255.0'
option delegate '0'

comment:4 follow-up: Changed 2 years ago by cyrus

  • Resolution set to worksforme
  • Status changed from reopened to closed

Either remove the "option ipv6 1" stanca or use "option ipv6 auto" then the entire wan6 section is redundant. This is the new "magic" in CC.

If you keep option ipv6 at any other value (e.g. 1 as in your example) you need to manually provide the the dhcpv6-section with ifname @wan.

So summarizing for CC:

option ipv6 empty / unset => IPv6 will be provided and the proto=dhcpv6 section is not needed since its automatically created internally.

option ipv6 auto => see above

option ipv6 0 => disable IPv6 entirely for this PPP connection

option ipv6 1 => only provide link-layer IPv6 (as in BB), you need to manually add the proto=dhcpv6 section in order to have IPv6 on layer 3.

Last edited 2 years ago by cyrus (previous) (diff)

comment:5 Changed 2 years ago by anonymous

  • Resolution worksforme deleted
  • Status changed from closed to reopened

the new CC IPv6 "magic" must be broken then... it's not working for me...

i deleted the wan6 section completely and reconfigured wan to look as you suggested:

config interface 'wan'
        option ifname 'eth0'
        option _orig_ifname 'eth0'
        option _orig_bridge 'false'
        option proto 'pppoe'
        option username '---my-username----'
        option password '---my-password----'
        option peerdns '0'
        option dns '213.154.124.1 193.231.252.1 8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844'
        option ipv6 'auto'

Our provider here, RCS-RDS, uses dual-stack IPv4 + IPv6 with DHCPv6 with prefix delegation..

the new CC "magic" probably only works with IPv6 addresses assigned statically when the PPPoE connection is set up... because in my case the router won't even bother to ask for an IPv6 address via DHCPv6 after the PPPoE connection is established...

Tue Sep 15 17:05:42 2015 kern.info kernel: [  141.970000] eth0: link up (1000Mbps/Full duplex)
Tue Sep 15 17:05:42 2015 kern.info kernel: [  141.970000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Tue Sep 15 17:05:42 2015 daemon.notice netifd: Network device 'eth0' link is up
Tue Sep 15 17:05:42 2015 daemon.notice netifd: Interface 'wan' has link connectivity 
Tue Sep 15 17:05:42 2015 daemon.notice netifd: Interface 'wan' is setting up now
Tue Sep 15 17:05:42 2015 daemon.info pppd[1495]: Plugin rp-pppoe.so loaded.
Tue Sep 15 17:05:42 2015 daemon.info pppd[1495]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.7
Tue Sep 15 17:05:42 2015 daemon.notice pppd[1495]: pppd 2.4.7 started by root, uid 0
Tue Sep 15 17:05:43 2015 daemon.info pppd[1495]: PPP session is 900
Tue Sep 15 17:05:43 2015 daemon.warn pppd[1495]: Connected to ____REMOVED_____ via interface eth0
Tue Sep 15 17:05:43 2015 daemon.info pppd[1495]: Using interface pppoe-wan
Tue Sep 15 17:05:43 2015 daemon.notice pppd[1495]: Connect: pppoe-wan <--> eth0
Tue Sep 15 17:05:43 2015 kern.info kernel: [  142.860000] pppoe-wan: renamed from ppp0
Tue Sep 15 17:05:46 2015 daemon.notice pppd[1495]: PAP authentication succeeded
Tue Sep 15 17:05:46 2015 daemon.notice pppd[1495]: peer from calling number ____REMOVED_____ authorized
Tue Sep 15 17:05:46 2015 daemon.notice pppd[1495]: local  IP address 5.14.____REMOVED_____
Tue Sep 15 17:05:46 2015 daemon.notice pppd[1495]: remote IP address 10.0.0.1
Tue Sep 15 17:05:46 2015 daemon.notice pppd[1495]: primary   DNS address 193.231.252.1
Tue Sep 15 17:05:46 2015 daemon.notice pppd[1495]: secondary DNS address 213.154.124.1
Tue Sep 15 17:05:46 2015 daemon.notice pppd[1495]: local  LL address fe80::0000:0000:____REMOVED_____
Tue Sep 15 17:05:46 2015 daemon.notice pppd[1495]: remote LL address fe80::0000:0000:0000:0001
Tue Sep 15 17:05:46 2015 daemon.notice netifd: Network device 'pppoe-wan' link is up
Tue Sep 15 17:05:46 2015 daemon.notice netifd: Interface 'wan' is now up
Tue Sep 15 17:05:46 2015 daemon.info dnsmasq[1209]: reading /tmp/resolv.conf.auto
Tue Sep 15 17:05:46 2015 daemon.info dnsmasq[1209]: using local addresses only for domain lan
Tue Sep 15 17:05:46 2015 daemon.info dnsmasq[1209]: using nameserver 213.154.124.1#53
Tue Sep 15 17:05:46 2015 daemon.info dnsmasq[1209]: using nameserver 193.231.252.1#53
Tue Sep 15 17:05:46 2015 daemon.info dnsmasq[1209]: using nameserver 8.8.8.8#53
Tue Sep 15 17:05:46 2015 daemon.info dnsmasq[1209]: using nameserver 8.8.4.4#53
Tue Sep 15 17:05:46 2015 daemon.info dnsmasq[1209]: using nameserver 2001:4860:4860::8888#53
Tue Sep 15 17:05:46 2015 daemon.info dnsmasq[1209]: using nameserver 2001:4860:4860::8844#53
Tue Sep 15 17:05:46 2015 user.notice firewall: Reloading firewall due to ifup of wan (pppoe-wan)

comment:6 Changed 2 years ago by anonymous

i went back to the old split-style config with wan + wan6 (@wan) and IPv6 is working again...

something weird is going on there... but as long as IPv6 works this way i think i can ignore the new CC "magic".

comment:7 Changed 2 years ago by cyrus

  • Resolution set to fixed
  • Status changed from reopened to closed

Seems the new magic wasn't 100% reliable, r46943 (and r46942) should address it.

comment:8 in reply to: ↑ 4 Changed 2 years ago by xavier@…

Replying to cyrus:

Either remove the "option ipv6 1" stanca or use "option ipv6 auto" then the entire wan6 section is redundant. This is the new "magic" in CC.

If you keep option ipv6 at any other value (e.g. 1 as in your example) you need to manually provide the the dhcpv6-section with ifname @wan.

So summarizing for CC:

option ipv6 empty / unset => IPv6 will be provided and the proto=dhcpv6 section is not needed since its automatically created internally.

option ipv6 auto => see above

option ipv6 0 => disable IPv6 entirely for this PPP connection

option ipv6 1 => only provide link-layer IPv6 (as in BB), you need to manually add the proto=dhcpv6 section in order to have IPv6 on layer 3.

hi cyrus,

there seems to be a disconnect between what you stated above, and what was written in the uci docs [1]:

ipv6 	boolean 	no 	0 	Enable IPv6 on the PPP link 

is the default 0 or auto, in the absence of option ipv6? if auto then the docs should be updated to reflect this.

[1] http://wiki.openwrt.org/doc/uci/network#protocol_ppp_ppp_over_modem

comment:9 Changed 2 years ago by xavier@…

...like so:

ipv6 	boolean 	no 	auto 	Enable IPv6 on the PPP link

and include the description of the possible values for this option as well.

auto - IPv6 will be provided and the proto=dhcpv6 section is not needed since its automatically created internally.
0    - disable IPv6 entirely for this PPP connection
1    - only provide link-layer IPv6 (as in BB), you need to manually add the proto=dhcpv6 section in order to have IPv6 on layer 3.

comment:10 Changed 2 years ago by anonymous

THANK YOU

after manually patching my CC 15.05 with the changes indicated in r46943 for ppp.sh, it works now, without the wan6 section.

i'll just have to remember not to reset the router to defaults though... the /rom image will override the changes if i reset the router and the changes in r46842 with r46942 / r46943 are a nice set of fixes for IPv6 functionality.

Probably wait a couple of months for the bug reports for CC 15.05 to slow down and then release a 15.05.1 edition?

# diff /lib/netifd/proto/ppp.sh /rom/lib/netifd/proto/
93c93
<               autoipv6=1
---
>               proto_export "AUTOIPV6=1"
129d128
<               ${autoipv6:+set AUTOIPV6=1} \



# diff /etc/config/firewall /rom/etc/config/firewall  | grep "option src_port" | grep 547
>       option src_port         547

comment:11 Changed 2 years ago by anonymous

one thing though...

i set the router to ignore DNS servers sent by provider and use my own list of IPv4 and IPv6 DNS servers... this setting seems to be ignored for IPv6 and the router shows on the Status->Overview page that it will use the IPv6 DNS servers sent by the provider instead of the IPv6 DNS servers that i configured it to use.

Shouldn't the peerdns '0' option also be valid in IPv6 context?

 option peerdns '0'
 option dns '213.154.124.1 193.231.252.1 8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844'
 option ipv6 'auto'

and the router shows on the Overview page that it will use

DNS 1: 2a02:2f0c:8000:3::1
DNS 2: 2a02:2f0c:8000:8::1

comment:12 Changed 2 years ago by anonymous

the system log shows correctly the DNS servers used, seems it just appends the auto-detected provider IPv6 DNS servers to the list of manually configured servers...

Tue Sep 15 18:37:36 2015 daemon.info dnsmasq[1236]: reading /tmp/resolv.conf.auto
Tue Sep 15 18:37:36 2015 daemon.info dnsmasq[1236]: using local addresses only for domain lan
Tue Sep 15 18:37:36 2015 daemon.info dnsmasq[1236]: using nameserver 213.154.124.1#53
Tue Sep 15 18:37:36 2015 daemon.info dnsmasq[1236]: using nameserver 193.231.252.1#53
Tue Sep 15 18:37:36 2015 daemon.info dnsmasq[1236]: using nameserver 8.8.8.8#53
Tue Sep 15 18:37:36 2015 daemon.info dnsmasq[1236]: using nameserver 8.8.4.4#53
Tue Sep 15 18:37:36 2015 daemon.info dnsmasq[1236]: using nameserver 2001:4860:4860::8888#53
Tue Sep 15 18:37:36 2015 daemon.info dnsmasq[1236]: using nameserver 2001:4860:4860::8844#53
Tue Sep 15 18:37:36 2015 daemon.info dnsmasq[1236]: using nameserver 2a02:2f0c:8000:3::1#53
Tue Sep 15 18:37:36 2015 daemon.info dnsmasq[1236]: using nameserver 2a02:2f0c:8000:8::1#53

comment:13 Changed 2 years ago by Aditza

  • Resolution fixed deleted
  • Status changed from closed to reopened

reopening this for the DNS sub-issue:... is it normal for the IPv6 auto-configuration to ignore the options

peerdns '0'
option dns '213.154.124.1 193.231.252.1 8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844'

when the user already provides his own IPv6 DNS servers?

in this case it adds the ISP's IPv6 DNS servers to the list of user-provided servers.

Add Comment

Modify Ticket

Action
as reopened .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.