-   Linux - Networking (
-   -   howto delete existing static ip of ethernet(eth0)& reconf multiple ips on eth0 (

viveku 02-01-2004 01:06 AM

howto delete existing static ip of ethernet(eth0)& reconf multiple ips on eth0
i am configuring a linux(redhat8) server with five different ip schemes on a single ethernet card i.e. eth0. with one public ip for internet access.

all the ip addresses are of different subnet but all belong to class c.

i have only one linux machine as a server and all the clients are windows xp or 98 based.

i assigned some wrong ip schemes on my ethernet card eth0 as eth0 and eth0:1 now i want to delete these two schemes and reconfigure this eth0 for all new five different ip schemes with one static ip address on eth0.

pls guide me to delete this ip scheme and reconfigure all five different ip schemes and one public ip on my single ethernet card eth0.

i will be thankful to you.
waiting for your reply

kind regards

my e mail id :

Homer Jay 02-01-2004 06:36 PM

I assume you want to use the rh-box as file/print/whatever-server and
internet-gateway. For all of that, you need just one ip-address.
ifconfig eth0 down should switch off your ethernet card (maybe you
also need ifconfig eth0:1 down, i've never used that eth0:1 stuff).
ifconfig eth0 netmask up will bring it up

Once ping works on those w*-clients, your have a
fileserver (provided that samba is properly installed).

To give 'em the net, you need Masquerading. If you're lucky,
echo 1 > /proc/sys/net/ipv4/ip_forward is all it takes (but more
likely you'll have to read Linux IP Masquerade HOWTO and/or
Linux Networking HOWTO).

Then tell w* to use as gateway (or default-route, dunno how
they call it). If you have a large number of clients, you might like to set
up a dhcp-server on your rh-box (see DHCP mini-HOWTO).
That should tell the clients which gateway to use, so you don't have to
run around to configure every rotten windoze-box.

Hope that helps.

coolamit78 02-02-2004 01:30 AM


delete the following files



use 'netconfig' command to configure your first network interface eth0.


If you want to create a chain of IP addresses, use this following method

1. Create a file


2. In this file, put


3. as root, give the command

service network restart

{ Similarly, you can create multiple range files {ifcfg-eth0-range1, ifcfg-eth0-range2..and so on...using the above method. Only thing to note is, a maximum of 256 IP addresses can be bound to a single NIC }



All times are GMT -5. The time now is 01:25 AM.