Skip to content

Instantly share code, notes, and snippets.

@alavit-d
Last active August 31, 2016 17:25
Show Gist options
  • Save alavit-d/1e4858dcf50af28281ad485eb0b95fdd to your computer and use it in GitHub Desktop.
Save alavit-d/1e4858dcf50af28281ad485eb0b95fdd to your computer and use it in GitHub Desktop.
Setup dhcp for Rig

#Setup dhcp for Rig

  • Set static IP on network: ex on enxf01e34002108: sudo ifconfig enxf01e34002108 192.168.50.0
  • Setup file in /etc/dhcp/dhcpd.conf - as options routers ip set IP getting net access
  • Setup correct interface in /etc/default/isc-dhcp-server
  • sudo service isc-dhcp-server restart
  • sudo service isc-dhcp-server status
  • for debug: sudo tcpdump -n -i enxf01e34002108 port bootps or port bootpc
  • for DNS using the google DNS: add /etc/resolvconf/resolv.conf.d/tail

Should be up and running

#
# Sample configuration file for ISC dhcpd for Debian
#
# Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as
# configuration file instead of this file.
#
#
# 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;
# option definitions common to all supported networks...
authoritative;
default-lease-time 600;
max-lease-time 7200;
option domain-name-servers 8.8.8.8, 8.8.4.4;
option domain-name "mydomain.example";
one-lease-per-client true;
get-lease-hostnames true;
subnet 192.168.50.0 netmask 255.255.255.0 {
range 192.168.50.10 192.168.50.100;
range 192.168.50.150 192.168.50.200;
option broadcast-address 192.168.50.255;
option routers 192.168.1.69;
option subnet-mask 255.255.255.0;
}
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local0;
ping-check true;
# Defaults for isc-dhcp-server initscript
# sourced by /etc/init.d/isc-dhcp-server
# installed at /etc/default/isc-dhcp-server by the maintainer scripts
#
# This is a POSIX shell fragment
#
# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
#DHCPD_CONF=/etc/dhcp/dhcpd.conf
# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
#DHCPD_PID=/var/run/dhcpd.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".
INTERFACES="enxf01e34002108 enp3s0"
nameserver 8.8.8.8
nameserver 8.8.4.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment