Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dhpc server on vlan #3104

Closed
karidavidsson opened this issue Jun 17, 2023 · 7 comments
Closed

dhpc server on vlan #3104

karidavidsson opened this issue Jun 17, 2023 · 7 comments

Comments

@karidavidsson
Copy link

karidavidsson commented Jun 17, 2023

Describe the issue you are experiencing

Configuring DHCP server on a VLAN (IOT network):

broadcast: 192.168.10.255
gateway: 192.168.10.1
interface: eth0.10
netmask: 255.255.255.0
range_end: 192.168.10.254
range_start: 192.168.10.240
subnet: 192.168.10.0

It fails to start, and outputs the following into the log:

[15:52:12] INFO: Starting DHCP server...
Internet Systems Consortium DHCP Server 4.4.2-P1
Copyright 2004-2021 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcpd.conf line 8: semicolon expected.
  interface eth0.
                 ^
/etc/dhcpd.conf line 9: range declaration not allowed here.
  range 
   ^
/etc/dhcpd.conf line 11: expecting a declaration
  option broadcast-address 192.168.10.255;
                                          ^

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

DHCP Server

What is the version of the add-on?

1.3.0

Steps to reproduce the issue

  1. Create VLAN interface using the ha console : ha > network vlan eth0 10 --ipv4-method static --ipv4-address 192.168.10.1/24 --ipv6-method disabled
  2. Configure the dhcp server via the WebUI using default values but in the Networks section set the interface value to vlan interface, e.g. eth0.10. (And of course adjust IP ranges, see config above)

System Health information

System Information

version core-2023.6.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.4
os_name Linux
os_version 6.1.21-v8
arch aarch64
timezone Atlantic/Reykjavik
config_dir /config
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 10.2
update_channel stable
supervisor_version supervisor-2023.06.2
agent_version 1.5.1
docker_version 23.0.6
disk_total 13.9 GB
disk_used 3.7 GB
healthy true
supported true
board rpi3-64
supervisor_api ok
version_api ok
installed_addons Z-Wave JS (0.1.84), chrony (2.6.0), DHCP server (1.3.0)
Dashboards
dashboards 1
resources 0
mode auto-gen
Recorder
oldest_recorder_run June 17, 2023 at 3:12 PM
current_recorder_run June 17, 2023 at 3:22 PM
estimated_db_size 0.88 MiB
database_engine sqlite
database_version 3.41.2

Anything in the Supervisor logs that might be useful for us?

No response

Anything in the add-on logs that might be useful for us?

No response

Additional information

Works fine if vlan interface is not used.

@MattWestb
Copy link

I dont knowing what is going wrong but its looks being wrong in the parameters you is using.
semicolon expected. interface eth0.
Its complaining of like 8 and 9 but i dont knowing wish parameter is it but one or two of this:
nterface: eth0.10 netmask: 255.255.255.0 range_end: 192.168.10.254 range_start: 192.168.10.240 subnet: 192.168.10.0

@karidavidsson
Copy link
Author

karidavidsson commented Jun 17, 2023

It looks to me that it is the . in eth0.10 that confuses the configuration parser.
I tried to enclose the argument in "" and '' and it does not work, i.e. when Save is pressed in the WebUI the "" or '' are removed.

Looks like line 36 is not returning the correct interface and therefore is line 44 not generating the correct configuration line (with terminating semicolon)

P.S. I fixed the formatting of the code blocks with the config and log output for better reading

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 26, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2023
@stevaedrum
Copy link

It looks to me that it is the . in eth0.10 that confuses the configuration parser. I tried to enclose the argument in "" and '' and it does not work, i.e. when Save is pressed in the WebUI the "" or '' are removed.

Looks like line 36 is not returning the correct interface and therefore is line 44 not generating the correct configuration line (with terminating semicolon)

P.S. I fixed the formatting of the code blocks with the config and log output for better reading

Hi all, I have the same issue with VLAN.

Please @karidavidsson how have you fixed it, could you explain.

Thanks in advance.

@karidavidsson
Copy link
Author

I have not fixed it and do not have a fix.
Disappointed that this is closed without explanation or a workaround.

@stevaedrum
Copy link

@karidavidsson Thanks for your answer.

I trying to find a workaround

@stevaedrum
Copy link

stevaedrum commented Aug 23, 2023

@karidavidsson

Hi, i have find a workaround, please see below it's working for me.
Have a nice day.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants