DHCP not accepting clients connections???

Issues related to configuring your network
Mohtashim
Posts: 4
Joined: 2017/07/29 18:27:02

DHCP not accepting clients connections???

Postby Mohtashim » 2017/07/30 10:54:04

i want to make my centos6.7 box (kernel-2.6.32-573.el6.x86_64) a router. 'eth0' will act as WAN and 'wlan0' will act as LAN interface. i am using HOSTAPD, DHCPD and BIND packages for this. during installation of 'hostapd', i found out that default kernel has a bug for 'hostapd' so i update my kernel (as shown below), successfully install 'hostapd' and i can scan my SSID (set in 'hostapd.conf' ) from other devices...

kernel-devel-2.6.32-573.el6.x86_64
abrt-addon-kerneloops-2.0.8-34.el6.centos.x86_64
kernel-2.6.32-696.6.3.el6.x86_64
kernel-2.6.32-573.el6.x86_64
kernel-firmware-2.6.32-696.6.3.el6.noarch
kernel-headers-2.6.32-573.el6.x86_64
libreport-plugin-kerneloops-2.0.9-24.el6.centos.x86_64
dracut-kernel-004-409.el6_8.2.noarch


where /etc/sysconfig/network-scripts/ ifcfg-wlan0 is:

DEVICE=wlan0
HWADDR=CC:AF:78:9B:26:55
TYPE=Ethernet
UUID=eb6bf506-eff2-405c-8331-5649ece68143
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=manual
IPADDR=10.1.10.1
NETMASK=255.255.255.0
NETWORK=10.1.10.0
GATEWAY=10.1.10.1
DEFROUTE=yes
BROADCAST=10.1.10.255
DNS1=8.8.8.8
DNS2=8.8.4.4


then i configure 'dhcpd.conf' having following configurations:

#specify domain name
option domain-name "PNetwork.local";

#specify DNS Server IP
option domain-name-servers 8.8.8.8, 8.8.4.4;

#specify Default lease time
default-lease-time 600;

#specify MAX lease time
max-lease-time 7200;

#specify log method
log-facility local7;

authoritative;

subnet 10.1.10.0 netmask 255.255.255.0 {
}

#configure subnet and IP range
subnet 10.1.10.0 netmask 255.255.255.0 {
range 10.1.10.10 10.1.10.200;
option routers 10.1.10.1;
option broadcast-address 10.1.10.255;
option domain-name "PNetwork.local";
option domain-name-servers 8.8.8.8, 8.8.4.4;
}


i also disable SELINUX by configuring '/etc/selinux/config' file...

dhcpd -t shows "Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in config file"

'named.conf' file (BIND package) is not configured because its related to DNS that i will configure later...
service hostapd start and service dhcpd start are running fine...still i am not able to get my other devices connected to router???

User avatar
TrevorH
Forum Moderator
Posts: 21009
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: DHCP not accepting clients connections???

Postby TrevorH » 2017/07/30 14:07:34

i also disable SELINUX by configuring '/etc/selinux/config' file...


Don't do that.

IPADDR=10.1.10.1
GATEWAY=10.1.10.1


How is that ever going to work?

i found out that default kernel has a bug for 'hostapd'


Where did you see that? You really don't want to run anything except kernel-2.6.32-696.6.3.el6.noarch as all previous ones have an extremely serious security vulnerability.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Mohtashim
Posts: 4
Joined: 2017/07/29 18:27:02

Re: DHCP not accepting clients connections???

Postby Mohtashim » 2017/07/30 17:23:25

following changes i made:

Code: Select all

IPADDR=10.1.10.2
GATEWAY=10.1.10.1


Code: Select all

SELINUX=permissive


still getting same result...?

Whoever
Posts: 951
Joined: 2013/09/06 03:12:10

Re: DHCP not accepting clients connections???

Postby Whoever » 2017/07/30 18:08:44

Code: Select all

subnet 10.1.10.0 netmask 255.255.255.0 {
}

#configure subnet and IP range
subnet 10.1.10.0 netmask 255.255.255.0 {
...
}



You appear to have two overlapping subnet blocks, one of which is empty. I suspect that if you restart dhcpd and look in /var/log/messages, you will see some information about this.