Difference between revisions of "DHCP server"

From ArmadeusWiki
Jump to: navigation, search
(Installation)
Line 2: Line 2:
  
 
==Installation==
 
==Installation==
DHCP server recommended for embedded usage is ''dnsmasq''. If you have a recent [OPOS6UL] BSP, then it is installed by default. Otherwise:
+
DHCP server recommended for embedded usage is ''dnsmasq''. If you have a recent [[OPOS6UL]] BSP, then it is installed by default. Otherwise:
 
<pre class="host">
 
<pre class="host">
 
$ make menuconfig
 
$ make menuconfig
Line 22: Line 22:
 
==Usage==
 
==Usage==
 
* ''dnsmasq'' is automatically launch at system startup, when ''/etc/dnsmasq.conf'' configuration file exists.
 
* ''dnsmasq'' is automatically launch at system startup, when ''/etc/dnsmasq.conf'' configuration file exists.
So take your favorite text editor and create ''/etc/dnsmasq.conf'' with following informations (adapt interface name & IP addresses to the network you want to setup):
+
So take your favorite text editor and create ''/etc/dnsmasq.conf'' with following informations (adapt interface name (here ''usb0'' & IP addresses to the network you want to setup):
 
<pre class="apf">
 
<pre class="apf">
interface=usb0
+
interface=usb0                         (wlan0 or uap0 for Wi-Fi AP)
 
dhcp-range=192.168.10.10,192.168.10.20,12h
 
dhcp-range=192.168.10.10,192.168.10.20,12h
 
</pre>
 
</pre>

Revision as of 19:54, 13 December 2017

This page will summarize the steps to install a DHCP server on your APF/OPOS. You might want that kind of server when, for example, your board is configured as a Wi-Fi access point or runs a webserver accessible from USB Network Gadget.

Installation

DHCP server recommended for embedded usage is dnsmasq. If you have a recent OPOS6UL BSP, then it is installed by default. Otherwise:

$ make menuconfig
...
Target packages  --->
    ...
    Networking applications  --->
        ...
        [*] dnsmasq
        [*]   tftp support
        [*]   dhcp support
        [ ]   DNSSEC support
        [ ]   IDN support
        [ ]   conntrack marking support

Usage

  • dnsmasq is automatically launch at system startup, when /etc/dnsmasq.conf configuration file exists.

So take your favorite text editor and create /etc/dnsmasq.conf with following informations (adapt interface name (here usb0 & IP addresses to the network you want to setup):

interface=usb0                         (wlan0 or uap0 for Wi-Fi AP)
dhcp-range=192.168.10.10,192.168.10.20,12h
  • then reboot your board and it should be up and running

Links