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

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

# 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 netmask dev eth0

This adds a route to the network using device eth0

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

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


jiri said...

Hey, I have enjoyed...your blog is informative - even entertaining.

I have a halloween sites. They pretty much covers costumes and masks related stuff.

Thanks again and I'll be sure to bookmark you.

Dave said...

Thought you might appreciate the following link:


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