first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

Ubuntu Linux Network Connectivity

Ubuntu, by default, is configured for DHCP. You can verify this by examining some configuration files related to networking:

less /etc/dhcp3/dhclient.conf
less /etc/network/interfaces

In the default interfaces file, edit the last lines thusly:

# The primary network interface
auto eth0
iface eth0 inet dhcp

where auto eth0 is the recommended change. Refresh the DHCP relationship by running

sudo ifdown eth0; sudo ifup eth0

In the Microsoft Windows world, this is equivalent to ipconfig /release; ipconfig /renew.

Ensure that your machine can resolve IP addresses into DNS names by editing /etc/resolv.conf and making 'nameserver' entries.

What also may be handy is to restart the network:

/etc/init.d/networking restart

A step-by-step Ubuntu server set up is at howtoforge.com, "ISP Server Setup—Ubuntu 5.10 'Breezy Badger'" here:

http://www.howtoforge.com/perfect_setup_ubuntu_5.10

You can display the IP address of the server by tacking on ifconfig in /etc/rc.local. This is useful for us unfortunates who cannot obtain a static IP address and we cannot use port forwarding.

Another DHCP issue is that, by default, /etc/dhcp3/dhclient.conf requests a list of DNS servers (see the request line in dhclient.conf). This will automatically overwrite /etc/resolv.conf. You can specify a list of domain name servers by adding/uncommenting the prepend line in dhclient.conf:

prepend domain-name servers 127.0.0.1,127.0.0.2;

where the IP addresses of the domain name servers are separated by commas. Please compare editing resolv.conf manually to "refreshing" DHCP with ifdown eth0; ifup eth0.

One possible solution to the problem related to the error message “No such device” (most likely on eth0), is to comment out the MAC address definition in /etc/iftab.

mod date: 2007-10-11T22:42:31.000Z