LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ADSL DHCP A-OK, but Mandrake 10.1 to be DHCP for other subnet is a problem (https://www.linuxquestions.org/questions/linux-networking-3/adsl-dhcp-a-ok-but-mandrake-10-1-to-be-dhcp-for-other-subnet-is-a-problem-355100/)

turnbui 08-20-2005 03:17 AM

ADSL DHCP A-OK, but Mandrake 10.1 to be DHCP for other subnet is a problem
 
Hi again folks,
I have finally got my Mandrake 10.1 to connect to the internet and Smaba is up & running. However, I am having trouble getting eth2 to serve up DHCP to an XP box hanging off my Linux.
Once I've rebooted and logged in it all works fine.
I mean I have to give eth2 a STATIC IP and then start dhcpd but it works fine.
Why I can't do this at bnoot time is beyond me.

As I understand it to have Linux as a DHCP server on the eth2 subnet eth2 needs a STATIC IP and the machine off eth2 set to Obtain IP Dynamically. Is this correct?

It's just at boot time I don't seem to set a STATIC IP on eht2 long enough for when dhcpd is started. As eth2 doesn't have an IP dhcpd fails to start - not configured to listen on any interface!! It may be that DHCPD itself is causing the STATIC IP to disappear?
I tried to hack the /etc/init.d/network script to set up an IP and it appears to do this but then when dhcpd comes along the IP disappears.
I shouldn't have to hack this script rea;;y.
First I tried putting in
ifconfig eth2 down
ifconfig eth2 192.168.4.1
ifconfig eth2 up
in /etc/rc.local but this was too late - DHCPD had been started by this time.
During boot I set up eth0 with a STATIC IP and it is BOOTPROTO=STATIC and this setting remains Ok. Just on eth2 where BOOTPROTO=DHCP is where I'm having a problem.
Is there a network config file for doing this?

Can anyone help please?

Ike M. 08-20-2005 09:07 AM

DHCP
 
I am assuming that by ´hanging off' that you mean that you are using your LINUX box to provide internet connection sharing for XP? If that is the case, then you should not need to be using DHCP on your XP box. The minute that you enable that on your XP share, any statically configuration you had disappears.
You should ONLY need to have DHCP on one machine at your house. Once your connection sharer gets the DHCP info from ISP and you are on line, anything that is in your own subnet should be statically configured (theoretically you could be using DHCP on your subnet, however it is not really necessary for only ONE machine. The protocol was intended to save time when configuring many machines over and over). the 192.168.*.* should be adequate

turnbui 08-20-2005 09:34 AM

Thanks for your reply
 
Thanks for your explanation. Yes, I agree but my purpose is to learn. We have 6 machines in house. 3 XP's connected to first 3 ports of a 4 port D504T router serving DHCP on 192.168.1.0/24.
Fourth port to my Linux same subnet. I then have 2 other NICs in my Linux machine each one connected to an XP box on 2 other subnets 192.168.3.0/24 and 192.168.4.0/24.
If the XP machine connected to eth2 on which I want Linux to serve DHCP to is turned off then Linux boots OKish but I have to hack rc.local to give it a STATIC IP - not the best way to go.
If the XP machine is on then the verbose Linux boot shows it issuing the "bringing up eth2:" message and sits there for 1 minute till it times out and gives [ERROR].
This is the first problem I'd like to tackle.
Once Linux is up I can enable the DHCPD daemon/service and the XP gets an IP from Linux.
Unfortunately the STATIC IP on eth2 also gets served an IP as soon as I enable the service!! It also
gets a seving when that lease expires!!
This is the second problem I'd like to deal with!
As I said this is all in aid of learning but I do take your earlier point and agree.
However, I'm hoping that what I'm trying to accomplish is at kleast feasible?

Cheers,


All times are GMT -5. The time now is 02:15 PM.