RE: DHCP static hosts and subnet configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



See "man dhcpd" for the details, but I think it would be something like:

# dhcpd -cf /etc/dhcpd-subnetA.conf -lf
/var/lib/dhcpd/dhcpd-subnetA.leases -pf /var/run/dhcpd-subnetA.pid eth0
# dhcpd -cf /etc/dhcpd-subnetB.conf -lf
/var/lib/dhcpd/dhcpd-subnetB.leases -pf /var/run/dhcpd-subnetB.pid Eth1
-------
JohnStanley Writes:
This works with two NIC CARDS... "dhcp.conf" I promise I really thought I
had posted this earlier but apparently I did not. Filipe is correct for the
cmd line running of it, so heres the .conf to run with two nics.

ddns-update-style ad-hoc

subnet 192.168.2.0 netmask 255.255.255.0 {
    range 192.168.2.XX 192.168.2.XX;
    default-lease-time 7200;
    max-lease-time 21600;
    option routers 192.168.2.XXX;
    option ip-forwarding off;
    option broadcast-address 192.168.2.255;
    option subnet-mask 255.255.255.0;
    option domain-name-servers 64.XX.XX.XX, 64.XX.XX.XX;
  }

subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.XX 192.168.1.XX;
    min-secs 3;
    default-lease-time 7200;
    max-lease-time 21600;
    option routers 192.168.1.X;
    option ip-forwarding off;
    option broadcast-address 192.168.1.255;
    option subnet-mask 255.255.255.0;
    option domain-name-servers 64.XX.XX.XX, 64.XX.XX.XX;
  }

Option to run with two nics from the command line as 2 deamons...

dhcpd -cf /etc/dhcpd-network1 eth0
dhcpd -cf /etc/dhcpd-network2 eth1

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux