2,187
edits
(Initial creation - content from Ubuntu page) |
m (→Change IP Address: Minor revision) |
||
Line 65: | Line 65: | ||
== Change IP Address == | == Change IP Address == | ||
* Edit the <code> /etc/network/interfaces </code> file in the following fashion to set static address details | |||
* Edit the <code> /etc/network/interfaces </code> file in the following fashion | |||
<pre> | <pre> | ||
# The primary network interface | # The primary network interface | ||
Line 77: | Line 76: | ||
gateway 192.168.1.1 | gateway 192.168.1.1 | ||
</pre> | </pre> | ||
* Then check the local hosts file <code> /etc/hosts </code>, so that the IP v4 part looks like... | * Then check the local hosts file <code> /etc/hosts </code>, so that the IP v4 part looks like this (so the host can resolve itself)... | ||
<pre> | <pre> | ||
127.0.0.1 localhost | 127.0.0.1 localhost | ||
192.168.1.150 hostname.domain.com hostname | 192.168.1.150 hostname.domain.com hostname | ||
</pre> | </pre> | ||
* Check that DNS resolution is setup correctly | * Check that DNS resolution is setup correctly in <code>/etc/resolv.conf</code>. Add additional DNS nameservers as required, as found in in order of pref, for example... | ||
nameserver 192.168.1.20 | |||
nameserver 127.0.0.1 | nameserver 127.0.0.1 | ||