Cannot get an IPv6 address with PPPoE

I'm using the following configuration to attempt to use IPv6 and IPv4 over the same PPPoE connection.

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ip6assign '64'
        list ipaddr '10.0.0.1/24'
        option delegate '0'

config device
        option name 'wan'
        option macaddr 'A0:04:60:87:F2:55'

config interface 'wan'
        option device 'wan'
        option proto 'pppoe'
        option username 'redacted'
        option password 'redacted'
        option ipv6 '1'
        option verbose '1'
        option delegate '0'

config interface 'wan6'
        option device '@wan'
        option proto 'dhcpv6'
        option verbose '1'
        option reqaddress 'try'
        option reqprefix 'auto'

I've also tried to delete the wan6 interface and set wan's ipv6 to auto, expecting a wan_6 interface to appear; but such an interface does not appear.

odhcp6c frequently complains Failed to send SOLICIT message to ff02::1:2 (Network unreachable).

Any suggestions?

I am unsure whether I could get a prefix delegation. The ISP's technical contact for my area doesn't seem to know, and just says that I need IPv6 and IPv4 to be both on the same PPPoE connection (i.e. I cannot setup wan and wan6 as two separate PPPoE dialups.)

Try adding

option pppd_options 'debug'

to your wan interface and look at the log. There's probably something preventing successful IPV6CP negotiation. And if you're lucky it's only a matter of figuring out what the other end expects.

Does your wan interface has a link local addresses?

The Web interface says:

wan6
Type: Switch port
Device: wan
Connected: yes
MAC: A0:04:60:XX:XX:XX
RX: 474.48 MB (977956 Pkts.)
TX: 149.76 MB (901680 Pkts.)

However, ifconfig(8) shows the following:

pppoe-wan Link encap:Point-to-Point Protocol  
          inet addr:222.70.X.X  P-t-P:222.70.X.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:977444 errors:0 dropped:0 overruns:0 frame:0
          TX packets:901147 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:452160564 (431.2 MiB)  TX bytes:129962003 (123.9 MiB)

wan       Link encap:Ethernet  HWaddr A0:04:60:XX:XX:XX
          inet6 addr: fe80::a204:60ff:fe87:f255/64 Scope:Link     
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:978675 errors:0 dropped:0 overruns:0 frame:0
          TX packets:902407 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:474550460 (452.5 MiB)  TX bytes:149829531 (142.8 MiB)

Which suggests that I have the link-local address fe80::a204:60ff:fe87:f255/64.

It's also rather confusing to me because although the Web interface shows wan6 as an interface, I couldn't find any mention of it in either ifconfig(8) or ip(8)...

Messages that I find particularly relevant:

debug pppd: sent [IPV6CP ConfReq id=0x1 <addr fe80::fcae:0282:7e7a:c896>]
debug pppd: rcvd [LCP ProtRej id=0x3 80 57 01 01 00 0e 01 0a fc ae 02 82 7e 7a c8 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...]
debug pppd: Protocol-Reject for 'IPv6 Control Protocol' (0x8057) received

Full log (grepped a range for ppp):

debug pppd: rcvd [LCP ConfReq id=0x2 <mru 1492> <auth pap> <magic 0xb3b7e897>]
debug pppd: sent [LCP ConfAck id=0x2 <mru 1492> <auth pap> <magic 0xb3b7e897>]
debug pppd: sent [LCP EchoReq id=0x0 magic=0xdcc853d3]
debug pppd: sent [PAP AuthReq id=0x1 user="redacted" password=<hidden>]
debug pppd: rcvd [LCP EchoRep id=0x0 magic=0xb3b7e897]
debug pppd: rcvd [PAP AuthAck id=0x1 "Authentication success,Welcome!"]
info pppd: Remote message: Authentication success,Welcome!
notice pppd: PAP authentication succeeded
notice pppd: peer from calling number 68:8F:84:XX:XX:XX authorized
debug pppd: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
debug pppd: sent [IPV6CP ConfReq id=0x1 <addr fe80::fcae:0282:7e7a:c896>]
debug pppd: rcvd [IPCP ConfReq id=0x1 <addr 222.70.X.1>]
debug pppd: sent [IPCP ConfAck id=0x1 <addr 222.70.X.1>]
debug pppd: rcvd [LCP ProtRej id=0x3 80 57 01 01 00 0e 01 0a fc ae 02 82 7e 7a c8 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...]
debug pppd: Protocol-Reject for 'IPv6 Control Protocol' (0x8057) received
debug pppd: rcvd [IPCP ConfNak id=0x1 <addr 222.70.X.X> <ms-dns1 116.228.X.X> <ms-dns2 180.168.X.X>]
debug pppd: sent [IPCP ConfReq id=0x2 <addr 222.70.X.X> <ms-dns1 116.228.X.X> <ms-dns2 180.168.X.X>]
debug pppd: rcvd [IPCP ConfAck id=0x2 <addr 222.70.X.X> <ms-dns1 116.228.X.X> <ms-dns2 180.168.X.X>]
info avahi-daemon: Joining mDNS multicast group on interface pppoe-wan.IPv4 with address 222.70.X.X.
info avahi-daemon: New relevant interface pppoe-wan.IPv4 for mDNS.
info avahi-daemon: Registering new address record for 222.70.X.X on pppoe-wan.IPv4.
notice pppd: local  IP address 222.70.X.X
notice pppd: remote IP address 222.70.X.1
notice pppd: primary   DNS address 116.228.X.X
notice pppd: secondary DNS address 180.168.X.X
debug pppd: Script /lib/netifd/ppp-up started (pid 5255)

Which means that IPv6 isn't supported by the ISP. At least not with this PPP account. Not much to do about that without help from the ISP

Yes, but that's on the underlying ethernet interface. This isn't used for IP at all. It will only transport PPPoE packets. The interface names are a bit confusing here, since both the kernel name of the underlying interface and the name of your UCI pppoe interface is "wan".

The interesting interface is the PPP interface named "pppoe-wan", and there you see that the IPv6 link local address is missing. Which is explained by the peer refusing to negotiate IPV6CP at all. Without that, no IPv6 interface ID. And without an interface ID, no link local address.

The wan6 interface is just a virtual placeholder for all the IPv6 configuration. It's an alias for your 'wan' UCI pppoe interface (which has the kernel name "pppoe-wan"). So both wan6 and 'wan' in the web interface will actually refer fo pppoe-wan.

Phew. Yes, one can be confused by less :slight_smile:

2 Likes

Thank you!

Now I'll look at why I don't have a link-local address...

Hmm, my ISP claims that I could just use PPPoE in the same connection. I'll ask a few neighbours and see how the default ISP modem is configured.

1 Like

Nitpick: please use ip address show or ip a for short. ifconfig is legacy on Linux since now 12 years or something and may not show everything. If you are unfamiliar, there is also ip link, and neighbor and friends. Check man ip.

1 Like