Sign inSign up

openeuler/dhcp

Sponsored OSS

By openeuler

Updated 2 months ago

Image
0

4.8K

openeuler/dhcp repository overview

Quick reference

DHCP | openEuler

Current dhcp docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.

DHCP, or Dynamic Host Configuration Protocol, is a network management protocol that automatically assigns IP addresses and other network configuration parameters to devices on a network.

Learn more about DHCP on DHCP Website⁠.

The tag of each dhcp docker image is consist of the version of dhcp and the version of basic image. The details are as follows

TagCurrentlyArchitectures
4.4.3-oe2403sp4DHCP 4.4.3 on openEuler 24.03-LTS-SP4amd64, arm64
4.4.3-oe2403sp1DHCP 4.4.3 on openEuler 24.03-LTS-SP1amd64, arm64

Usage

In this usage, users can select the corresponding {Tag} based on their requirements.

  • Pull the openeuler/dhcp image from docker

    docker pull openeuler/dhcp:{Tag}
    
  • Run with an interactive shell

    You can also start the container with an interactive shell to use dhcp.

    docker run -it --rm openeuler/dhcp:{Tag} bash
    
  • Create the dhcpd.conf file

    Add a subnet declaration matching the eth0 interface's IP. For example:

    # Configure subnet based on eth0's IP (172.17.0.7)
    subnet 172.17.0.0 netmask 255.255.0.0 {
      range 172.17.1.100 172.17.1.200;       # Allocatable IP range
      option routers 172.17.0.1;             # Default gateway (modify as needed)
      option domain-name-servers 8.8.8.8;    # DNS server
      default-lease-time 600;                # Default lease time (seconds)
      max-lease-time 7200;
    }
    

    Key Points:

    • The subnet range and netmask must cover eth0's IP(172.17.0.7).
    • If your actual network is 172.17.0.0/24, change the netmask to 255.255.255.0.
  • Specify listening interface(Optional)

    Force binding to eth0 during startup:

    /usr/local/dhcp/sbin/dhcpd -cf /tmp/dhcp/dhcpd.conf eth0 -f
    

    Notes:

    • The -f flag keeps the process in foreground or debugging.
    • Omit -f to run as a background daemon.

Question and answering

If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.

Tag summary

Content type

Image

Digest

sha256:2f9dbf66a

Size

288 MB

Last updated

2 months ago

docker pull openeuler/dhcp

This week's pulls

Pulls:

17

Last week