Prev | Current Page 639 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"

If you have a network card configured to obtain an IP address automatically,
the file will look like this:
# This file describes the network interfaces available on
# your system and how to activate them. For more information,
# see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
Do not modify the loopback entry unless you are absolutely certain that you know
what you are doing.
In some cases, such as when the system will be acting as a server, you want to configure your network
interface with a fixed IP address. To do so, edit /etc/network/interfaces and replace
the iface eth0 inet dhcp line. Use the following block as a template, replacing the parameters
with the correct settings for your network:
iface eth0 inet static
address 192.168.1.220
netmask 255.255.255.0
gateway 192.168.1.1
You can obtain IP network settings from your ISP or network administrator.
Wireless interfaces can also be configured using the interfaces file but require that the wirelesstools
package be installed. Use dpkg or apt-get to install the wireless-tools package. Then add the
necessary parameters to the entry for your wireless network interface. This example shows the settings
for a wireless network with an access point (managed mode) set to the ESSID Home, and
operating on channel 11:
iface eth0 inet dhcp
wireless_essid Home
wireless_mode Managed
wireless_channel 11
If your wireless network is using encryption, you will need to specify a wireless_key
parameter.


Pages:
627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651