DHCP server

From Tekkotsu Wiki

Jump to: navigation, search

To control a robot via a wired Ethernet connection from a laptop, you can either set up a static IP address on the robot and use that address to connect to the robot from the laptop, or you can set up a DHCP server on the laptop and have it dynamically assign an address to the robot.

DHCP Server Under Ubuntu Linux

1. Install the dhcp server package on the laptop:

sudo -s
apt-get install dhcp3-server

2. Edit the file /etc/defaults/dhcp3-server on the laptop to read


3. Now we must tell the laptop what IP address to give to the robot. Edit the file /etc/dhcp3/dhcpd.conf on the laptop and add the following at the end:

subnet netmask {
  host my-robot {
     hardware ethernet 01:23:45:67:89:ab;

4. The laptop needs an IP address of its own, so we will assign it a static IP address. Edit the file /etc/network/interfaces on the laptop and add the following at the end:

iface eth0 inet static

5. To make sure the robot is configured to activate its wired Ethernet port and acquire an IP address from the laptop via DHCP, add the following lines to /etc/network/interfaces on the robot:

auto eth0
iface eth0 inet dhcp

Whenever you want to activate the DHCP server, do this on the laptop:

sudo ifup eth0
sudo service dhcp3-server start

Once the robot is connected to the laptop, you can check whether it has acquired an IP address by typing the following in a shell on the robot:

ifconfig eth0

To connect to the robot from the laptop using ssh or ControllerGUI, use the IP address you assigned, e.g., in the example above.

DHCP Server on a Mac

Coming soon.