Setting up a RedHat Linux and Apache Web Server
- Linux Installation (continued):
-
- Bringing Up the Network (continued)
- The basic purpose of ifconfig is to "configure" the kernel for the
ethernet interfaces that you want active on your system. The basic information
that the kernel needs is: the interface name (eth0, eth1); the network address
(e.g. 192.168.1.100 for the local network); and the network mask (usually
255.255.255.0).
If the loopback interface (lo) is not present,
enter the following command: ifconfig lo 127.0.0.1
Note, the lo is the first two letters of the word loopback and not one
zero or ell zero.
If your ethernet cards are not properly setup,
start by initializing the card that you will use for your internal network. I
always use eth0 for the connection to the external world (internet), and eth1
for my internal network. For example: ifconfig eth1 192.168.1.100 netmask 255.255.255.0
Your local network address (private network) can be any address in the
range 192.168.1.0 to 192.168.255.255 with a network mask of 255.255.255.0.
Please note however that all addresses terminating with 0 or 255 are reserved.
Each machine on your local network must have a unique address. I suggest that
you start with 192.168.1.100 and increment the last digit by one for each
machine. I have vastly simplified this topic. Please see chapter 1 of "LINUX
Network Toolkit", by Paul G. Sery for the gory details.
Retry
the ifconfig command to ensure that at least the loopback and the local
ethernet interfaces are properly configured. If you want, you can also
configure the interface that connects to the internet. To do this, you will
need three pieces of information that will be provided by your Internet
Service Provider (ISP): 1. your internet address. 2. the network mask
associated with that address. 3. the network address of your gateway. To
configure the card with the kernel, you will need items 1 and 2. To actually
talk to the outside world, you will need item 3 when setting up your routing
tables.
Home: http://www.sibbald.com/
Contact: kern at sibbald dot
com
Last Update: