Option 2:
I have followed the steps on Meyay´s link.
https://hub.docker.com/r/networkboot/dhcpd
1.- The folder data is created
[xr-vm_nodehost_CPU0:/]$ cd data
[xr-vm_nodehost_CPU0:/data]$ ls
dhcpd.conf dhcpd.leases dhcpd.leases~ images
2.-Inside data folder is dhcpd.conf
[xr-vm_nodehost_CPU0:/]$ cd data
[xr-vm_nodehost_CPU0:/data]$ ls
dhcpd.conf dhcpd.leases dhcpd.leases~ images
this is the information in dhcpd.conf
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.0.5, 192.168.0.6;
default-lease-time 43200;
max-lease-time 86400;
range 192.168.0.100 192.168.0.254;
}
This is the step 3 in the link:
1. Run `docker run -it --rm --init --net host -v "$(pwd)/data":/data networkboot/dhcpd eth0`. `dhcpd` will automatically start and display its logs on the console. You can press Ctrl-C to terminate the server.
I did it:
[xr-vm_nodehost_CPU0:/]$ docker run -it --rm --init --net host -v "$(pwd)/data":/data networkboot/dhcpd eth0. dhcpd
/entrypoint.sh: line 71: exec: eth0.: not found
if I put the same command without the interface, I can see all the interfaces of my device are listening:
[xr-vm_nodehost_CPU0:/]$ docker run -it --rm --init --net host -v "$(pwd)/data":/data networkboot/dhcpd
Internet Systems Consortium DHCP Server 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /data/dhcpd.conf
Database file: /data/dhcpd.leases
PID file: /var/run/dhcpd.pid
Wrote 0 leases to leases file.
No subnet declaration for br-ade2bb0dd030 (172.17.0.1).
** Ignoring requests on br-ade2bb0dd030. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface br-ade2bb0dd030 is attached. **
No subnet declaration for BE1002.20 (no IPv4 addresses).
** Ignoring requests on BE1002.20. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface BE1002.20 is attached. **
No subnet declaration for Lo116 (116.16.16.16).
** Ignoring requests on Lo116. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface Lo116 is attached. **
No subnet declaration for Hu0_0_0_2 (no IPv4 addresses).
** Ignoring requests on Hu0_0_0_2. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface Hu0_0_0_2 is attached. **
No subnet declaration for Hu0_0_0_4 (173.1.1.14).
** Ignoring requests on Hu0_0_0_4. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface Hu0_0_0_4 is attached. **
No subnet declaration for Hu0_0_0_5 (173.1.1.17).
** Ignoring requests on Hu0_0_0_5. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface Hu0_0_0_5 is attached. **
No subnet declaration for Hu0_0_0_10 (no IPv4 addresses).
** Ignoring requests on Hu0_0_0_10. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface Hu0_0_0_10 is attached. **
No subnet declaration for Hu0_0_0_23 (no IPv4 addresses).
** Ignoring requests on Hu0_0_0_23. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface Hu0_0_0_23 is attached. **
No subnet declaration for Hu0_0_0_0 (no IPv4 addresses).
** Ignoring requests on Hu0_0_0_0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface Hu0_0_0_0 is attached. **
No subnet declaration for BE1002 (no IPv4 addresses).
** Ignoring requests on BE1002. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface BE1002 is attached. **
No subnet declaration for Lo5 (192.168.1.2).
** Ignoring requests on Lo5. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface Lo5 is attached. **
No subnet declaration for Lo0 (117.96.88.98).
** Ignoring requests on Lo0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface Lo0 is attached. **
Not configured to listen on any interfaces!
If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug. These pages explain the proper
process and the information we find helpful for debugging.
According to my topology, I want to use the interface hun 0/0/0/5, attach the topology
But if I use this interface it doesn´t work
[xr-vm_nodehost_CPU0:/]$ docker run -it --rm --init --net host -v "$(pwd)/data":/data networkboot/dhcpd HundredGigE0/0/0/5. dhcpd
/entrypoint.sh: line 71: /HundredGigE0/0/0/5.: No such file or directory