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 shown here:
Because we previously installed Samba, your media server will also show up in the networks list of your control panel. Depending on your version of Windows, it may look different from the following screenshot:
The following screenshot is a screen grab from my Windows XP laptop, which has connected wirelessly to my multimedia server. We can now play music and stream various kinds of videos to the laptop. (Note the IP address shown in the address bar.)
Now that we have everything up and running, it is time to add some wireless security to our media server. This isn't absolutely necessary, if your server will not be permanently connected to your home network, but I highly recommend that you do it.
The following portion of hostapd.conf
shows the security part of the file:
#############Security Starts Here######################## # # Static WPA2 key configuration # #1=wpa1, 2=wpa2, 3=both # #wpa=2 ## wpa_passphrase=yourpassword ## Key management algorithms ## ## wpa_key_mgmt=WPA-PSK
The first few lines are where we enable WPA
/WPA2
:
For more information on WEP/WPA/WPA2, just follow http://en.wikipedia.org/wiki/Wi-Fi_Protected_Access.
## Set cipher suites (encryption algorithms) ## ## TKIP = Temporal Key Integrity Protocol ## CCMP = AES in Counter mode with CBC-MAC wpa_pairwise=TKIP #rsn_pairwise=CCMP # ## Shared Key Authentication ## auth_algs=1
For information on TKIP, check out http://en.wikipedia.org/wiki/Temporal_Key_Integrity_Protocol.
Next, we can set up MAC address filtering:
## Accept all MAC address ### macaddr_acl=0
Finally, we can choose to broadcast our SSID.
This option is a bit strange. What we are saying is don't ignore broadcasting the SSID; in other words, broadcast the SSID. It is a kind of double negative:
#enables/disables broadcasting the ssid ignore_broadcast_ssid=0 # Needed for Windows clients eapol_key_index_workaround=0
I will suggest that you enable these features one at a time and check the operation between changes.