Issues related to configuring your network
-
candinho
- Posts: 6
- Joined: 2018/04/03 11:19:51
Post
by candinho » 2018/04/03 12:01:33
i removed webmin and still get the same error:
Error:
Code: Select all
rocess: 6855 ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid enp2s0 (code=exited, status=1/FAILURE)
Main PID: 6855 (code=exited, status=1/FAILURE)
Apr 03 08:59:33 servidor.camara dhcpd[6855]: you want, please write a subnet declaration
Apr 03 08:59:33 servidor.camara dhcpd[6855]: in your dhcpd.conf file for the network segment
Apr 03 08:59:33 servidor.camara dhcpd[6855]: to which interface enp2s0 is attached. **
config:
Code: Select all
option subnet-mask 255.255.255.0;
# create new
# specify domain name
option domain-name "saosepe.rs.leg.br";
# specify name server's hostname or IP address
option domain-name-servers 8.8.8.8, 8.8.4.4;
# default lease time
default-lease-time 600;
# max lease time
max-lease-time 7200;
# this DHCP server to be declared valid
authoritative;
# specify network address and subnet mask
subnet 192.168.0.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.0.2 192.168.0.19;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
pool {
range 192.168.0.20 192.168.0.199;
}
}
# DHCP TESTE
host DHCP1 {
allow client-updates;
allow unknown-clients;
hardware ethernet a0:f3:c1:01:1d:a2;
}
-
avij
- Retired Moderator
- Posts: 3046
- Joined: 2010/12/01 19:25:52
- Location: Helsinki, Finland
-
Contact:
Post
by avij » 2018/04/03 12:49:48
Looks like you are missing a suitable subnet declaration in your dhcpd.conf file for the network segment to which interface enp2s0 is attached.
-
candinho
- Posts: 6
- Joined: 2018/04/03 11:19:51
Post
by candinho » 2018/04/06 10:56:54
Well that i know as it is stated on the error, but i have no idea how to fix it
-
TrevorH
- Site Admin
- Posts: 33216
- Joined: 2009/09/24 10:40:56
- Location: Brighton, UK
Post
by TrevorH » 2018/04/06 15:51:09
The ip address on your network interface has to be within the subnet of DHCP addresses you aim to serve. With "subnet 192.168.0.0 netmask 255.255.255.0" you will need an interface with an ip address in 192.168.0.0/24 on it.
-
candinho
- Posts: 6
- Joined: 2018/04/03 11:19:51
Post
by candinho » 2018/04/09 10:06:45
TrevorH wrote:The ip address on your network interface has to be within the subnet of DHCP addresses you aim to serve. With "subnet 192.168.0.0 netmask 255.255.255.0" you will need an interface with an ip address in 192.168.0.0/24 on it.
Ty it now works, but for some reason that i don't know the server doesn't share internet connection with clients, any idea why?
Obs: cat /proc/sys/net/ipv4/ip_forward returns 1
-
candinho
- Posts: 6
- Joined: 2018/04/03 11:19:51
Post
by candinho » 2018/04/12 18:32:20
Hi everyone and thank you for all he help, all working now