[Kea-users] Problem during running DHCP server on VLAN interface

Darren Ankney darren.ankney at gmail.com
Sat Jan 28 19:08:21 UTC 2023


I’m not sure if you can listen directly on a VLAN.  I don’t seem to find the word VLAN in the ARM (https://kea.readthedocs.io/en/kea-2.2.0/).  

Try:

$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 88:ae:dd:08:60:5f brd ff:ff:ff:ff:ff:ff
    altname enp0s31f6

see if your VLAN shows up there and what the interface name is.  You might be able to listen if it shows up in the link list.

You may be able to listen directly on the link that the VLAN is part of with the default raw and it might work (ie: it might ignore the VLAN tagging).  You might be able to specify the physical link + the ip from the VLAN also and have that work.  Have a look here: https://kea.readthedocs.io/en/kea-2.2.0/arm/dhcp4-srv.html#interface-configuration for interface configuration specifics.

> On Jan 28, 2023, at 9:52 AM, Seyyed Hesam Ghasemi <s.hesam.ghasemi at gmail.com> wrote:
> 
> Is it possible to have a DHCP server on a VLAN interface? I tried but I receive "interface doesn't exist" error. Is there any issue with my configuration? 
> 
> I have created a vlan interface with name "vlan10" and ID of 10 on physical interface named "port2":
> user:~# ip a
> 3: port2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
> link/ether 00:0c:29:3d:0e:3c brd ff:ff:ff:ff:ff:ff
> inet 2.2.2.1/24 scope global port2
> valid_lft forever preferred_lft forever
> 20: vlan10 at port2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
> link/ether 00:0c:29:3d:0e:3c brd ff:ff:ff:ff:ff:ff
> inet 1.1.1.1/24 scope global vlan10
> valid_lft forever preferred_lft forever
> 
> user:~# cat /proc/net/vlan/vlan10 
> vlan10 VID: 10 REORDER_HDR: 1 dev->priv_flags: 1021
> total frames received 0
> total bytes received 0
> Broadcast/Multicast Rcvd 0
> 
> total frames transmitted 0
> total bytes transmitted 0
> Device: port2
> INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
> EGRESS priority mappings: 
> root at nsg4-113-120:~#
> 
> 
> 
> I have tried the following json configs and all caused errors but none of them works:
> {
> "command": "config-test",
> "service": [
> "dhcp4"
> ],
> "arguments": {
> "Dhcp4": {
> "control-socket": {
> "socket-name": "/run/kea/socket-v4",
> "socket-type": "unix"
> },
> "interfaces-config": {
> "interfaces": [
> "port2.10"
> ]
> },
> "subnet4": [
> {
> "interface": "port2.10",
> "id": 10,
> "pools": [
> {
> "pool": "2.2.2.10-2.2.2.20"
> }
> ],
> "subnet": "2.2.2.0/24",
> "reservations": [],
> "valid-lifetime": 3600,
> "option-data": [
> {
> "data": "192.168.92.11",
> "code": 6,
> "space": "dhcp4"
> },
> {
> "data": "2.2.2.2",
> "code": 3,
> "space": "dhcp4"
> }
> ]
> }
> ],
> "client-classes": [],
> "option-data": []
> }
> }
> }
> 
> Error: [ { "result": 1, "text": "Failed to select interface: interface 'port2.10' doesn't exist in the system (<wire>:0:609) (<wire>:0:608)" } ]
> 
> 
> 
> 
> 
> 
> {
> "command": "config-test",
> "service": [
> "dhcp4"
> ],
> "arguments": {
> "Dhcp4": {
> "control-socket": {
> "socket-name": "/run/kea/socket-v4",
> "socket-type": "unix"
> },
> "interfaces-config": {
> "interfaces": [
> "vlan01 at port2"
> ]
> },
> "subnet4": [
> {
> "interface": "vlan01 at port2",
> "id": 10,
> "pools": [
> {
> "pool": "2.2.2.10-2.2.2.20"
> }
> ],
> "subnet": "2.2.2.0/24",
> "reservations": [],
> "valid-lifetime": 3600,
> "option-data": [
> {
> "data": "192.168.92.11",
> "code": 6,
> "space": "dhcp4"
> },
> {
> "data": "2.2.2.2",
> "code": 3,
> "space": "dhcp4"
> }
> ]
> }
> ],
> "client-classes": [],
> "option-data": []
> }
> }
> }
> 
> Error: [ { "result": 1, "text": "Failed to select interface: interface 'vlan01 at port2' doesn't exist in the system (<wire>:0:609) (<wire>:0:608)" } ]
> 
> -- 
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
> 
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> 
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users



More information about the Kea-users mailing list