LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DHCP server (https://www.linuxquestions.org/questions/linux-networking-3/dhcp-server-4175425868/)

varan 09-06-2012 12:04 AM

DHCP server
 
i am new use of centOs and i have a problem regarding dhcp server i will mention full detail so it will be helpful for you all to guide me
i have an internet in organization from private address as there is alos a centOs already running in the organizaiton
i have 2 network cards on the system and my ip on eth0 is 10.10.9.133
with 255.0.0.0 subnet
and i have give ip 10.10.29.1 to my eth1 card as a options routes as i have mention this ip in my dhcpd configuration file for my options routes so my cleint pc will get this as default gateway
here is my dhcp.conf file


subnet 10.10.0.0 netmask 255.0.0.0 {

# --- default gateway
option routers 10.10.29.1;
option subnet-mask 255.0.0.0;

option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 10.10.29.1;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range dynamic-bootp 10.10.33.0 10.10.33.5;
default-lease-time 21600;
max-lease-time 43200;



afer this file i have restart dhcpd service it works fine and also chkconfig service to on dhcpd on all levels it also works fine

i connect my another pc to eth1 card as i want to run dhcp on it for test and then i will run squid but problem start when i get ip 10.10.33.5 and i want to ping this ip from my server error appears destionation host unreachable and from the system which get dhcp ip i want to ping my optios routes ip i-e 10.10.29.1 erros come ot request time out why this is so and if i change my network cables on server mean eth0 to eth1 and eth1 to eth0 ping commands work on both systems mean on client as well on server but after doing this internet on server vanish i also edit file
/etc/sysconfig/dhcpd
where i put
DHCPDARGS=
eth1
to listen on this card for dhcp but not works
i have also edited file /etc/sysconfig/dhcrelay bit it also not works
please let me know how i will fix this problem so my ping result work on both client and server so next i will run squid on server for net sharing on my client pc for practice.

acid_kewpie 09-06-2012 05:42 PM

you're running a /8 netmask??? That's just plain ridiculous! Also ridiculous is having two separate NICS on the same subnet, don't do that, it's not correct, and leads to very broken environments.

varan 09-10-2012 08:15 AM

what i will do know if i will change option routess and all other setting dhcpd error occurrs

acid_kewpie 09-10-2012 08:17 AM

I'm sorry, I don't understand your comment there.

pan64 09-10-2012 08:40 AM

just change it, show the settings and post also the error messages

varan 09-10-2012 08:51 AM

subnet 150.150.0.0 netmask 255.255.0.0 {

# --- default gateway
option routers 150.150.29.1;
option subnet-mask 255.255.0.0;

option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 150.150.29.1;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range dynamic-bootp 150.150.33.0 150.150.33.5;
default-lease-time 21600;
max-lease-time


i have made changes to my dhcpd.conf file as above shown and as soon as i saved them and service dhcpd start it shows FAILED
mean my dhcpd server not working
i have eth0 as discussed previous 10.10.9.133 with subnet 255.0.0.0
i have just question why this not work as now i have change my dhcpd server setting now what i give address to my 2nd nic
please help me out

acid_kewpie 09-10-2012 09:17 AM

150.150.0.0/16?? That's another very very bizarre network choice, it's public for a start, so you can't use it on a private network at all.

If something has failed, check /var/log/messages for the reason why.

It's very hard to work out what you might actually want here at all, maybe a drawing of yoru network would be useful, and let us work out what you need from that? Why are you using 2 nics for a start? a normal DHCP server would have no use for this if you're only serving a single subnet.

varan 09-10-2012 09:50 AM

first of all i am realy thankful for kind reply
ok i want to clear it all so easy for me to understand as well i want to tell you so it will be easy for you to reply
i want to make a dhcpd server then i want to make a squid so i can make my own lab of single pc or may be 5 so what i do for that i have 2 nics for the purpose that on eth0 i will my internet from organization and from eth1 my lab pc local requests come to my server so i will run internet on my lab pcs from my server thats my scenario is
kindly tell me what sequence i will use for dhcpd server


All times are GMT -5. The time now is 10:43 PM.