TWiki
>
CF Web
>
Infrastructure
>
DHCPInCS
(2024-10-30,
MariHassanzada
)
(raw view)
E
dit
A
ttach
---+ The DHCP information system in Computer Science (OBSOLETE) %TOC% ---++ Overview CSCF-CSI provides a DHCP infrastructure for computers, printers and other devices on its networks. This infrastructure consists of multiple redundant DHCP servers available to respond to DHCP requests from clients, coupled with a reservation-generating system (DIPAAS) that extracts the necessary reservation information from the [[https://cs.uwaterloo.ca/cscf/internal/inventory/][CS Inventory system]]. There are three distinct topics for discussion: 1 how clients should configure their computers to use DHCP, including known OS-specific issues 1 troubleshooting ("I'm not getting an address!") 1 details of our DHCP server systems (we use ISC-DHCP "isc-dhcpd-V3.1.3"), including details of DIPAAS -- the reservation-builder application, with operational and developer information By and large, general CSCF staff should not need to interact with the DHCP servers. The reservation-generator checks for updates every minute, and if changes are found, a new reservation file is activated and all of the servers are restarted. For those interested in a detailed description of the DIPAAS program for the purpose of code development or debugging, see the [[https://www.cs.uwaterloo.ca/cscf/internal/edocs/Documentation/DHCP-and-DIPAAS/DIPAAS-plm.pdf][DIPAAS-plm]] document. --- ---++ Client configuration and OS quirks We support three major OS platforms for clients: Ubuntu, Windows and MacOSX. In most cases the client software on these systems does what is expected and there are no known issues for basic functionality (getting a name and IP address). There are some issues with the new "domain-search" directive that the DHCP server provides to clients in order to five a list of domain-names that the client's DNS resolver can use to resolve names. Some systems do not support this at all (MacOSX, Windows), and some will support it as long as the client configuration is appropriate. ---+++ Ubuntu For "modern" versions of dhclient (v3.1.3 and up) will support the domain-search directive if the following option is present in the dhclient.conf file (typically /etc/dhcp3/dhclient.conf): =option domain-search code 119 = string;= This statement should be placed before any of the "request" or "send" directives. The "domain-search" directive modifies the behaviour of the "resolver library" (the OS code that resolves names into IP addresses). The idea is that the domain-search can provide multiple domain-names, and the resolver library can try each name in turn. However, Ubuntu in our environment has a more general problem with the (non-)interaction of the standard !NetworkManager application and the traditional "dhclient with /etc/network/interfaces file", and their effect on the resolver library. The resolver library depends on the file /etc/resolv.conf, and both the methods mentioned above re-write the file. Modifications to the file by hand will be lost. If the "dhclient with interface file" method is used, there resolv.conf rewrite is determined solely by the response from the DHCP server and thus the option statement above is important. If the !NetworkManager method is used, the end-user can modify what the software will write into resolv.conf -- in essence the user can blend the DHCP server information with local custom settings. ---++++ Ubuntu !NetworkManager customization To make domain-search modifications with the !NetworkManager: 1 use the GUI and open "Edit Connections..." 1 select the relevant interface, and "Edit..." 1 choose the "IPv4 Settings" tab 1 choose "Automatic (DHCP) addresses only" from the "Method" box 1 fill in both the "Search domains:" box (space-delimited) and the "DNS Servers:" box 1 save your settings 1 disconnect and reconnect the connection to make the new settings active ---+++ Windows To be determined, connection-specific settings can be used. ---+++ <nop>MacOSX</nop> The !MacOSX DHCP client does not expose the same kind of option settings as Ubuntu, so the only choice for MacOSX users is to override the search-domain setting: It appears that you can choose to over-ride the search domains you receive from DHCP: * System Preference * Network * Advanced * DNS -- may see greyed entries in the Search Domains list. Click "+" and add as many entries as you'd like. Add them in reverse order, so that you end up top-to-bottom with your prioritized list. --- ---++ Our base DHCP server installation We have four DHCP server running in our network, two per building. They run on the same systems as the DNS servers: * Davis Centre %TABLE{ caption="DC DNS/DHCP servers" cellpadding="5" cellspacing=3 headeralign="center,center,left" dataalign="center,center,left" }% | *System* | *IP* | *Location* | | dc-dns-1 | 172.19.32.5 | Linux container on dc-cloud102-c2.cs.uwaterloo.ca | | dc-dns-2 | 172.19.32.6 | Linux container on dc-cloud104-c2.cs.uwaterloo.ca | * Math and Computer %TABLE{ caption="DC DNS/DHCP servers" cellpadding="5" cellspacing=3 headeralign="center,center,left" dataalign="center,center,left" }% | *System* | *IP* | *Location* | | mc-dns-1 | 172.19.47.5 | Linux container on mc-cloud002-c1.cs.uwaterloo.ca | | mc-dns-2 | 172.19.47.6 | Linux container on mc-cloud002-c2.cs.uwaterloo.ca | The basic install is ISC latest (as of December 2011) stable DHCP Ubuntu package, which is v3.1.3. To install: <verbatim> apt-get install --install-recommends dhcp3-server </verbatim> We use all the installation defaults. Of note: * =/etc/dhcp3= contains the configuration file =dhcpd.conf=. In our setup, this is a simple include of the DIPAAS-generated configuration file (located in =/etc/dhcp3/cscfdhcp/dipaas/etc=). * logging goes to =/var/log/daemonlog=. A really useful command for monitoring DHCP activity in the log is: <verbatim> tail -f /var/log/daemon.log | grep dhcpd </verbatim> * the service is controlled by =/etc/init.d/dhcp3-server=, which supports the usual arguments (status, restart, start, stop) Local login to these systems is not supported. Log in as root from cscf.cs.uwaterloo.ca. When necessary to become userid "cscfdhcp" (see following discussions), use =`su - cscfdhcp`=. ---+++ Information for developers of DIPAAS For those interested in a detailed description of the DIPAAS program for the purpose of code development or debugging, see the [[https://www.cs.uwaterloo.ca/cscf/internal/edocs/Documentation/DHCP-and-DIPAAS/DIPAAS-plm.pdf][DIPAAS-plm]] ("program logic manual") document. --- ---++ Troubleshooting ---+++ Network configuration If a client workstation is failing to be assigned an address, and the network definition is new (which includes existing networks for which the CIDR block (netmask) has changed), make sure that the network is correctly defined in the DIPAAS config.inc.php file (see the [[https://www.cs.uwaterloo.ca/cscf/internal/edocs/Documentation/DHCP-and-DIPAAS/DIPAAS-plm.pdf][DIPAAS-plm]] ("program logic manual") for details. ---+++ Status dashboard <a href="https://www.cs.uwaterloo.ca/cscf/internal/networks/DHCP/index.php"> https://www.cs.uwaterloo.ca/cscf/internal/networks/DHCP/index.php </a> ---+++ From the client ---++++ Linux It has been observed that the Ubuntu !NetworkManager and the old-style /etc/network/interfaces methods of network management are incompatible. Decide which one you are going to use, and stick with it. Useful commands: <verbatim> dhclient -r dhclient </verbatim> Useful files: <verbatim> /var/lib/dhcp3/dhclient.leases /etc/resolv.conf </verbatim> ---++++ Windows Useful commands: <verbatim> ipconfig /all ipconfig /release ipconfig /renew </verbatim> Note that the "release" followed by the "renew" is important. Just a "renew" will attempt to send a release message to the current DHCP server. If that server isn't there (we have multiple servers that can grant identical leases), then the client has to time out on the release before it can renew. "Release" by itself doesn't care if the release is acknowledged -- it just discards the lease. ---++++ <nop>MacOSX</nop> ---+++ At the DIPAAS server ***** DIPASS must be configured to provide service for the vlan(s) that the server(s) nic is using or else the DHCP3 service will not listen for any DHCP request broadcasts on that external NIC. (dlg 2015-09-25) ***** (December 2011) We currently have four DHCP servers running. =Dc-dns-2.cs.uwaterloo.ca= is the master server where DIPAAS runs, and =dc-dns-1.cs.uwaterloo.ca=, =mc-dns-1.cs.uwaterloo.ca= and =mc-dns-2.cs.uwaterloo.ca= are its slaves. Make sure that one of them is running. If the master is not running, then updates via inventory will not be working. Useful commands: <verbatim> /etc/init.d/dhcp3-server status /etc/init.d/dhcp3-server restart # Chech for warning that dhcp3 is not listening for broadcast requests grep "dhcpd: Not configured to listen on any interfaces!" /var/log/syslog # Check if server is even seeing requests grep DHCPREQUEST /var/log/syslog # Check if server is offerring leases to requests grep DHCPOFFER /var/log/syslog # other places to look for this information. tail -f /etc/dhcp3/cscfdhcp/dipaas/log/dipass.log-* tail -f /var/log/daemon.log | grep dhcpd </verbatim> Lastly for the log entries you discover above, double check that the time stamp at the beginning of the line, is within the time frame that you're concerned about. For specific client failure: * look at =/etc/dhcp3/cscfdhcp/dipaas/etc/dhcpd-csnets.conf= and find the reservation stanza for the client. * look at the inventory system to confirm the MAC address ---+ [[DHCP-2005][Previous version (historical interest only)]]
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r38
<
r37
<
r36
<
r35
<
r34
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r38 - 2024-10-30
-
MariHassanzada
CF
Information in this area is meant for use by CSCF staff and is not official documentation, but anybody who is interested is welcome to use it if they find it useful.
CF Web
CF Web Home
Changes
Index
Search
Administration
Communication
Email
Hardware
HelpDeskGuide
Infrastructure
InternalProjects
Linux
MachineNotes
Macintosh
Management
Networking
Printing
Research
Security
Software
Solaris
StaffStuff
TaskGroups
TermGoals
Teaching
UserSupport
Vendors
Windows
XHier
Other Webs
CSEveryBody
Main
Sandbox
TWiki
UW
My links
People
CERAS
WatForm
Tetherless lab
Ubuntu Main.HowTo
eDocs
RGG NE notes
RGG
CS infrastructure
Grad images
Edit
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback