Book Image

Building Networks and Servers Using BeagleBone

By : Glenn V Veer, William Pretty, Glenn Vander Veer
Book Image

Building Networks and Servers Using BeagleBone

By: Glenn V Veer, William Pretty, Glenn Vander Veer

Overview of this book

Table of Contents (13 chapters)

Installing DHCP


The Dynamic Host Control Protocol (DHCP) is how your computer, tablet, or smartphone gets an IP address when you log on to a network or an access point at your favorite coffee shop.

The first thing to do, once again, is to make sure that we have the latest version of the software installed, with the following commands:

apt-get update
apt-get install isc-dhcp-server

As you can see in the previous screenshot, we have the latest version installed.

Next, we have to edit the configuration file for the DHCP server. For this, we run the following command:

nano /etc/dhcp/dhcpd.conf

Then, we add the following lines:

subnet 192.168.4.0 netmask 255.255.255.0 {
  range 192.168.4.2 192.168.4.10;
}

This is how your dhcp.conf file will look:

#
# Sample configuration file for ISC dhcpd for Debian
#
#
.
.
.
.
subnet 192.168.4.0 netmask 255.255.255.0 {
  range 192.168.4.2 192.168.4.10;
}

Now that we have DHCP configured, we can reboot our BeagleBone and can try to connect to it wirelessly, as...