adns.uwaterloo.ca | 129.97.2.1 |
adns2.uwaterloo.ca | 129.97.2.2 |
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 |
There are many variations on how to set up name servers in Ubuntu (Debian) systems. Depending on what packages are installed, you might use
- configuration lines in /etc/resolv.conf
- configuration lines in /etc/network/interfaces
- configuration line appended to /etc/dhclient.conf
- 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.confA 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.confYou 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
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:
- Configure IPv4: Manually
- IP address: aa.bb.cc.dd
- Subnet mask: usually 255.255.255.0. If you're not sure, consult an expert.
- Router: generally the ".1" address in your network, e.g. aa.bb.cc.1, but can vary. Consult an expert if uncertain.
- DNS server: comma separated list with the building appropriate servers, e.g. 172.19.32.5,129.97.2.1,172.19.47.5,129.97.2.2
- Search domains: cs.uwaterloo.ca,uwaterloo.ca
- Click "Apply"
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.