From 6e2210ca76b8df6449bbd97d5a120d39d77cec95 Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Sat, 6 Apr 2013 15:25:48 +0200 Subject: [PATCH] Adding dnsmasq as an easy alternative DHCP/DNS server --- trb3/trb3qs_configuration.tex | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/trb3/trb3qs_configuration.tex b/trb3/trb3qs_configuration.tex index c104f19..a148b1d 100644 --- a/trb3/trb3qs_configuration.tex +++ b/trb3/trb3qs_configuration.tex @@ -116,6 +116,39 @@ PING trb033 (10.0.0.33) 56(84) bytes of data. rtt min/avg/max/mdev = 0.053/0.062/0.077/0.013 ms \end{lstlisting} +\subsection{dnsmasq as an alternative to ISC dhcpd and DNS over /etc/hosts} + +This section briefly outlines an alternative (and maybe easier and +more comfortable) way to configure the TRB boards. It uses dnsmasq to +provide the IP addresses over DHCP and also automagic DNS resolution. +That means that you need to add only one line for every new TRB board. +We assume that your TRB boards are connected to a network reachable +over \verb!eth1!, and that your PC is the only DHCP server on this +network. This section has also some slightly different IP +configurations, but this is easy to adapt. + +So, starting from the default configuration file +\files{/etc/dnsmasq.conf} on Debian/stable, add the following lines +(or uncomment/change the appropiate existing ones): +\begin{lstlisting}[label=,caption=Changes to /etc/dnsmasq.conf] +interface=eth1 +dhcp-range=192.168.0.0 +dhcp-host=02:00:be:f9:df:37,trb019,192.168.0.19,infinite +dhcp-authoritative +\end{lstlisting} +You can add more TRB boards with appropiate \verb!dhcp-host=! lines. +Now restart dnsmasq to make your changes take effect. Monitor the +successful DHCPACK in \files{/var/log/syslog}. If you have an dhclient +on eth0 (maybe your usual, non-TRB network), you can add your +localhost (i.e. dnsmasq) as the first DNS server by adding (or +uncomment existing): +\begin{lstlisting}[label=,caption=Changes to /etc/dhcp/dhclient.conf] +prepend domain-name-servers 127.0.0.1; +\end{lstlisting} +Now something like \verb!ping trb019! should work nicely. + + + \subsection{Starting TRBnet} [Please also read section GbE Slow-Control (\ref{sec:GbeGettingStarted}) for additional information.] -- 2.43.0