<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-1x.git/data/templates/dhcp-client, branch rolling</title>
<subtitle>VyOS command definitions, scripts, and utilities (mirror of https://github.com/vyos/vyos-1x.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-1x.git/atom?h=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-1x.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/'/>
<updated>2025-10-09T15:12:10+00:00</updated>
<entry>
<title>pppoe: T7485: add DHCPv6 options to disable DNS</title>
<updated>2025-10-09T15:12:10+00:00</updated>
<author>
<name>Nicolas Vandamme</name>
<email>n.vandamme@firis-system.lu</email>
</author>
<published>2025-10-09T15:12:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=0c5809588980a198a02ebfb70a459d519af0001e'/>
<id>urn:sha1:0c5809588980a198a02ebfb70a459d519af0001e</id>
<content type='text'>
Co-Authored-By: Christian Breunig &lt;christian@breunig.cc&gt;
</content>
</entry>
<entry>
<title>T7682: incorrect sla-len in DHCPv6 client prefix delegation (DHCPv6-PD)</title>
<updated>2025-09-13T06:55:31+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2025-09-13T06:55:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=44fd159ce2d344cdf7b08487801e077ebf59869c'/>
<id>urn:sha1:44fd159ce2d344cdf7b08487801e077ebf59869c</id>
<content type='text'>
The current template has an overly optimistic logic for sla-len calculation,
relying on an assumption that a server always provides a prefix with the exact
length requested by the client. This is incorrect. According to RFC8415 and
RFC7084, the prefix length in a request is only a hint for the server, which
may decide to provide a different prefix size.

The big issue here is that wide-dhcpv6-client uses the sla-len value from the
configuration regardless of the received prefix size. This seems to be the
known issue.

The good news is that we have already inherited a patch from Debian to mitigate
the issue [1]. It accomplishes exactly what we are doing in the configuration
template, but with the advantage of using the actual prefix length from the
received prefix, rather than the one configured in the configuration file.

If we simply remove sla-len from the template, everything appears to function
normally.

Before - server sending /56

set interfaces ethernet eth1 address 'dhcpv6'
set interfaces ethernet eth1 dhcpv6-options pd 1 interface eth2 address '1'
set interfaces ethernet eth1 dhcpv6-options pd 1 interface eth2 sla-id '0'
set interfaces ethernet eth1 dhcpv6-options pd 1 length '60'

Resulted in:

vyos@vyos# run show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address           MAC                VRF        MTU  S/L    Description
-----------  -------------------  -----------------  -------  -----  -----  -------------
eth1         fc00:0:0:1::200/128  0c:67:94:67:00:01  default   1500  u/u
eth2         fc00:0:2:ff00::1/60  0c:67:94:67:00:02  default   1500  u/u

Whereas IPv6 PD should always use a /64 prefix on the interface we assign a
dynamic DHCPv6 prefix to.

After the fix:

vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address           MAC                VRF        MTU  S/L    Description
-----------  -------------------  -----------------  -------  -----  -----  -------------
eth1         fc00:0:0:1::200/128  0c:67:94:67:00:01  default   1500  u/u
eth2         fc00:0:2:ff00::1/64  0c:67:94:67:00:02  default   1500  u/u

If a DHCPv6 server (e.g. VyOS itself) even provides multiple PD prefixes, the
right one is choosen. Assume the following server configuration:

set service dhcpv6-server shared-network-name dhcpv6-1 subnet fc00:0:0:1::/64 address-range start fc00:0:0:1::100 stop 'fc00:0:0:1::200'
set service dhcpv6-server shared-network-name dhcpv6-1 subnet fc00:0:0:1::/64 lease-time default '120'
set service dhcpv6-server shared-network-name dhcpv6-1 subnet fc00:0:0:1::/64 prefix-delegation start fc00:0:2:: prefix-length '56'
set service dhcpv6-server shared-network-name dhcpv6-1 subnet fc00:0:0:1::/64 prefix-delegation start fc00:0:2:: stop 'fc00:0:2:ff00::'
set service dhcpv6-server shared-network-name dhcpv6-1 subnet fc00:0:0:1::/64 prefix-delegation start fc00:0:3:: prefix-length '60'
set service dhcpv6-server shared-network-name dhcpv6-1 subnet fc00:0:0:1::/64 prefix-delegation start fc00:0:3:: stop 'fc00:0:3:ff00::'

If a /56 is requested ("dhcpv6-options pd 1 length 56") - we will get a per
interface /64 from the original /56 prefix-delegation from the DHCPv6 server.
If the user suddently requests a /60 ("dhcpv6-options pd 1 length 60") the
delegated prefix will be from the above fc00:0:3:: pool.

1: https://salsa.debian.org/debian/wide-dhcpv6/-/blob/debian/20080615-23/debian/patches/0021-Make-sla-len-config-optional.patch
</content>
</entry>
<entry>
<title>dhcpv6-client: T6113: add proper startup/shutdown order for systemd units</title>
<updated>2025-04-15T19:20:22+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2025-04-15T19:19:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=315a360711d9c9ba36ce82084a3e3ce0de1aa080'/>
<id>urn:sha1:315a360711d9c9ba36ce82084a3e3ce0de1aa080</id>
<content type='text'>
When running dhcp6c on top of a PPPoE interface, properly honor the dependency
chain with systemd. On shutdown we need to stop the wide-dhcpv6-client prior
to shutting down the ppp portion of the interface.
</content>
</entry>
<entry>
<title>dhcpv6-client: T2590: fix vyos-hostsd update for nameserver and search domains</title>
<updated>2024-04-01T12:04:50+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2024-04-01T12:04:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=ece425f0191762638b7c967097accd8739e9103d'/>
<id>urn:sha1:ece425f0191762638b7c967097accd8739e9103d</id>
<content type='text'>
After migrating from ISC DHCLIENT for IPv6 to wide-dhcp-client the logic which
was present to update /etc/resolv.conf with the DHCP specified nameservers and
also the search domain list was no longer present.

This commit adds a per interface rendered script to inform vyos-hostsd about
the received IPv6 nameservers and search domains.
</content>
</entry>
<entry>
<title>op-mode: T6175: "renew dhcp interface &lt;name&gt;" does not check for DHCP interface</title>
<updated>2024-03-28T06:36:22+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2024-03-28T06:36:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=7dbaa25a199a781aaa9f269741547e576410cb11'/>
<id>urn:sha1:7dbaa25a199a781aaa9f269741547e576410cb11</id>
<content type='text'>
The current op-mode script simply calls sudo systemctl restart "dhclient@$4.service"
with no additional information about a client interface at all.

This results in useless dhclient processes
root  47812  4.7  0.0   5848  3584 ?  Ss 00:30   0:00 /sbin/dhclient -4 -d
root  48121  0.0  0.0   4188  3072 ?  S  00:30   0:00  \_ /bin/sh /sbin/dhclient-script
root  48148 50.0  0.2  18776 11264 ?  R  00:30   0:00      \_ python3 -

Which also assign client leases to all local interfaces, if we receive one
valid DHCPOFFER

vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address         MAC                VRF        MTU  S/L    Description
-----------  -----------------  -----------------  -------  -----  -----  -------------
eth0         -                  00:50:56:bf:c5:6d  default   1500  u/u
eth0.10      172.16.33.102/24   00:50:56:bf:c5:6d  default   1500  u/u
eth1         172.16.33.131/24   00:50:56:b3:38:c5  default   1500  u/u

172.16.33.102/24 and 172.16.33.131/24 are stray DHCP addresses.

This commit moved the renew command to the DHCP op-mode script to properly
validate if the interface we request a renew for, has actually a dhcp address
configured. In additional this exposes the renew feature to the API.
</content>
</entry>
<entry>
<title>dhcp-client: T5760: add CLI option to pass user-class parameter</title>
<updated>2023-11-19T20:47:31+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-11-19T20:47:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=260645d0c6ff078cc89601f3a586195902f9c18e'/>
<id>urn:sha1:260645d0c6ff078cc89601f3a586195902f9c18e</id>
<content type='text'>
Example:
set interfaces ethernet eth0 dhcp-options user-class VyOS
or
set interfaces ethernet eth0 dhcp-options user-class 56:79:4f:53
</content>
</entry>
<entry>
<title>dhcp-client: T5760: add constraints for dhclient string options</title>
<updated>2023-11-19T20:43:15+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-11-19T20:43:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=bed1cd01904ef89b5d31bd47de0f230214900f16'/>
<id>urn:sha1:bed1cd01904ef89b5d31bd47de0f230214900f16</id>
<content type='text'>
The string data type specifies either an NVT ASCII string enclosed in double
quotes, or a series of octets specified in hexadecimal, separated by colons.

For example:

set interfaces ethernet eth0 dhcp-options client-id CLIENT-FOO
or
set interfaces ethernet eth0 dhcp-options client-id 43:4c:49:45:54:2d:46:4f:4f

As of now there was no input validation performed.
</content>
</entry>
<entry>
<title>Revert: dhcp: T5428: always release lease from default VRF</title>
<updated>2023-08-17T11:10:38+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-08-17T11:07:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=1a69e9bb4b4e81a6191cb3d48e36542c36a6b763'/>
<id>urn:sha1:1a69e9bb4b4e81a6191cb3d48e36542c36a6b763</id>
<content type='text'>
This reverts commit 9afcea251bdc895ffd49cb11f455fd636fdf817b

A DHCP relese must also be originated from the VRF where the dhclient program is
running, else the RELEASE message can not be send through the interface towards
the DHCP server.

The reason it did not work in the past was because of https://vyos.dev/T5476
</content>
</entry>
<entry>
<title>dhcp: T5428: always release lease from default VRF</title>
<updated>2023-08-07T21:05:12+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-08-07T20:53:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=9afcea251bdc895ffd49cb11f455fd636fdf817b'/>
<id>urn:sha1:9afcea251bdc895ffd49cb11f455fd636fdf817b</id>
<content type='text'>
Otherwise packet can be received in a VRF that was already deleted.
Image of the following CLI commands:

del interface ethernet eth0 address dhcp
del interface ethernet eth0 vrf red
del vrf name red

VRF could be deleted even if dhclient release was not yet completely
processed.
</content>
</entry>
<entry>
<title>dhcpv6: T5428: client renewal fails when running inside VRF</title>
<updated>2023-08-05T07:28:35+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-08-05T07:02:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=8a15595e1ac3d9e3e15f40f8b2256768f8d71f0c'/>
<id>urn:sha1:8a15595e1ac3d9e3e15f40f8b2256768f8d71f0c</id>
<content type='text'>
</content>
</entry>
</feed>
