Welcome to the CSIR Meraka Institute's "COIN" Blog

Sunday, August 08, 2004

Linux network configurations tips

Linux network configuration

1. Setting IP address and modes of interface

The file /etc/sysconfig/network-scripts/ifcfg-eth0 contains all the settingsfor interface eth0 including
IP allocation type (static or dynamic)
IP Address
Subnet mask
Broadcast address
Wireless mode
wireless channel

type
# man ifcfg
to see all the options for this config file

Use
# ifup eth0
to bring eth0 network interface up using the script ifcfg-eth0

#ifdown eth0
to pull the eth0 interface down


2. The DNS nameserver

The file /etc/resolve.conf contains the nameserver (dns) to use for the network

3. The gateway and other network routes

To see the current network routes type
# route
This will show you all the routes which the network is currently using

To add a new route for interface eth0 type
# route add -net 10.0.0.0 netmask 255.255.255.0 dev eth0

This adds a route to the network 10.0.0.0 using device eth0

# route add default gw 10.0.0.8
Adds a default route which will be used if no other route matches.

There should be an existing route, in this case, to 10.0.0.8 through some interface.

1 comment:

Dave said...

Thought you might appreciate the following link:

http://www.joot.com/dave/writings/articles/wireless-linux-howto.shtml

It's a step-by-step technical howto on configuring a wireless Linux network.