4.6 Using an Ethernet Network

ttylinux is ready to use Ethernet networking. DHCP will be used when starting up the Ethernet network, unless configured otherwise.

The Ethernet network interface configuration is specified in the text file:


This file has specification in the form of "ITEM=value". Edit this file to set the proper Ethernet interface IP addresses, change the Ethernet DHCP usage and to enable Ethernet networking. To enable Ethernet networking, the line ENABLE=no must be changed to ENABLE=yes. To disable DHCP, the line DHCP=yes must be changed to DHCP=no.

After configuring the Ethernet network interface, restart the networking subsystem with the following command.

	service network restart

See the description of the /sbin/sysconfig script in section 4.11 for scripted help in setting up the Ethernet network interface configuration.

The Ethernet network interface, commonly referred to as eth0, can be started and stopped independently from the entire network subsystem with the following commands.

Startup eth0 with:

	ifup eth0

Shutdown eth0 with:

	ifdown eth0

Help! I can use only IP addresses and not domain names.

If you use only static IP addresses and no DHCP, as specified in your /etc/sysconfig/network-scripts/ifcfg-eth* files, then you probably have no /etc/resolv.conf file and no domain name resolution. In this case only IP addresses will work, such as "ping", and domain names will NOT work, such as "ping sun.com".

In this case, make your own /etc/resolv.conf file with these contents:

# OpenDNS Servers

The following bash commands will do this for you:

	rm -f /etc/resolv.conf
	echo "# OpenDNS Servers"         >>/etc/resolv.conf
	echo "nameserver" >>/etc/resolv.conf
	echo "nameserver" >>/etc/resolv.conf