LinuxQuestions.org
Help answer threads with 0 replies.
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-25-2003, 09:24 AM   #1
Zingaro2002
Member
 
Registered: Feb 2002
Location: Italy
Distribution: Fedora Core 1, Red Hat 8, Red Hat 9, Knoppix 3.3 (debian sarge)
Posts: 97

Rep: Reputation: 15
2 IP addresses on the same Linu box


Hi!
I have a Linux Red Hat 8.0 box connected by a router to a LAN.
When I installed RH8 I assigned to my eth0 card an IP address (192.168.0.190).
Now I'd like to add another IP (a static one: 80.19.xxx.zzz) in the same machine (like I do on Win2000).

On another box with RH 7.3 I had to install 2 eth cards, each one with a different IP address, BUT I think that this is NOT a good fix for my problem (if I had to handle 8 IP addresses I would have to have 8 eth cards on the same machine!!!).

If someone knows how to assign more than one IP address (possibly each one with a different subnet mask) to the same linux box with only one eth card... please help me!

Keep in mind that I'm almost newbie to Linux...

Thanks in advance!!!
 
Old 02-25-2003, 11:12 AM   #2
mychl
Member
 
Registered: Jul 2001
Location: Earth
Posts: 164

Rep: Reputation: 30
I think you have to use different NIC cards. I've never heard of being able to have multiple IP's on the same NIC.

Why would you need to have up to 8 ipaddresses on the same machine?

Post in further detail what you are trying to do, we should be able to come up with alternatives for you to look at.....
 
Old 02-25-2003, 12:39 PM   #3
Anubis
Member
 
Registered: Mar 2002
Location: /dev/null
Distribution: Ubuntu - Fedora - or whatever works or gets handed to me.
Posts: 119

Rep: Reputation: 15
you cat set up ass many ips on the same nic as you wish , i am sorry i cant remember how right now but it is possible, i think its called ip aliasing or something like that . i use to ise linux with vmware with a nt4 workstation and shared the nic with a diffrent ip for each os at the same time. I Is Possuble, and It WorkS!
 
Old 02-25-2003, 01:16 PM   #4
andresurzagasti
Member
 
Registered: Sep 2002
Location: Reconquista
Distribution: RedHat, Fedora
Posts: 38

Rep: Reputation: 15
Post Multiple IPs in same NIC.

Hi, itīs possible work with various IP in the same NIC.
See at:
http://www.reconquistaonline.com.ar/netcfg.png

Itīs a capture screen of Network Configuration of RedHat, (Gnome desktop). In your Linux box, click on the "Interfaces" button, and next, look for your NIC and next, click in the "Alias" button. The next steps will require the new information: IP Adrress, netmask, etc.

Regards, Andres.
 
Old 02-25-2003, 01:33 PM   #5
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: fedora, slackware, suse
Posts: 447

Rep: Reputation: 31
Do you have any idea which configuration files this changes and how? Or how to accomplish this on the command line. I checked the man page for ifconfig thinking it must be an option there, but found only this (implying perhaps iptables?):

NOTES
Since kernel release 2.2 there are no explicit interface
statistics for alias interfaces anymore. The statistics
printed for the original address are shared with all alias
addresses on the same device. If you want per-address
statistics you should add explicit accounting rules for
the address using the ipchains(8) command.


If I ever manage to get off dialup, I'ld just prefer to not need another ethernet card, my box is packed as it is. Thanks.
 
Old 02-25-2003, 02:13 PM   #6
Anubis
Member
 
Registered: Mar 2002
Location: /dev/null
Distribution: Ubuntu - Fedora - or whatever works or gets handed to me.
Posts: 119

Rep: Reputation: 15
andres asi que de rosario no? jejeje
 
Old 02-25-2003, 02:36 PM   #7
andresurzagasti
Member
 
Registered: Sep 2002
Location: Reconquista
Distribution: RedHat, Fedora
Posts: 38

Rep: Reputation: 15
Changes to configuration files

In RH, the configuration files stats at:
/etc/sysconfig/networking

In this directory, have a various files, like "eth0".

Anubis: No soy de Rosario, parece que el traceroute ha fallado. De todas maneras mi ubicacion completa esta en mis datos de usuario.
 
Old 02-25-2003, 02:53 PM   #8
Anubis
Member
 
Registered: Mar 2002
Location: /dev/null
Distribution: Ubuntu - Fedora - or whatever works or gets handed to me.
Posts: 119

Rep: Reputation: 15
mis disculaps queria decir , no sos de santa fe? perdon por desvirtuar el topic.
sorry guys for messing with the topic , i didn't check the PM yet.
 
Old 02-26-2003, 04:56 AM   #9
Zingaro2002
Member
 
Registered: Feb 2002
Location: Italy
Distribution: Fedora Core 1, Red Hat 8, Red Hat 9, Knoppix 3.3 (debian sarge)
Posts: 97

Original Poster
Rep: Reputation: 15
I haven't got GNOME, because RH 8 installs Bluecurve.... so I have NO Network Configurator!!!

What can I do from command line (it seems to be the only one solution)?

Thanks in advance
 
Old 02-26-2003, 05:27 AM   #10
siddiqu
Member
 
Registered: Mar 2001
Location: India
Posts: 332

Rep: Reputation: 30
Hi..

Just do like this.


ifconfig eth0.1 x.x.x.x netmask x.x.x.x up

ifconfig eth0.2 y.y.y.y netmask y.y.y.y up


to make permanent crearte ifcfg-eth0.1 , ifcfg-eth0.2 files in the /etc/sysconfig/network-scripts directory.
 
Old 02-26-2003, 05:43 AM   #11
Zingaro2002
Member
 
Registered: Feb 2002
Location: Italy
Distribution: Fedora Core 1, Red Hat 8, Red Hat 9, Knoppix 3.3 (debian sarge)
Posts: 97

Original Poster
Rep: Reputation: 15
THANK YOU siddiqu!!!

I'll try and then I'll let you know!!!
 
Old 02-26-2003, 05:49 AM   #12
siddiqu
Member
 
Registered: Mar 2001
Location: India
Posts: 332

Rep: Reputation: 30
Hi..

Small mistake in my last update.

actually instead of . u have to use :

ifconfig eth0:1 x.x.x.x netmask y.y.y.y up


Sorry for the mistake



Siddiqu.T
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cannot see my Win XP SP2 box with shared printer from my SUSE Pro 9.3 box thorlin Linux - Networking 3 09-11-2005 01:16 PM
addressing more than 2GB swap in Linu JapanMtlExpat Linux - Software 0 10-05-2004 07:51 AM
XP Box won't connect to internet thru RH9 Box (firewall/dhcpd), it can only ping fire Rhapsodic Linux - Networking 4 07-10-2004 03:02 PM
how can i run a shell scripts (or a number of commands )when a user logs in to a linu rddreamz Programming 4 05-20-2004 03:08 PM
how to add / bind ip addresses to one box on slackware ? Mouse_103 Linux - Newbie 3 03-30-2003 12:11 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration