2,187
edits
m (→Change IP Address: Minor update ifconfig) |
(→Change IP Address: Updated for v12) |
||
Line 105: | Line 105: | ||
== Change IP Address == | == Change IP Address == | ||
=== v8 Hardy Heron / v10 Lucid Lynx === | |||
* 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 to set static address details | ||
<pre> | <pre> | ||
Line 126: | Line 127: | ||
domain domain.com | domain domain.com | ||
search domain.com | search domain.com | ||
search anotherdomain.com | search domain.com | ||
* Then restart networking | |||
** <code> /etc/init.d/networking restart </code> | |||
* Confirm network config is as expected with | |||
** <code>ifconfig</code> | |||
=== v12 Precise Pangolin === | |||
* Edit the <code> /etc/network/interfaces </code> file in the following fashion to set static address details | |||
<pre> | |||
# The primary network interface | |||
auto eth0 | |||
iface eth0 inet static | |||
address 192.168.1.150 | |||
netmask 255.255.255.0 | |||
network 192.168.1.0 | |||
broadcast 192.168.1.255 | |||
gateway 192.168.1.1 | |||
dns-search domain.com | |||
dns-search anotherdomain.com | |||
dns-nameservers 192.168.1.20 127.0.0.1 | |||
</pre> | |||
* 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> | |||
127.0.0.1 localhost | |||
192.168.1.150 hostname.domain.com hostname | |||
</pre> | |||
* Then restart networking | * Then restart networking | ||
** | ** <code> service networking restart </code> | ||
* Confirm network config is as expected with | * Confirm network config is as expected with |