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:

	/etc/sysconfig/network-scripts/ifcfg-eth0

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.
/etc/resolv.conf

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 212.123.44.77", 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
nameserver 208.67.222.222
nameserver 208.67.220.220

The following bash commands will do this for you:

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