CSCF DNS Service | Services | Setups | Infrastructure | Internal | CSCF | CS | UW


Domain Name System (DNS) Service Configuration Recommended by CSCF

In general, for a stand-alone system you should use DHCP or set up workstations to use the UW campus Anycast Name Servers:
  adns.uwaterloo.ca     129.97.2.1  
  adns2.uwaterloo.ca     129.97.2.2  
For systems joined to CSCF's TEACHING or GENERAL Directory Service, you should set up servers and workstations to also use CSCF Name Servers (at least until IST fixes their single point of failure for the "ds.uwaterloo.ca" zone transfer):
  dc-dns-1.cs.uwaterloo.ca     172.19.32.5  
  adns.uwaterloo.ca     129.97.2.1  
  mc-dns-1.cs.uwaterloo.ca     172.19.47.5  
  adns2.uwaterloo.ca     129.97.2.2  

DNS client setup instructions

Linux systems

There are many variations on how to set up name servers in Ubuntu (Debian) systems. Depending on what packages are installed, you might use

  1. configuration lines in /etc/resolv.conf
  2. configuration lines in /etc/network/interfaces
  3. configuration line appended to /etc/dhclient.conf
  4. the Ubuntu NetworkManager tool

These methods are generally mutually-exclusive and should not be "mixed & matched".

Setup of "/etc/resolv.conf"

A complete /etc/resolv.conf file for non-TEACHING CS systems:

sudo wget https://cs.uwaterloo.ca/cscf/internal/infrastructure/setups/services/dns/etc/resolv.conf -O /etc/resolv.conf

A complete /etc/resolv.conf file for TEACHING CS systems:

sudo wget https://cs.uwaterloo.ca/cscf/internal/infrastructure/setups/services/dns/etc/resolv.conf-TEACHING -O /etc/resolv.conf

You may wish to add more domains to the "search" config line that are particular to your usage (e.g. a research-group domain). However if you do, make sure you update the "ndots" option to be the maximum number of dots contained by a domain name with in the "search" line.

Setup of "/etc/network/interfaces"

In /etc/network/interfaces, if the Canonical Inc "resolvconf" package is installed, the name servers are specified on a single line within the associated interface stanza:

iface eth0 inet static
   netmask ...
   address ...
   gateway ...
   dns-nameservers 172.19.32.5 129.97.2.1 172.19.47.5 129.97.2.2
   dns-search uwaterloo.ca cs.uwaterloo.ca student.cs.uwaterloo.ca

Enhance "/etc/dhcp/dhclient.conf" to Accept Full Search List

Unfortunately by default, the dhclient.conf will only pick up the first domainname of the domain-search string supplied by the dhcp server. To have it use the entire string of names, append "option domain-search code 119 = string;" to the /etc/dhcp/dhclient.conf" file.

echo "option domain-search code 119 = string;" >> /etc/dhcp/dhclient.conf

Setup Networking via NetworkManager

With the NetworkManager GUI management tool, edit the associated connection (e.g. "Auto eth0") and select the "IPv4" tab. Fill in the "DNS servers" and "Search domains" boxes for the appropriate building. Each name or address should be comma-separated, e.g.:

DNS servers: 172.19.32.5, 129.97.2.1, 172.19.47.5, 129.97.2.2
Search domains: cs.uwaterloo.ca, uwaterloo.ca

MacOS systems

Via the Apple—System Preferences menu, click "Network". Then, show "Ethernet" (the one at the top of the list).

The preferred configuration is Using DHCP: click "Apply" and you're done.

For manual configuration:

Windows systems

Via the Control Panel—Network and Internet—Network Connections page:
Select the associated network interface (usually "Local Area Connection"),
Right-click and select "Properties".

On that properties page, select "Internet Protocol Version 4" and click the "Properties" button:
Fill in the two DNS server addresses from above (e.g. 172.19.32.5,129.97.2.1,172.19.37.5,129.97.2.2) and then click the "Advanced" button.

Select the "DNS" tab and add DNS server addresses as required.

You can also add more domains to your search list.