Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux_router:ipoe [2025-01-04 Sat wk01 17:15] – [ISP IPoE DHCP Setup Notes] baumkplinux_router:ipoe [2025-01-04 Sat wk01 18:36] (current) – [References] baumkp
Line 65: Line 65:
  
 ====dhclient==== ====dhclient====
-The following dhclient commands are used to manual control dhcp connections.  Note however this does not work with the built-in systemd-networkd dhcpd functionality (see man systemd-networkd, networkctl and systemd.netdev)+The following dhclient commands are used to manual control dhcp connections.  It looks like Debian used ISC-dhclient for automatic Ip assignment.
 ++++tldr:| ++++tldr:|
   *To remove existing connected dhcp leased connections on eno1: ''sudo dhclient -r eno1'', note this also seems to remove static IP addresses.   *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''    *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.    *To manual request a dhcp lease connection on eno1: ''sudo dhclient -4 eno1'' , the ''-4'' flag restricts operation to IPv4. 
 +++++
  
-===dhclient@.service===+++++dhclient negoitiation|
  
-''sudo vim /etc/systemd/system/dhclient@.service'' +''sudo journalctl -b | grep dh*''
-<code> +
-[Unit] +
-Description=dhclient on %I +
-Documentation=man:dhclient(8) +
-Wants=network.target +
-Before=network.target +
-BindsTo=sys-subsystem-net-devices-%i.device +
-After=sys-subsystem-net-devices-%i.device+
  
-[Service+<code>Jan 04 07:34:29 kptr dhclient[763]: Internet Systems Consortium DHCP Client 4.4.3-P1 
-Type=forking +Jan 04 07:34:29 kptr ifup[763]: For info, please visit https://www.isc.org/software/dhcp/ 
-PIDFile=/run/dhclient/%I.pid +Jan 04 07:34:29 kptr dhclient[763]: Copyright 2004-2022 Internet Systems Consortium. 
-ExecStart=/usr/sbin/dhclient -4 -v %I +Jan 04 07:34:29 kptr dhclient[763]: All rights reserved. 
-ExecStop=/usr/sbin/dhclient -r %I +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]:  
-[Install+Jan 04 07:34:29 kptr dhclient[763]: Listening on LPF/enp1s0/00:e2:59:01:7d:ab 
-WantedBy=multi-user.target +Jan 04 07:34:29 kptr dhclient[763]: Sending on   LPF/enp1s0/00:e2:59:01:7d:ab 
-</code+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 
-To reload the service files after any changes''sudo systemctl daemon-reload'' +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.</code> ++++
  
 ====Firewall Modifications==== ====Firewall Modifications====
Line 104: Line 245:
 </code> ++++ </code> ++++
  
 +====References==== 
 +  *Debian man for [[https://manpages.debian.org/bookworm/isc-dhcp-client/dhclient.8.en.html|The Internet Systems Consortium DHCP Client, dhclient]] 
 +  *[[https://manpages.debian.org/unstable/ifupdown/interfaces.5.en.html#The_dhcp_Method|The_dhcp_Method]] 
 +  *[[https://www.computerhope.com/unix/dhclient.htm|Linux dhclient command]] 
 +  *[[https://www.computernetworkingnotes.com/ccna-study-guide/how-dhcp-works-explained-with-examples.html|How DHCP works Explained with Examples]] 
 +  *[[http://www.tcpipguide.com/free/t_DHCPLeaseRenewalandRebindingProcesses-2.htm|DHCP Lease Renewal and Rebinding Processes]]
  
  < linux_router:ppp|Prev page ^ linux_router:start|Start page ^ linux_router:netfilter|Next page ->  < linux_router:ppp|Prev page ^ linux_router:start|Start page ^ linux_router:netfilter|Next page ->