From 86bc93a8e434bbdbc283bc7914af0e602e5dfa8c Mon Sep 17 00:00:00 2001 From: Louis Depres Date: Thu, 3 Mar 2022 10:26:50 +0100 Subject: [PATCH] premier commit : tp DHCP --- Sio1/SISR1/10-DHCP/hostname | 1 + Sio1/SISR1/10-DHCP/hosts | 7 +++++++ Sio1/SISR1/10-DHCP/interfaces | 16 ++++++++++++++++ Sio1/SISR1/10-DHCP/isc-dhcp-server | 18 ++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 Sio1/SISR1/10-DHCP/hostname create mode 100644 Sio1/SISR1/10-DHCP/hosts create mode 100644 Sio1/SISR1/10-DHCP/interfaces create mode 100644 Sio1/SISR1/10-DHCP/isc-dhcp-server diff --git a/Sio1/SISR1/10-DHCP/hostname b/Sio1/SISR1/10-DHCP/hostname new file mode 100644 index 0000000..b74a19b --- /dev/null +++ b/Sio1/SISR1/10-DHCP/hostname @@ -0,0 +1 @@ +ServDHCP diff --git a/Sio1/SISR1/10-DHCP/hosts b/Sio1/SISR1/10-DHCP/hosts new file mode 100644 index 0000000..c7bb7ca --- /dev/null +++ b/Sio1/SISR1/10-DHCP/hosts @@ -0,0 +1,7 @@ +127.0.0.1 localhost +127.0.1.1 ServDHCP + +# The following lines are desirable for IPv6 capable hosts +::1 localhost ip6-localhost ip6-loopback +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters diff --git a/Sio1/SISR1/10-DHCP/interfaces b/Sio1/SISR1/10-DHCP/interfaces new file mode 100644 index 0000000..0949457 --- /dev/null +++ b/Sio1/SISR1/10-DHCP/interfaces @@ -0,0 +1,16 @@ +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +source /etc/network/interfaces.d/* + +# The loopback network interface +auto lo +iface lo inet loopback + +# The primary network interface +allow-hotplug enp0s3 +iface enp0s3 inet dhcp + +allow-hotplug enp0s8 +iface enp0s8 inet static + address 192.168.2.1/24 diff --git a/Sio1/SISR1/10-DHCP/isc-dhcp-server b/Sio1/SISR1/10-DHCP/isc-dhcp-server new file mode 100644 index 0000000..7da11f6 --- /dev/null +++ b/Sio1/SISR1/10-DHCP/isc-dhcp-server @@ -0,0 +1,18 @@ +# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server) + +# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf). +DHCPDv4_CONF=/etc/dhcp/dhcpd.conf +#DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf + +# Path to dhcpd's PID file (default: /var/run/dhcpd.pid). +DHCPDv4_PID=/var/run/dhcpd.pid +#DHCPDv6_PID=/var/run/dhcpd6.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". +INTERFACESv4="enp0s8" +#INTERFACESv6=""