centos 6.2 problems with dhcp

kenzow97
Posts: 10
Joined: 24 Dec 2015, 10:15

centos 6.2 problems with dhcp

Post by kenzow97 » 24 Dec 2015, 10:28

hellow kinda new here.. i need some help on setting up erPxe on Centos distro. i installed 6.2 ent as my host machine running erpxe. follow all the instructions on wiki erpxe. almost done until i stumble in the dhcp side. when i test boot a client pc it dosent assign or get an ip adress.. its just a traditional modem router with wirelss lan. not using ddwrt or others...but i tried some firewall router appliance.., then what happens the client pc can get an ip addr, but it stuck on tftp stage....need help i need this on our home simple network laboratry

thanks :-)

kenzow97
Posts: 10
Joined: 24 Dec 2015, 10:15

Re: centos 6.2 problems with dhcp

Post by kenzow97 » 24 Dec 2015, 10:33

i also tested with dnsmasq...but im not sure if may config is right..i disabled dhcp server on my router, and trying to setup dnsmasq as dhcp..not sure if its correct. need some help thanks

RaveMaker
Posts: 204
Joined: 21 Mar 2013, 20:11

Re: centos 6.2 problems with dhcp

Post by RaveMaker » 24 Dec 2015, 19:12

If you can't set the config in your router best way is to use CentOS dhcpd.
http://erpxe.org/DHCP_Configuration

you can use dhcpd config included with ERPXE:

Code: Select all

yum install dhcp

cp /tftpboot/bin/setup/erpxe-dhcpd.conf /etc/dhcpd.conf

service dhcpd start
chkconfig dhcpd on
you can edit the file to set it to your own network configuration

kenzow97
Posts: 10
Joined: 24 Dec 2015, 10:15

Re: centos 6.2 problems with dhcp

Post by kenzow97 » 26 Dec 2015, 19:27

thanks for the reply....follwed every instructions...stll my dhcp with centos fails..do i need to disable Selinux? thanks

RaveMaker
Posts: 204
Joined: 21 Mar 2013, 20:11

Re: centos 6.2 problems with dhcp

Post by RaveMaker » 27 Dec 2015, 18:19

don't disable SELinux just run this command:

Code: Select all

restorecon -r /tftpboot
Im not sure the issue is your dhcp, most likely something with tftp configuration.
can you post more details like:
your server ip address
dhcp server config file
screen shot where the client hangs after boot

also check '/var/log/messages' for any tftp/dhcp related issues and post if there is any error

kenzow97
Posts: 10
Joined: 24 Dec 2015, 10:15

Re: centos 6.2 problems with dhcp

Post by kenzow97 » 28 Dec 2015, 16:27

ohh i forgot to execute that the -r config in the terminal..sprry too bad me...i thought the last part was the samba Set password for user "root" to your password:

smbpasswd -a root

tested it with a dedicated pc and running vmware... , anyway im guessing its my dhcp settings coz my network is running dhcp mode its not disabled...i think it will contradict if my router dhcp is not off. and running another dhcp service with centos..hmm how abou this turning off DHCP on the router, manually IPing the GW router to .1, manually IPing the PXE server to ., and just use the PXE server for DHCP?? thanks

kenzow97
Posts: 10
Joined: 24 Dec 2015, 10:15

Re: centos 6.2 problems with dhcp

Post by kenzow97 » 28 Dec 2015, 16:32

my dhcp

gateway - 192.168.1.1
ipaddr - 192.168.1.50
network - 192.168.1.0
rannge - 192.168.1.100 192.168.1.140

i forgot and i miss the settings on the main router its oon dhcp mode...i need to disbaled? no need for dnsmasqng if i turn off dhcp on my router?
running single network interface card with dhcp turned off? with centos dhcp server is it correct?> or im missing something...if its coreect il test this settings in a while, what if two nic card and my External IP for nic 1 and nic 2 is set to static <private internal ip>

thanks

RaveMaker
Posts: 204
Joined: 21 Mar 2013, 20:11

Re: centos 6.2 problems with dhcp

Post by RaveMaker » 29 Dec 2015, 16:36

first you need disable dhcp on your router.
second edit the dhcp config file in /etc/dhcp.conf to reflect your network and restart dhcp server. (you'll need to change 10.0.0.. to 192.168.1..)
no need for dnsmasq with this configuration.
keep using the old router as gateway - no need for two network interfaces on your pc.

also check '/var/log/messages' for tftp errors in your server

kenzow97
Posts: 10
Joined: 24 Dec 2015, 10:15

Re: centos 6.2 problems with dhcp

Post by kenzow97 » 01 Jan 2016, 18:35

back again. happy new year

i tested again with virtualized mode and the host machine. this is what my setup goes.
192.168.3.254 - gateway , dhcp server is disabled frm the router
192.168.3.100 - ip addrr of the host machine

----------------------------------------------->

centos 6.2 vms
192.168.3.101 - ipaddress guest machine centos
192.168.3.0 - network
192.168.3.120 - 192.168.3.145 - range
next-server - 192.168.3.101 , with pxelinux.0 as bootfile
.......

in my network setup under virtualbox or vmware , if i set "Nat mode" single interface i cant reach or ping the gateway of the router..., then i decided to shift to bridge interface mode...then i can ping the router...,for the guest machine runinng centos.. then i tested it pxebooting with all types of modes bridge nat , nat network internal network still i got a tftp permission denied...then...the gateway is still 10.0.2.4....hmmm why its getting back to 10.0.2.4 as the gateway since the guest machine can ping the gateway...when i execute service dhcpd restart its getting unrecognized service... i need help
thanks

kenzow97
Posts: 10
Joined: 24 Dec 2015, 10:15

Re: centos 6.2 problems with dhcp

Post by kenzow97 » 01 Jan 2016, 18:40

im guessing i have some misconfigurations with my dhcpd configs...i have sokme spare routers here...i can test it with no dhcp server running and il just adjust my dhcpd.conf if you have some sample of working dhcpd.conf if its okay? i followed already all of the instructions from ubuntu , ...im stuck with dhcp conf :(... il just need the dhcp.conf and il just adjust the conf with my own conf in my router.

thanks

Post Reply