Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

container-images/dhcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DHCP Server Container

Description

DHCP (Dynamic Host Configuration Protocol) server provides network configuration for dhcp-clients.

Running in docker

Clone this repository somewhere and build the container:

# docker build -t <username>/dhcpd .

Configure dhcp-server in /etc/dhcp/dhcpd.conf (dhcp-server configuration) and run dhcpd container as root.

# docker run --net=host -v /etc/dhcp/:/etc/dhcp -v /var/lib/dhcpd:/var/lib/dhcpd --name dhcp <username>/dhcpd

Functionality check

If you want to test the functionality, you can do it using dummy interface:

# modprobe dummy
# ip address add 1.2.3.4/24 dev dummy0
# ip link set dev dummy0 up

Add configuration for dummy interface to dhcpd-conf:

subnet 1.2.3.0 netmask 255.255.255.0 {
  range 1.2.3.20 1.2.3.30;
}

Use either pre-installed dhcp-client on your host:

    # /usr/sbin/dhclient -d dummy0

Or use dhcp-client container.

Releases

No releases published

Packages

No packages published