ISP IPoE DHCP Setup Notes
Notes on Setting up a Linux router for IPoE DHCP.
After a few years of reasonable successful use of bridged VDSL modem with Linux Router running pppoe and nftables my ISP informed me that they do not use authentication on the connection with username and password. In fact they mention they used dhcp IPoE as well as PPPoE. I set up my spare modem as they described and it worked straight way. When I tried my Linux router with bridge modem it no longer worked, until I removed the password and user name. It actually seems to use default username and password in the pppoe software that seemed to function.
I investigated this ISP dhcp setup and came up with the other term IPoE. All a bit strange really, as dhcp is used on most networks to allow automatic configuration of network IP addresses and most IP traffic is over Ethernet. This needs to be taken in context of ISP access PPPoE versus IPoE using DHCP.
There is not much information on how to make this work.
I use the RJ45 ethernet interface called eno1. In my netplan configuration file, /etc/netplan/network.yaml
,
ethernets eno1: #start for pppoe and setup modem IP access dhcp4: true # yes for dhcp, no for ppoe dhcp6: false addresses: - 192.168.5.2/24 #Access to the modem web interface
After reboot following ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 0c:c4:7a:9f:36:4c brd ff:ff:ff:ff:ff:ff inet 192.168.5.2/24 brd 192.168.5.255 scope global eno1 valid_lft forever preferred_lft forever inet 112.213.222.38/24 brd 112.213.222.255 scope global dynamic eno1 valid_lft 331sec preferred_lft 331sec inet6 fe80::ec4:7aff:fe9f:364c/64 scope link valid_lft forever preferred_lft forever
So the networkd builtin dhcpd would seem to be functional.
The networkctl status eno1
2: eno1 Link File: /usr/lib/systemd/network/99-default.link Network File: /run/systemd/network/10-netplan-eno1.network Type: ether State: routable (configured) Alternative Names: enp2s0 Path: pci-0000:02:00.0 Driver: igb Vendor: Intel Corporation Model: I210 Gigabit Network Connection HW Address: 0c:c4:7a:9f:36:4c (Super Micro Computer, Inc.) MTU: 1500 (min: 68, max: 9216) QDisc: mq IPv6 Address Generation Mode: eui64 Queue Length (Tx/Rx): 8/8 Auto negotiation: yes Speed: 100Mbps Duplex: full Port: tp Address: 192.168.5.2 202.7.254.238 (DHCP4 via 202.7.254.1) fe80::ec4:7aff:fe9f:364c Gateway: 202.7.254.1 (Juniper Networks) DNS: 8.8.8.8 8.8.4.4 DHCP4 Client ID: IAID:0xb6220feb/DUID DHCP6 Client DUID: DUID-EN/Vendor:0000ab112278b955a63a0f690000
dhclient
The following dhclient commands are used to manual control dhcp connections. It looks like Debian used ISC-dhclient for automatic Ip assignment.
- To remove existing connected dhcp leased connections on eno1:
sudo dhclient -r eno1
, note this also seems to remove static IP addresses. - It is under stop the
-x
removes the local dhcp connection, but does not contact the upstream DHCP serve to remove lease, e.g.sudo dhclient -x eno1
- To manual request a dhcp lease connection on eno1:
sudo dhclient -4 eno1
, the-4
flag restricts operation to IPv4.
sudo journalctl -b | grep dh*
Jan 04 07:34:29 kptr dhclient[763]: Internet Systems Consortium DHCP Client 4.4.3-P1 Jan 04 07:34:29 kptr ifup[763]: For info, please visit https://www.isc.org/software/dhcp/ Jan 04 07:34:29 kptr dhclient[763]: Copyright 2004-2022 Internet Systems Consortium. Jan 04 07:34:29 kptr dhclient[763]: All rights reserved. Jan 04 07:34:29 kptr dhclient[763]: For info, please visit https://www.isc.org/software/dhcp/ Jan 04 07:34:29 kptr dhclient[763]: Jan 04 07:34:29 kptr dhclient[763]: Listening on LPF/enp1s0/00:e2:59:01:7d:ab Jan 04 07:34:29 kptr dhclient[763]: Sending on LPF/enp1s0/00:e2:59:01:7d:ab Jan 04 07:34:29 kptr dhclient[763]: Sending on Socket/fallback Jan 04 07:34:29 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 8 Jan 04 07:34:37 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 11 Jan 04 07:34:49 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 18 Jan 04 07:35:07 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 12 Jan 04 07:35:19 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 11 Jan 04 07:35:30 kptr dhclient[763]: No DHCPOFFERS received. Jan 04 07:35:30 kptr dhclient[763]: No working leases in persistent database - sleeping. Jan 04 07:39:48 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 8 Jan 04 07:39:56 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 10 Jan 04 07:40:06 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 9 Jan 04 07:40:15 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 15 Jan 04 07:40:30 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 8 Jan 04 07:40:38 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 11 Jan 04 07:40:49 kptr dhclient[763]: No DHCPOFFERS received. Jan 04 07:40:49 kptr dhclient[763]: No working leases in persistent database - sleeping. Jan 04 07:44:30 kptr dhclient[763]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 6 Jan 04 07:44:30 kptr dhclient[763]: DHCPOFFER of 202.7.254.38 from 202.7.254.1 Jan 04 07:44:30 kptr dhclient[763]: DHCPREQUEST for 202.7.254.38 on enp1s0 to 255.255.255.255 port 67 Jan 04 07:44:30 kptr dhclient[763]: DHCPACK of 202.7.254.38 from 202.7.254.1 Jan 04 07:44:30 kptr dhclient[763]: bound to 202.7.254.38 -- renewal in 264 seconds. Jan 04 07:47:33 kptr sudo[2504]: baumkp : TTY=tty1 ; PWD=/home/baumkp ; USER=root ; COMMAND=/usr/sbin/dhclient Jan 04 07:47:33 kptr dhclient[2507]: DHCPDISCOVER on vnet0 to 255.255.255.255 port 67 interval 5 Jan 04 07:47:33 kptr dhclient[2507]: DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 6 Jan 04 07:47:33 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 5 Jan 04 07:47:33 kptr dhclient[2507]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 3 Jan 04 07:47:33 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 6 Jan 04 07:47:33 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 5 Jan 04 07:47:33 kptr dhclient[2507]: DHCPOFFER of 192.168.1.100 from 192.168.1.2 Jan 04 07:47:33 kptr dhclient[2507]: DHCPREQUEST for 192.168.1.100 on br0 to 255.255.255.255 port 67 Jan 04 07:47:33 kptr dhclient[2507]: DHCPOFFER of 192.168.1.102 from 192.168.1.2 Jan 04 07:47:33 kptr dhclient[2507]: DHCPREQUEST for 192.168.1.102 on vnet0 to 255.255.255.255 port 67 Jan 04 07:47:33 kptr dhclient[2507]: DHCPACK of 192.168.1.100 from 192.168.1.2 Jan 04 07:47:33 kptr dhclient[2507]: bound to 192.168.1.100 -- renewal in 953 seconds. Jan 04 07:47:33 kptr dhclient[2507]: DHCPACK of 192.168.1.102 from 192.168.1.2 Jan 04 07:47:33 kptr dhclient[2507]: bound to 192.168.1.102 -- renewal in 754 seconds. Jan 04 07:47:37 kptr dhclient[2507]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 5 Jan 04 07:47:38 kptr dhclient[2587]: Internet Systems Consortium DHCP Client 4.4.3-P1 Jan 04 07:47:38 kptr dhclient[2587]: Copyright 2004-2022 Internet Systems Consortium. Jan 04 07:47:38 kptr dhclient[2587]: All rights reserved. Jan 04 07:47:38 kptr dhclient[2587]: For info, please visit https://www.isc.org/software/dhcp/ Jan 04 07:47:38 kptr dhclient[2587]: Unknown command: --usage Jan 04 07:47:38 kptr dhclient[2587]: Usage: dhclient [-4|-6] [-SNTPRI1dvrxi] [-nw] [-p <port>] [-D LL|LLT] dhclient {--version|--help|-h} Jan 04 07:47:38 kptr dhclient[2587]: Jan 04 07:47:38 kptr dhclient[2587]: If you think you have received this message due to a bug rather Jan 04 07:47:38 kptr dhclient[2587]: than a configuration issue please read the section on submitting Jan 04 07:47:38 kptr dhclient[2587]: bugs on either our web page at www.isc.org or in the README file Jan 04 07:47:38 kptr dhclient[2587]: before submitting a bug. These pages explain the proper Jan 04 07:47:38 kptr dhclient[2587]: process and the information we find helpful for debugging. Jan 04 07:47:38 kptr dhclient[2587]: Jan 04 07:47:38 kptr dhclient[2587]: exiting. Jan 04 07:47:38 kptr dhclient[2597]: Internet Systems Consortium DHCP Client 4.4.3-P1 Jan 04 07:47:38 kptr dhclient[2597]: Copyright 2004-2022 Internet Systems Consortium. Jan 04 07:47:38 kptr dhclient[2597]: All rights reserved. Jan 04 07:47:38 kptr dhclient[2597]: For info, please visit https://www.isc.org/software/dhcp/ Jan 04 07:47:38 kptr dhclient[2597]: Unknown command: --usage Jan 04 07:47:38 kptr dhclient[2597]: Usage: dhclient [-4|-6] [-SNTPRI1dvrxi] [-nw] [-p <port>] [-D LL|LLT] dhclient {--version|--help|-h} Jan 04 07:47:38 kptr dhclient[2597]: Jan 04 07:47:38 kptr dhclient[2597]: If you think you have received this message due to a bug rather Jan 04 07:47:38 kptr dhclient[2597]: than a configuration issue please read the section on submitting Jan 04 07:47:38 kptr dhclient[2597]: bugs on either our web page at www.isc.org or in the README file Jan 04 07:47:38 kptr dhclient[2597]: before submitting a bug. These pages explain the proper Jan 04 07:47:38 kptr dhclient[2597]: process and the information we find helpful for debugging. Jan 04 07:47:38 kptr dhclient[2597]: Jan 04 07:47:38 kptr dhclient[2597]: exiting. Jan 04 07:47:38 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 5 Jan 04 07:47:38 kptr sudo[2603]: baumkp : TTY=tty1 ; PWD=/home/baumkp ; USER=root ; COMMAND=/usr/sbin/dhclient -h Jan 04 07:47:39 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 10 Jan 04 07:47:39 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 14 Jan 04 07:47:42 kptr dhclient[2507]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 14 Jan 04 07:47:43 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 6 Jan 04 07:47:49 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 6 Jan 04 07:47:49 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 16 Jan 04 07:47:53 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 8 Jan 04 07:47:55 kptr dhclient[2639]: Internet Systems Consortium DHCP Client 4.4.3-P1 Jan 04 07:47:55 kptr dhclient[2639]: Copyright 2004-2022 Internet Systems Consortium. Jan 04 07:47:55 kptr dhclient[2639]: All rights reserved. Jan 04 07:47:55 kptr dhclient[2639]: For info, please visit https://www.isc.org/software/dhcp/ Jan 04 07:47:55 kptr dhclient[2639]: Unknown command: --usage Jan 04 07:47:55 kptr dhclient[2639]: Usage: dhclient [-4|-6] [-SNTPRI1dvrxi] [-nw] [-p <port>] [-D LL|LLT] dhclient {--version|--help|-h} Jan 04 07:47:55 kptr dhclient[2639]: Jan 04 07:47:55 kptr dhclient[2639]: If you think you have received this message due to a bug rather Jan 04 07:47:55 kptr dhclient[2639]: than a configuration issue please read the section on submitting Jan 04 07:47:55 kptr dhclient[2639]: bugs on either our web page at www.isc.org or in the README file Jan 04 07:47:55 kptr dhclient[2639]: before submitting a bug. These pages explain the proper Jan 04 07:47:55 kptr dhclient[2639]: process and the information we find helpful for debugging. Jan 04 07:47:55 kptr dhclient[2639]: Jan 04 07:47:55 kptr dhclient[2639]: exiting. Jan 04 07:47:55 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 8 Jan 04 07:47:56 kptr sudo[2645]: baumkp : TTY=tty1 ; PWD=/home/baumkp ; USER=root ; COMMAND=/usr/sbin/dhclient --help Jan 04 07:47:56 kptr dhclient[2507]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 18 Jan 04 07:48:01 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 12 Jan 04 07:48:03 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 8 Jan 04 07:48:05 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 19 Jan 04 07:48:11 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 14 Jan 04 07:48:13 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 10 Jan 04 07:48:14 kptr dhclient[2507]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 11 Jan 04 07:48:23 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 9 Jan 04 07:48:24 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 10 Jan 04 07:48:25 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 9 Jan 04 07:48:25 kptr dhclient[2507]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 9 Jan 04 07:48:32 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 2 Jan 04 07:48:34 kptr dhclient[2507]: No DHCPOFFERS received. Jan 04 07:48:34 kptr dhclient[2507]: No working leases in persistent database - sleeping. Jan 04 07:48:34 kptr dhclient[2507]: No DHCPOFFERS received. Jan 04 07:48:34 kptr dhclient[2507]: No working leases in persistent database - sleeping. Jan 04 07:48:34 kptr dhclient[2507]: No DHCPOFFERS received. Jan 04 07:48:34 kptr dhclient[2507]: No working leases in persistent database - sleeping. Jan 04 07:48:34 kptr dhclient[2507]: No DHCPOFFERS received. Jan 04 07:48:34 kptr dhclient[2507]: No working leases in persistent database - sleeping. Jan 04 07:48:54 kptr dhclient[763]: DHCPREQUEST for 202.7.254.38 on enp1s0 to 202.7.254.1 port 67 Jan 04 07:48:54 kptr dhclient[763]: DHCPACK of 202.7.254.38 from 202.7.254.1 Jan 04 07:48:54 kptr dhclient[763]: bound to 202.7.254.38 -- renewal in 285 seconds. Jan 04 07:53:02 kptr dhclient[2507]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 4 Jan 04 07:53:06 kptr dhclient[2507]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 6 Jan 04 07:53:12 kptr dhclient[2507]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 13 Jan 04 07:53:12 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 3 Jan 04 07:53:15 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 5 Jan 04 07:53:20 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 10 Jan 04 07:53:25 kptr dhclient[2507]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 17 Jan 04 07:53:30 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 10 Jan 04 07:53:39 kptr dhclient[763]: DHCPREQUEST for 202.7.254.38 on enp1s0 to 202.7.254.1 port 67 Jan 04 07:53:39 kptr dhclient[763]: DHCPACK of 202.7.254.38 from 202.7.254.1 Jan 04 07:53:39 kptr dhclient[763]: bound to 202.7.254.38 -- renewal in 274 seconds. Jan 04 07:53:40 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 12 Jan 04 07:53:42 kptr dhclient[2507]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 21 Jan 04 07:53:52 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 15 Jan 04 07:54:03 kptr dhclient[2507]: No DHCPOFFERS received. Jan 04 07:54:03 kptr dhclient[2507]: No working leases in persistent database - sleeping. Jan 04 07:54:07 kptr dhclient[2507]: DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 6 Jan 04 07:54:13 kptr dhclient[2507]: No DHCPOFFERS received. Jan 04 07:54:13 kptr dhclient[2507]: No working leases in persistent database - sleeping. Jan 04 07:55:10 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 6 Jan 04 07:55:16 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 17 Jan 04 07:55:33 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 20 Jan 04 07:55:39 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 7 Jan 04 07:55:46 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 18 Jan 04 07:55:53 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 8 Jan 04 07:56:01 kptr dhclient[2507]: DHCPDISCOVER on enp7s0 to 255.255.255.255 port 67 interval 10 Jan 04 07:56:04 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 11 Jan 04 07:56:11 kptr dhclient[2507]: No DHCPOFFERS received. Jan 04 07:56:11 kptr dhclient[2507]: No working leases in persistent database - sleeping. Jan 04 07:56:15 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 12 Jan 04 07:56:27 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 7 Jan 04 07:56:34 kptr dhclient[2507]: DHCPDISCOVER on enp8s0 to 255.255.255.255 port 67 interval 6 Jan 04 07:56:40 kptr dhclient[2507]: No DHCPOFFERS received. Jan 04 07:56:40 kptr dhclient[2507]: No working leases in persistent database - sleeping. Jan 04 07:58:13 kptr dhclient[763]: DHCPREQUEST for 202.7.254.38 on enp1s0 to 202.7.254.1 port 67 Jan 04 07:58:13 kptr dhclient[763]: DHCPACK of 202.7.254.38 from 202.7.254.1 Jan 04 07:58:13 kptr dhclient[763]: bound to 202.7.254.38 -- renewal in 284 seconds.
Firewall Modifications
When using pppoe a separate device is created that can be used to filter against. When using IPoE with dhcp same device reference is shared by the IPoE WAN link and the modem LAN web page link. My modem is setup at 192.168.5.1. The fire wall needs to be modified to consider this shared device instead of separate one. Other than changing the $wan reference from ppp1 to eno1 the postrouting to the modem needs to be made IP range specific.
ip saddr 192.168.1.0/24 ip daddr 192.168.5.0/24 oifname "eno1" counter packets 68 bytes 4080 snat to 192.168.5.2 ip saddr 192.168.6.0/24 ip daddr 192.168.5.0/24 oifname "eno1" counter packets 0 bytes 0 snat to 192.168.5.2
References
- Debian man for The Internet Systems Consortium DHCP Client, dhclient