LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-20-2005, 03:17 AM   #1
turnbui
Member
 
Registered: Jul 2005
Location: UK
Posts: 101

Rep: Reputation: 15
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?
 
Old 08-20-2005, 09:07 AM   #2
Ike M.
Member
 
Registered: Aug 2005
Posts: 60

Rep: Reputation: 15
Post 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
 
Old 08-20-2005, 09:34 AM   #3
turnbui
Member
 
Registered: Jul 2005
Location: UK
Posts: 101

Original Poster
Rep: Reputation: 15
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,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP: Bad subnet number/mask combination OliXNet Linux - Networking 4 01-07-2010 10:17 AM
Mandrake 10.1: "Please test Sagem ADSL modem (DHCP or static) with eagle-usb" Proud Mandriva 3 09-29-2004 03:17 PM
DHCP Subnet Problems Hunza Linux - Networking 14 06-14-2004 03:38 AM
Help Me ! Subnet Selection On Sun 8 Dhcp Server !!!! honganhptit Solaris / OpenSolaris 2 05-25-2004 11:04 PM
unable to get out of my subnet w/o dhcp wendallsan Linux - Networking 8 10-13-2003 02:52 PM


All times are GMT -5. The time now is 09:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration