Vyos 1.5 pppoe client ignores IPCP dns settings

Dear vyos-Experts!

I tried to configure vyos (1.5-nightly…) to connect via pppoe (pppoe0) to my ISP. It nearly worked out-of-the-box - the result:

Pinging an external IP address works fine, but name resolution doesn’t.

Within the pppoe0 log I can see that my ISP’s pppoe-server announces two DNS ip addresses during IPCP. But vyos doesn’t use them. What am I doing wrong? (log, pppoe config, exact vyos version, see below).

Thanks in advance for your support.

Best regards,
vyozzy

PS: That’s what I’ve done:

vyos@vyos:~$ disconnect interface pppoe0 
Interface pppoe0: disconnecting...


vyos@vyos:~$ connect interface pppoe0 
Interface pppoe0: connecting...

vyos@vyos:~$ show interfaces
pppoe0       1.2.3.57/32          n/a                default   1492  u/u	Uplink

vyos@vyos:~$ ping vyos.io
ping: Unknown host: vyos.io


vyos@vyos:~$ nslookup vyos.io
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
;; communications error to 127.0.0.1#53: connection refused
;; no servers could be reached


vyos@vyos:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=6.08 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=60 time=6.06 ms


vyos@vyos:~$ cat /etc/resolv.conf 
### Autogenerated by VyOS ###
### Do not edit, your changes will get overwritten ###


vyos@vyos# show system name-server
Configuration under specified path is empty
[edit]


vyos@vyos# set system name-server 8.8.8.8
[edit]
vyos@vyos# commit; save
[edit]
vyos@vyos# show system name-server
 name-server 8.8.8.8

vyos@vyos# nslookup vyos_io
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   vyos_io
Address: 104.18.8.215
Name:   vyos_io
Address: 104.18.9.215
Name:   vyos_io
Address: 2606:4700::6812:9d7
Name:   vyos_io
Address: 2606:4700::6812:8d7

[edit]
vyos@vyos:~$ cat /etc/resolv.conf
vyos@vyos# cat /etc/resolv.conf 
### Autogenerated by VyOS ###
### Do not edit, your changes will get overwritten ###


# system
nameserver 8.8.8.8


[edit]
vyos@vyos:~$ show interfaces pppoe pppoe0 log
pppd[8762]: Plugin rp-pppoe.so loaded.
pppd[8762]: Plugin rp-pppoe.so loaded.
pppd[8762]: pppd 2.4.9 started by root, uid 0
pppd[8762]: Send PPPOE Discovery V1T1 PADI session 0x0 length 12
pppd[8762]:  dst ff:ff:ff:ff:ff:ff  src 12:01:99:00:02:00
pppd[8762]:  [service-name] [host-uniq  3a 22 00 00]
pppd[8762]: Recv PPPOE Discovery V1T1 PADO session 0x0 length 42
pppd[8762]:  dst 12:01:99:00:02:00  src 5c:49:79:8e:09:83
pppd[8762]:  [AC-name DIBJ03] [host-uniq  3a 22 00 00] [service-name] [AC-cookie  78 9c 2d df c5 be b0 b0 b6 7c 9b eb aa 93 6a fb]
pppd[8762]: Send PPPOE Discovery V1T1 PADR session 0x0 length 32
pppd[8762]:  dst 5c:49:79:8e:09:83  src 12:01:99:00:02:00
pppd[8762]:  [service-name] [host-uniq  3a 22 00 00] [AC-cookie  78 9c 2d df c5 be b0 b0 b6 7c 9b eb aa 93 6a fb]
pppd[8762]: Recv PPPOE Discovery V1T1 PADS session 0x99 length 42
pppd[8762]:  dst 12:01:99:00:02:00  src 5c:49:79:8e:09:83
pppd[8762]:  [service-name] [host-uniq  3a 22 00 00] [AC-name DIBJ03] [AC-cookie  78 9c 2d df c5 be b0 b0 b6 7c 9b eb aa 93 6a fb]
pppd[8762]: PADS: Service-Name: ''
pppd[8762]: PPP session is 153
pppd[8762]: Connected to 5c:49:79:8e:09:83 via interface eth6
pppd[8762]: using channel 5
pppd[8762]: Renamed interface ppp0 to pppoe0
pppd[8762]: Using interface pppoe0
pppd[8762]: Connect: pppoe0 <--> eth6
pppd[8762]: sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x4c7450e7>]
pppd[8762]: rcvd [LCP ConfReq id=0xf2 <mru 1492> <auth pap> <magic 0x7c6ae23>]
pppd[8762]: sent [LCP ConfAck id=0xf2 <mru 1492> <auth pap> <magic 0x7c6ae23>]
pppd[8762]: rcvd [LCP ConfAck id=0x1 <mru 1492> <magic 0x4c7450e7>]
pppd[8762]: sent [LCP EchoReq id=0x0 magic=0x4c7450e7]
pppd[8762]: sent [PAP AuthReq id=0x1 user="<hidden>" password=<hidden>]
pppd[8762]: rcvd [LCP EchoRep id=0x0 magic=0x7c6ae23]
pppd[8762]: rcvd [PAP AuthAck id=0x1 "SRU=21988#SRD=59940#"]
pppd[8762]: Remote message: SRU=21988#SRD=59940#
pppd[8762]: PAP authentication succeeded
pppd[8762]: peer from calling number 5C:49:79:8E:09:83 authorized
pppd[8762]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
pppd[8762]: rcvd [IPCP ConfReq id=0xbc <addr 1.2.3.58>]
pppd[8762]: sent [IPCP ConfAck id=0xbc <addr 1.2.3.58>]
pppd[8762]: rcvd [IPCP ConfNak id=0x1 <addr 1.2.3.57> <ms-dns1 9.9.9.9> <ms-dns2 1.1.1.1>]
pppd[8762]: sent [IPCP ConfReq id=0x2 <addr 1.2.3.57> <ms-dns1 9.9.9.9> <ms-dns2 1.1.1.1>]
pppd[8762]: rcvd [IPCP ConfAck id=0x2 <addr 1.2.3.57> <ms-dns1 9.9.9.9> <ms-dns2 1.1.1.1>]
pppd[8762]: Script /etc/ppp/ip-pre-up started (pid 8771)
pppd[8762]: Script /etc/ppp/ip-pre-up finished (pid 8771), status = 0x0
pppd[8762]: local  IP address 1.2.3.57
pppd[8762]: remote IP address 1.2.3.58
pppd[8762]: primary   DNS address 9.9.9.9
pppd[8762]: secondary DNS address 1.1.1.1
pppd[8762]: Script /etc/ppp/ip-up started (pid 8774)
sudo[8799]:     root : PWD=/ ; USER=root ; COMMAND=/usr/sbin/dmidecode -t 4
sudo[8799]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
sudo[8799]: pam_unix(sudo:session): session closed for user root
sudo[8850]:     root : PWD=/ ; USER=root ; COMMAND=/usr/sbin/dmidecode -t 4
sudo[8850]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
sudo[8850]: pam_unix(sudo:session): session closed for user root
pppd[8762]: Script /etc/ppp/ip-up finished (pid 8774), status = 0x0



vyos@vyos# show interfaces pppoe pppoe0 
 authentication {
     password <hidden>
     username <hidden>
 }
 description "Uplink"
 ip {
     adjust-mss clamp-mss-to-pmtu
     source-validation strict
 }
 mtu 1492
 source-interface eth6
[edit]
vyos@vyos#


vyos@vyos:~$ show version

Version:          VyOS 1.5-rolling-202408120022
Release train:    current
Release flavor:   generic

Built by:         autobuild_vyos.net
Built on:         Mon 12 Aug 2024 02:55 UTC
Build UUID:       373f09ed-ded7-41e5-a2a1-ea5c33f0b42d
Build commit ID:  e40abc1e81ffe6

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    11111111-1111-1111-1111-111111111111

Copyright:        VyOS maintainers and contributors
set service dns forwarding ?

Have you setup dns forwarding?

Mine looks like so:

     dns {
         forwarding {
             allow-from 192.168.0.0/16
             cache-size 32768
             dnssec off
             listen-address 192.168.0.1
             name-server x.x.x.x {
             }
             name-server y.y.y.y {
             }
             serve-stale-extension 120
         }
     }

You’ll see I’m statically setting the DNS servers, not using the DHCP learnt ones (I don’t have a PPPoE Interface to test with"

set system name-server '192.168.0.1'

I think you can also do set system name-server pppoe0

1 Like

set system name-server pppoe0
sound promising - I’ll test it as soon as possible and give feedback. Thank you very much!

1 Like

It seems to work. But I don’t understand exactly what’s going on in the background - this console commit feedback confuses me:

WARNING: "pppoe0" is not a DHCP interface but uses DHCP name-server option!

What does “DHCP name-server option” mean? I can’t believe vyos requests the dns servers’ IP addresses via dhcp over pppoe?! I think this warning can be ignored, because linux’s ppp[oe]d IMO ever-since uses IPCP. What procedures does the command set system name-server pppoe trigger in the background? Could someone be so kind and provide me a link to the sources (I have no clue how to find vyios pppoed-code on the github repository - I tried it, but only found the build-system, yet. Sorry.)

Summary: It works, but the solution doesn’t seem very reliable to me.

Nevertheless I’m happy for the moment, here are the details:

vyos@vyos# set system name-server pppoe0
[edit]
vyos@vyos# compare
[system]
+ name-server "pppoe0"

[edit]
vyos@vyos# commit

WARNING: "pppoe0" is not a DHCP interface but uses DHCP name-server
option!


WARNING: "pppoe0" is not a DHCP interface but uses DHCP name-server
option!

[edit]
vyos@vyos# cat /etc/resolv.conf 
### Autogenerated by VyOS ###
### Do not edit, your changes will get overwritten ###




[edit]
vyos@vyos# run connect interface pppoe0 
Interface pppoe0: connecting...
[edit]
vyos@vyos# cat /etc/resolv.conf 
### Autogenerated by VyOS ###
### Do not edit, your changes will get overwritten ###


# dhcp-pppoe0
nameserver 8.8.8.8
nameserver 1.1.1.1


[edit]
vyos@vyos#

PPPoE will learn the DNS Servers of the ISP (if the ISP has configured this on their BRAs/BNG) using IPCP and Vyos can learn that. It’s not DHCP for PPPoE, I guess that’s why it’s complaining.
There’s no “DHCP over PPPoE” happening though! At least not as far as I’m aware.

Look at the PPPoE config, there’s a “no-peer-dns” option, so I expect that actually by default Vyos will use the DNS servers that the PPPoE servers teaches it.

So yea, back to your original problem, I’m not sure why the system’s nameserver isn’t being set with your config.

I don’t know but I think, that vyos pppoe-client always retrieves the DNS ip addresses via IPCP but only use them (write them to /etc/resolv.conf) when it’s told to do so using set system name-server pppoe. To understand the details I will have a quick look into the code - as soon I’ll find the pppoe-client’s sources. :wink:

Thank you very much for your assistance, your hint was brilliant.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.