Changes

Jump to: navigation, search
/* TFTP server */
Jan 23 05:35:05 denis-linux tftpd-hpa[2539]: ...done.
Jan 23 05:35:05 denis-linux systemd[1]: Started LSB: HPA's tftp server.
</pre>
 
== DHCP server ==
<pre>
$ sudo apt install isc-dhcp-server
</pre>
 
* Edit configuration file: /etc/network/interfaces
<pre>
auto lo
iface lo inet loopback
 
auto eth1
iface eth1 inet static
address 10.0.0.1
netmask 255.255.255.0
network 10.0.0.0
broadcast 10.0.0.255
</pre>
 
* Reload networking service and verify it's running:
<pre>
$ sudo systemctl restart networking
$ systemctl status networking
$ systemctl status networking
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Active: active (exited) since Wed 2019-01-23 06:00:57 EST; 43min ago
Docs: man:interfaces(5)
Process: 4835 ExecStop=/sbin/ifdown -a --read-environment --exclude=lo (code=exited, status=0/SUCCESS)
Process: 4856 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
Process: 4851 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
Main PID: 4856 (code=exited, status=0/SUCCESS)
 
Jan 23 06:00:57 denis-linux systemd[1]: Starting Raise network interfaces...
Jan 23 06:00:57 denis-linux systemd[1]: Started Raise network interfaces.
</pre>
 
* Edit configuration file: /etc/default/isc-dhcp-server
<pre>
INTERFACESv4="eth1"
</pre>
 
* Edit configuration file: /etc/dhcp/dhcpd.conf
<pre>
default-lease-time 600;
max-lease-time 7200;
 
allow booting;
allow bootp;
 
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.2 10.0.0.254;
option subnet-mask 255.255.255.0;
option domain-name-servers 10.0.0.1;
option routers 10.0.0.1;
option broadcast-address 10.0.0.255;
filename "grubx64.efi";
}
</pre>
 
 
 
* Reload isc-dhcp-server service and verify it's running:
<pre>
$ sudo systemctl restart isc-dhcp-server
$ systemctl status isc-dhcp-server
● isc-dhcp-server.service - ISC DHCP IPv4 server
Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-01-23 06:01:01 EST; 2s ago
Docs: man:dhcpd(8)
Main PID: 4999 (dhcpd)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/isc-dhcp-server.service
└─4999 dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf
 
Jan 23 06:01:01 denis-linux dhcpd[4999]: Sending on LPF/eth1/00:01:c0:1c:a8:11/10.0.0.0/24
Jan 23 06:01:01 denis-linux dhcpd[4999]:
Jan 23 06:01:01 denis-linux dhcpd[4999]: No subnet declaration for eth0 (192.168.84.51).
Jan 23 06:01:01 denis-linux dhcpd[4999]: ** Ignoring requests on eth0. If this is not what
Jan 23 06:01:01 denis-linux dhcpd[4999]: you want, please write a subnet declaration
Jan 23 06:01:01 denis-linux dhcpd[4999]: in your dhcpd.conf file for the network segment
Jan 23 06:01:01 denis-linux dhcpd[4999]: to which interface eth0 is attached. **
Jan 23 06:01:01 denis-linux dhcpd[4999]:
Jan 23 06:01:01 denis-linux dhcpd[4999]: Sending on Socket/fallback/fallback-net
Jan 23 06:01:01 denis-linux dhcpd[4999]: Server starting service.
</pre>
326
edits