LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-01-2004, 01:06 AM   #1
viveku
LQ Newbie
 
Registered: Jan 2004
Location: new delhi , india
Distribution: redhat8.0
Posts: 5

Rep: Reputation: 0
Post 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
viveku

my e mail id : vivekupadhyay80@yahoo.co.uk
 
Old 02-01-2004, 06:36 PM   #2
Homer Jay
LQ Newbie
 
Registered: Dec 2003
Location: Berlin/Germany
Distribution: Debian
Posts: 22

Rep: Reputation: 15
hi.
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 192.168.0.1 netmask 255.255.255.0 up will bring it up
again.

Once ping 192.168.0.1 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 192.168.0.1 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.
 
Old 02-02-2004, 01:30 AM   #3
coolamit78
Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: RHEL AS 3/4, Windows XP
Posts: 546

Rep: Reputation: 31
Hi...

delete the following files

/etc/sysconfig/network-scripts/ifcfg-eth0

/etc/sysconfig/network-scripts/ifcfg-eth0:1

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

Now..

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

1. Create a file

/etc/sysconfig/network-scripts/ifcfg-eth0-range0

2. In this file, put

DEVICE=eth0-range0
BOOTPROTO=static
IPADDR_START=192.168.1.1
IPADDR_END=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
CLONENUM_START=1

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 }

Regards,

amit
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing for eth0 and wlan0 with static IPs on the same network. kelvinlo Linux - Wireless Networking 3 10-15-2007 04:54 PM
Howto assign multiple ip addresses to eth0 in Mandrake 10???? tictocdoc Mandriva 3 05-07-2004 03:00 PM
howto delete static ip configured on eth0 & reconf multiple ip on one eth0(redhat8 viveku Linux - Networking 0 01-31-2004 10:40 AM
eth0:9 incorrect IPs ,and eth0 not IPs WannaLearnLinux Linux - Networking 10 10-26-2003 08:50 PM
Multiple IPs on eth0, 2 of them stopped working? jeromio Linux - Networking 0 04-20-2001 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration