next up previous contents
Next: Process enabling Up: Configuring Linux Previous: Configuring Linux   Contents

Network configuration

Once you have Linux running on a machine you need to get it connected to the network. This is a fairly complicated topic. You can enable DHCP which will automatically choose an IP address for your machine if the network you plug into supports DHCP (most do). If not you have to obtain an IP address from somewhere. Assume you have the address 10.0.0.5 and that the network gateway is 10.0.0.1; the network hardware port is at eth0. You can start up your connection by typing (as root):
ifconfig eth0 10.0.0.5 netmask 255.255.255.0 up
route add default gw 10.0.0.1
at which point you can probably talk to other machines over the net. You may have to configure a nameserver by editing (as root) the file (/etc/resolv.conf). It will look like:
nameserver 198.32.42.38
nameserver 198.32.42.39


root 2004-02-24