dhcp server over eth1

interfaces:
# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface

#auto eth0

allow-hotplug eth1

# add static settings
iface eth1 inet static
# IP address
  address 10.0.0.30
# network address
  network 10.0.0.0
# subnet mask
  netmask 255.255.255.0
# broadcast address
  broadcast 10.0.0.255
# default gateway
  gateway 10.0.0.1
# name server
  dns-nameservers 10.0.0.10
isc-dhcp-server:

# cat /etc/default/isc-dhcp-server
# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)

# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
#DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf

# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
DHCPDv4_PID=/var/run/dhcpd.pid
#DHCPDv6_PID=/var/run/dhcpd6.pid

# Additional options to start dhcpd with.
#	Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#	Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACESv4="eth1"
INTERFACESv6=""
dhcpd.conf:
# cat /etc/dhcp/dhcpd.conf
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

# option definitions common to all supported networks...
option domain-name "srv.world";
option domain-name-servers 8.8.8.8;

default-lease-time 600;
max-lease-time 7200;

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

subnet 10.0.0.0 netmask 255.255.255.0 {
    # specify default gateway
#    option routers      10.0.0.1;
    # specify subnet-mask
    option subnet-mask  255.255.255.0;
    # specify the range of leased IP address
    range dynamic-bootp 10.0.0.200 10.0.0.254;
}

No comments: