-
-
Save mingderwang/27634642fde4bf6f2a14166eb2fb8cc3 to your computer and use it in GitHub Desktop.
Setup a dhcpd server using docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ddns-update-style none; | |
option domain-name "bimap.co"; | |
option domain-name-servers 208.67.222.222, 208.67.220.220; | |
default-lease-time 86400; | |
max-lease-time 604800; | |
authoritative; | |
# 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 local7; | |
subnet 10.99.1.0 netmask 255.255.255.0 { | |
## dhcp start and end IP range ## | |
range 10.99.1.220 10.99.1.240; | |
option subnet-mask 255.255.255.0; ## subnet | |
option broadcast-address 10.99.1.255; ## broadcast | |
option routers 10.99.1.254; ## router IP | |
host pc1 { | |
hardware ethernet 00:0c:29:2f:d0:dd; | |
fixed-address 10.99.1.99; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ETH=eno1
mkdir /tmp/data
https://gist.githubusercontent.com/mingderwang/27634642fde4bf6f2a14166eb2fb8cc3/raw/97c59e860f54a5dd81b3b765c703831b61cd5572/dhcpd.conf
#sudo ifconfig $ETH 10.99.1.1 up
#sudo ip route add 10.99.1.0/24 via 10.99.1.254
sudo docker run -it --rm --net=host -v "/tmp/data":/data networkboot/dhcpd $ETH