[opensuse] Troubleshooting DHCP server setup?
Hello, I am running Leap. I have two network interfaces, eth0 and wlan0. I use wlan0 for my home LAN which supplies the Internet. I would like to have a DHCP server for eth0 to provide occasional high-speed wired connections for FTP/Samba transfers. I do not need to do any NAT, the link is for local transfers only. I am trying to use the standard OpenSUSE way. I have installed the "DHCP and DNS server" package in yast and am trying to condfigure DHCP in yast. But I get "error occurred while restarting the DHCP daemon". Here is the log with the apparent reason: ==
cat /var/log/rc.dhcpd.log Internet Systems Consortium DHCP Server 4.3.3 Copyright 2004-2015 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file Config file: /etc/dhcpd.conf Database file: /db/dhcpd.leases PID file: /var/run/dhcpd.pid Wrote 0 leases to leases file.
No subnet declaration for eth0 (no IPv4 addresses). ** Ignoring requests on eth0. If this is not what you want, please write a subnet declaration in your dhcpd.conf file for the network segment to which interface eth0 is attached. ** Not configured to listen on any interfaces! If you think you have received this message due to a bug rather than a configuration issue please read the section on submitting bugs on either our web page at www.isc.org or in the README file before submitting a bug. These pages explain the proper process and the information we find helpful for debugging.. exiting. == I did select eth0 in the DHCP config, and its address is 192.168.4.1, static, as shown in yast network settings (but for some reason the address is absent in ifconfig). Here is the content of /etc/dhcpd.conf: = # cat /etc/dhcpd.conf option domain-name "ramendik.local"; ddns-update-style none; default-lease-time 14400; ldap-dhcp-server-cn "ramendik.local"; subnet 192.168.4.0 netmask 255.255.255.0 { range 192.168.4.2 192.168.4.100; default-lease-time 14400; max-lease-time 172800; } = So, apparently a fitting subnet statement exists, but is not applied for eth0. How can I fix this, and what am I doing wrong with yast? -- Yours, Mikhail Ramendik Unless explicitly stated, all opinions in my mail are my own and do not reflect the views of any organization -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
09.08.2016 18:22, Mikhail Ramendik пишет:
I did select eth0 in the DHCP config, and its address is 192.168.4.1, static, as shown in yast network settings (but for some reason the address is absent in ifconfig).
Do you use NetworkManager for wlan0? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Mikhail Ramendik wrote:
I did select eth0 in the DHCP config, and its address is 192.168.4.1, static, as shown in yast network settings (but for some reason the address is absent in ifconfig).
That's what you need for figure out first - why isn't the static address being configured for eth0. -- Per Jessen, Zürich (15.4°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi! Am Dienstag, 9. August 2016, 16:22:54 CEST schrieb Mikhail Ramendik:
I am running Leap.
I have two network interfaces, eth0 and wlan0. I use wlan0 for my home LAN which supplies the Internet. I would like to have a DHCP server for eth0 to provide occasional high-speed wired connections for FTP/Samba transfers. I do not need to do any NAT, the link is for local transfers only.
I suspect you are using wicked for network managing. Since we have wicked all interfaces without a connection do not get an ip number on boot. "on boot" works like "a cable plugin". AFAIK this is not considered a bug, but a feature.
I am trying to use the standard OpenSUSE way. I have installed the "DHCP and DNS server" package in yast and am trying to condfigure DHCP in yast. But I get "error occurred while restarting the DHCP daemon".
When the dhcp server is started it fails because it cannot find an interface with ip number matching your dhcp configuration.
Here is the log with the apparent reason:
==
cat /var/log/rc.dhcpd.log
Internet Systems Consortium DHCP Server 4.3.3 Copyright 2004-2015 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file Config file: /etc/dhcpd.conf Database file: /db/dhcpd.leases PID file: /var/run/dhcpd.pid Wrote 0 leases to leases file.
No subnet declaration for eth0 (no IPv4 addresses). ** Ignoring requests on eth0. If this is not what you want, please write a subnet declaration in your dhcpd.conf file for the network segment to which interface eth0 is attached. **
Not configured to listen on any interfaces!
If you think you have received this message due to a bug rather than a configuration issue please read the section on submitting bugs on either our web page at www.isc.org or in the README file before submitting a bug. These pages explain the proper process and the information we find helpful for debugging..
exiting. ==
I did select eth0 in the DHCP config, and its address is 192.168.4.1, static, as shown in yast network settings (but for some reason the address is absent in ifconfig).
Here is the content of /etc/dhcpd.conf:
= # cat /etc/dhcpd.conf option domain-name "ramendik.local"; ddns-update-style none; default-lease-time 14400; ldap-dhcp-server-cn "ramendik.local"; subnet 192.168.4.0 netmask 255.255.255.0 { range 192.168.4.2 192.168.4.100; default-lease-time 14400; max-lease-time 172800; } =
So, apparently a fitting subnet statement exists, but is not applied for eth0.
Your logs match the situation I described above.
How can I fix this, and what am I doing wrong with yast?
First, your problem shows that the possibility to give an interface an ip number on boot is important. Maybe one should consider a bug report against wicked. Meanwhile you should try another type of network managment: NetworkManager or networkd. Best regards Herbert -- “Only two things are infinite, the universe and human stupidity, and I’m not sure about the former.” Albert Einstein
On 9 August 2016 at 20:32, Herbert Graeber <hgraeber@opensuse.org> wrote:
I suspect you are using wicked for network managing. Since we have wicked all interfaces without a connection do not get an ip number on boot. "on boot" works like "a cable plugin". AFAIK this is not considered a bug, but a feature.
When the dhcp server is started it fails because it cannot find an interface with ip number matching your dhcp configuration.
First, your problem shows that the possibility to give an interface an ip number on boot is important. Maybe one should consider a bug report against wicked.
Where do I file a bug report against wicked? In opensuse bugzilla or somewhere else?
Meanwhile you should try another type of network managment: NetworkManager or networkd.
I do not want to disrupt my wlan0. It broke after some time under NetworkManager for some reason, but works with wicked. (The computer is a stationary desktop machine so I had, so far, no need for NetworkManager's dynamic network selection capability). So, I need to have something plugged into the eth0 adapter and then dhcpd will work... but this m,eans I'll have to restart dhcpd manually after plyuging the thing in. and then hope DHCP still works? Perhaps there is some way to make wicked (or some other component, while wicked runs) start/restart dhcpd after detecting a cable connection and assigning the IP address? Thos would suit me perfectly. Another alternative would be to install and try networkd, but this would be a last resort as I don't want any chance to break wlan0. -- Yours, Mikhail Ramendik Unless explicitly stated, all opinions in my mail are my own and do not reflect the views of any organization -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 9 August 2016 at 20:32, Herbert Graeber <hgraeber@opensuse.org> wrote:
I suspect you are using wicked for network managing. Since we have wicked all interfaces without a connection do not get an ip number on boot. "on boot" works like "a cable plugin". AFAIK this is not considered a bug, but a feature.
Thank you very much for pointing me to this! I have googled and found the solution at https://forums.opensuse.org/showthread.php/504887-Wicked-how-to-setup-a-comp... I have edited the /etc/sysconfig/network/ifcfg-eth0 file and added the following line: LINK_REQUIRED=no Then I rebooted the machine. Now the eth0 interface has an IP address and the DHCP server restarts successfully. So, wicked actually has the feature. But in YaST, you can choose "at boot" yet is't not really at boot. Sounds like a YaST bug to me. Should I file a bug against YaST in opensuse bugzilla? -- Yours, Mikhail Ramendik Unless explicitly stated, all opinions in my mail are my own and do not reflect the views of any organization -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 9 August 2016 at 21:37, Mikhail Ramendik <mr@ramendik.ru> wrote:
So, wicked actually has the feature. But in YaST, you can choose "at boot" yet is't not really at boot. Sounds like a YaST bug to me. Should I file a bug against YaST in opensuse bugzilla?
Filed https://bugzilla.opensuse.org/show_bug.cgi?id=992924 -- Yours, Mikhail Ramendik Unless explicitly stated, all opinions in my mail are my own and do not reflect the views of any organization -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Dienstag, 9. August 2016, 21:37:52 CEST schrieb Mikhail Ramendik:
On 9 August 2016 at 20:32, Herbert Graeber <hgraeber@opensuse.org> wrote:
I suspect you are using wicked for network managing. Since we have wicked all interfaces without a connection do not get an ip number on boot. "on boot" works like "a cable plugin". AFAIK this is not considered a bug, but a feature.
Thank you very much for pointing me to this! I have googled and found the solution at https://forums.opensuse.org/showthread.php/504887-Wicked-how-to-setup-a-comp letely-static-configuration
I have edited the /etc/sysconfig/network/ifcfg-eth0 file and added the following line:
LINK_REQUIRED=no
Really helpful... That's useful a workaround. I have already search for some solution some time ago and found nothing... Thank you.
Then I rebooted the machine. Now the eth0 interface has an IP address and the DHCP server restarts successfully.
So, wicked actually has the feature. But in YaST, you can choose "at boot" yet is't not really at boot. Sounds like a YaST bug to me. Should I file a bug against YaST in opensuse bugzilla?
I have seen you already file a bug. I think "onboot" should set the option above. So everything behaves as in pre-wicked times. Herbert
participants (4)
-
Andrei Borzenkov
-
Herbert Graeber
-
Mikhail Ramendik
-
Per Jessen