LinuxQuestions.org
Review your favorite Linux distribution.
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 03-03-2008, 10:32 AM   #1
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Rep: Reputation: 32
DHCP server / PXE boot


Hi,

I'm using the distro Centos 5.1 and want it to be have a dhcp server so that machines connected to it can nfs boot from it.

I have two ethernet cards:
eth0: gets an dhcp address from the outside world. It should not be conflicted with the other card regarding dhcp server.
Code:
eth0      Link encap:Ethernet  HWaddr 00:01:02:24:68:37  
          inet addr:172.25.2.68  Bcast:172.25.255.255  Mask:255.255.0.0
          inet6 addr: 2001:1:1234:0:201:2ff:fe24:6837/64 Scope:Global
          inet6 addr: fe80::201:2ff:fe24:6837/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:19196 errors:0 dropped:0 overruns:1 frame:0
          TX packets:6142 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5662500 (5.4 MiB)  TX bytes:1115875 (1.0 MiB)
          Interrupt:9 Base address:0xc00
eth1 has the following setup:
Code:
eth1      Link encap:Ethernet  HWaddr 00:1B:21:0E:66:26  
          inet addr:192.168.0.254  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:21ff:fe0e:6626/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:352 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:209088 (204.1 KiB)  TX bytes:4386 (4.2 KiB)
          Base address:0x6800 Memory:feda0000-fedc0000
And the route table looks like this:
Code:
192.168.0.0     *               255.255.255.0   U     0      0        0 eth1
172.25.0.0      *               255.255.0.0     U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth1
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth1
default         172.25.0.254    0.0.0.0         UG    0      0        0 eth0
The dhcpd.conf looks like this:
Code:
# dhcpd.conf
#
deny unknown-clients;
ddns-update-style none;
allow bootp;

subnet 192.168.0.0 netmask 255.255.255.0
{
  default-lease-time      1209600;        # two weeks
  max-lease-time          31557600;       # one year
  option routers 192.168.0.1;

  group
  {
    host cb6
    {
      hardware ethernet 00:a0:a5:5d:ad:81;
      fixed-address 192.168.0.6;

      # MVL installation image root
      option root-path
      "/opt/os_images/mv_cge_4.0.1/cge/devkit/x86/pentium4/target";

      filename "pxelinux.0";              # Relative to TFTP root
    }

    host cb9
    {
      hardware ethernet 00:a0:a5:5d:ad:ec;
      fixed-address 192.168.0.9;

      # MVL installation image root
      option root-path
      "/opt/os_images/mv_cge_4.0.1/cge/devkit/x86/pentium4/target";

      filename "pxelinux.0";              # Relative to TFTP root
    }
  }
}
Now, When I boot the target with the mac address to cb6 I get the following message in the /var/log/messages:
Code:
Mar  3 17:28:08 AccServer kernel: e1000: eth1: e1000_watchdog_task: NIC Link is Down
Mar  3 17:28:10 AccServer kernel: e1000: eth1: e1000_watchdog_task: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
Mar  3 17:28:15 AccServer dhcpd: DHCPDISCOVER from 00:a0:a5:5d:ad:81 via eth1: network 192.168.0.0/24: no free leases
Does anyone know why?

Thanks a million
Indy
 
Old 03-03-2008, 05:15 PM   #2
harry edwards
Member
 
Registered: Nov 2007
Location: Lincolnshire, UK
Distribution: CentOS, Fedora, and Suse
Posts: 365

Rep: Reputation: 48
I've found this:

Quote:
After adding my 2nd network card, I noticed dhcpd wasn't working anymore.

If more than one network card resides in the DHCP server, it is recommended to specify which interface(s) the DHCP server will use. Edit /etc/sysconfig/dhcpd by adding the appropriate interface to the DHCPDARGS= line. The entry in /etc/sysconfig/dhcpd should appear as follows:

DHCPDARGS=eth0
Also, here are several means for debugging dhcpd in no particular order:

* /usr/sbin/dhcpd -d -f
* tail -f /var/lib/dhcpd.leases
* tail -f /var/log/messages
 
Old 03-04-2008, 02:31 AM   #3
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Original Poster
Rep: Reputation: 32
[solved]

Thanks Harry,

That did the trick. Cheers.

Indy
 
  


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
pxe boot "PXE-T01 file not found" ssharma_02 Linux - Networking 16 05-18-2011 03:21 PM
dhcp - PXE booting icedude Linux - Enterprise 10 09-28-2010 05:36 AM
Why my pxe clinet doesnt get ip address from DHCP server? maya_mason Red Hat 1 11-27-2006 08:16 PM
PXE/Boot Server with Static IP clients asmar Linux - Networking 0 08-17-2006 02:25 PM
DHCP vs PXE woes :S kevingpo Linux - Networking 2 11-05-2005 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration