Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Configuring a network interface

...

Ubuntu has GUI management of networking (settings -> network settings) and manually restarting /etc/init.d/networking is now deprecated, but still works in 12.04. The system overwrites some of the manual settings, for example /etc/resolv.conf, at reboot. One way around this is to put it all in the /etc/network/interfaces file.

You'll need to edit  /etc/network/interfaces 

Note:  The addresses below are provided as an example only.  ECE-IT will provide the appropriate addresses when a formal request has been received.

Open a terminal window and proceed with the following: 

 sudo

...

vi

...

/etc/network/interfaces

 

## To configure a dynamic IP address
auto eth0
iface eth0 inet dhcp

 

## Or configure a static IP
 auto

auto lo

iface lo inet loopback
auto eth0
iface 

...

eth0 inet static

...

address 192.168.1.14

...

gateway 192.168.1.1

...

netmask 255.255.255.0

...

network 192.168.1.0

...

broadcast 192.168.1.255

For these settings to take effect you need to restart your networking services.   

 sudo /etc/init.d/networking restart

Setting up DNS

To cause your machine to consult with a particular server for name lookups you simply add their addresses to /etc/resolv.conf.  

 sudo vi /etc/resolv.conf

enter the following details  

 search ece.utexas.edu
 domain ece.utexas.edu
nameserver 128.83.185.41 
nameserver 128.83.185.40nameserver 128.83.185.40 128.83.185.41

search ece.utexas.edu

 

don't forget

sudo apt-get remove dhcp-client

 

and

vi /etc/NetworkManager/NetworkManager.conf

and make sure the “managed” line contains:

managed=false

Restart the networking service

...