-
Notifications
You must be signed in to change notification settings - Fork 0
Setup a LAN without a Router (DHCP howto)
acbuynak edited this page Apr 3, 2021
·
1 revision
This knowledge is useful when setting up a LAN (local area network) for our own TCP/IP robot network across a network switch. To ensure that everything connected to the network can communicate with each other we will setup a DHCP server on one device connected to the switch to manage the network.
See the DHCP Wikipedia Page.
Source instructions derived from here.. https://www.linuxfordevices.com/tutorials/ubuntu/dhcp-server-on-ubuntu
$ sudo apt install isc-dhcp-server
... Configure the DHCP Server
$ sudo nano /etc/dhcp/dhcpd.conf
option domain-name "robot_network.lab";
option domain-name-servers 192.168.1.2;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.199;
option routers 192.168.1.2;
}
... Point DHCP Server to a specific hardware interface
$ sudo nano /etc/default/isc-dhcp-server
INTERFACESv4="etho0"
INTERFACESv6=""
... Start DHCP server
$ sudo systemctl restart isc-dhcp-server.service