Hello everyone,
I currently have a computer which I run a dhcp and dns server on. It serves my home network and does a pretty good job of it. What I want to do is extend this servers functionality so that I can PXE boot of it's second NIC. I think that I will use a cross-over cable to connect the target system with the PXE server. Also, I'm attempting statically assigned dhcp, so the ifcfg-ethX files use dhcp but the dhcpd assigns static addresses. I'm slightly confused about a few things.
1) I think that I want two subnets, one for each NIC. I.e. 192.168.1.x for the general purpose home network and 192.168.3.x for the PXE server and client. The only reason that I'd can think to do this is just for organization, so that when a client has a 192.168.3.x IP I know he's connected to the correct NIC. Does this sound right?
2) Frankly I'm confused about the syntax of the dhcpd.conf file and how I associate a subnet with a NIC. I thought that using the MAC address I'd be able to force a NIC into a certian subnet but I must be missing something. I would think that without the PXE NIC connected to anything it should be able to give itself an address. However, I know that NICs broadcast the dhcp request, so maybe if the NIC isn't connected it can't broadcast correctly. Here is my dhcpd.conf and ifcfg-eth0, when I restart the eth0 interface it doesn't get an IP. Am I doing something obviously wrong?
[rwlove@LOVE_file ~]$ cat /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option ip-forwarding off;
# option nis-domain "LOVESHACK.org";
option domain-name "LOVESHACK.org";
option domain-name-servers 192.168.1.201;
# option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
option netbios-name-servers 192.168.1.201;
# --- 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 192.168.1.200 192.168.1.254;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
# gigabit nic interface
host LOVE_file {
hardware ethernet 00:0E:0C:65:1E:18;
fixed-address 192.168.1.201;
option host-name "LOVE_file.LOVESHACK.org";
}
# Eth0 interface
# hardware ethernet 00:07:E9:EF:7C:8B;
host MythTVClient {
hardware ethernet 00:50:70:26:4F:9E;
fixed-address 192.168.1.202;
}
host LOVE_media {
hardware ethernet 00:11:95:B9:27
9;
fixed-address 192.168.1.203;
}
host LOVE_mobile {
hardware ethernet 00:90:4B:12:31:26;
fixed-address 192.168.1.204;
}
host PictureFrame {
hardware ethernet 00:03:47:B4:7F:5F;
fixed-address 192.168.1.205;
}
host TrueMobile2300 {
hardware ethernet 00:90:4b:35:29:9a;
hardware ethernet 00:90:4b:35:29:9b;
fixed-address 192.168.1.206;
}
}
subnet 192.168.3.0 netmask 255.255.255.0 {
allow booting;
allow bootp;
range dynamic-bootp 192.168.3.0 192.168.3.10;
# --- default gateway
option routers 192.168.3.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.3.255;
option ip-forwarding off;
# option nis-domain "LOVESHACK.org";
option domain-name "LOVESHACK.org";
option domain-name-servers 192.168.3.1;
# option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
option netbios-name-servers 192.168.3.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 192.168.3.1 192.168.3.10;
default-lease-time 21600;
max-lease-time 43200;
option domain-name "LOVESHACK.org";
host PXEServer {
hardware ethernet 00:07:E9:EF:7C:8B;
fixed-address 192.168.3.1;
option host-name "PXEServer";
}
filename "pxelinux.0";
}
[root@LOVE_file ~]# ifconfig eth0 down ; ifconfig eth0 up
[root@LOVE_file ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:07:E9:EF:7C:8B
inet6 addr: fe80::207:e9ff:feef:7c8b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:306 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:63670 (62.1 KiB) TX bytes:896 (896.0 b)
eth1 Link encap:Ethernet HWaddr 00:0E:0C:65:1E:18
inet addr:192.168.1.201 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20e:cff:fe65:1e18/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:108255131 errors:3 dropped:0 overruns:0 frame:2
TX packets:116303168 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2564484497 (2.3 GiB) TX bytes:527943314 (503.4 MiB)
Base address:0xdf00 Memory:feac0000-feae0000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:48028027 errors:0 dropped:0 overruns:0 frame:0
TX packets:48028027 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:911761205 (869.5 MiB) TX bytes:911761205 (869.5 MiB)
Thanks in advance!!
//Rob