LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 04-25-2005, 04:17 PM   #1
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Rep: Reputation: 30
multiple ip addresses on 1 nic?


Here's the scenario, nothing serious, just curious:

My friend owns a Gaming server. He has multiple ip addresses and it's set to 1 box/1 network card which is running Linux (backbone is a OC-192).

So when people connect to 66.78.38.243 it'll go to that box, and when people go to 66.245.87.75, it'll go to the same box, and when people go to 66.87.24.32 it'll go to the same box, and so on and so forth. Again the box has only 1 network card.

What's the process on setting that kind of thing up? (details are much appreciated)

Of course you have to purchase those ip addresses from the provider, right?

I think that's pretty cool.
 
Old 04-25-2005, 04:20 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,537

Rep: Reputation: 149Reputation: 149
It's simple. Instead of eth0 you use eth0:1, eth0:2 and so on (with one address assigned to eth0). It works good, but there are small issues with iptables for example (when you want rules for specific virtual interfaces; last time I tried it didn't support eth0:x, only 'real' interfaces).
 
Old 04-25-2005, 04:23 PM   #3
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Mara
It's simple. Instead of eth0 you use eth0:1, eth0:2 and so on (with one address assigned to eth0). It works good, but there are small issues with iptables for example (when you want rules for specific virtual interfaces; last time I tried it didn't support eth0:x, only 'real' interfaces).
Awsome. So all I have to do is purchase an ipblock. and I can set it up like that?
 
Old 04-26-2005, 12:49 PM   #4
javaroast
Member
 
Registered: Apr 2005
Posts: 130

Rep: Reputation: 18
Multiple IP's

Try using the command ip addr add xxx.xxx.xxx.xxx/xx dev ethX and you won't have to deal with the subinterfaces.

Last edited by javaroast; 04-26-2005 at 12:50 PM.
 
Old 04-26-2005, 03:53 PM   #5
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,537

Rep: Reputation: 149Reputation: 149
Quote:
Originally posted by houler
Awsome. So all I have to do is purchase an ipblock. and I can set it up like that?
Exactly
 
  


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
Binding multiple IP Addresses to same NIC Harlin Linux - Networking 4 10-26-2005 05:10 AM
Multiple addresses on one NIC via DHCP - possible? babzog Linux - Networking 0 03-25-2004 10:43 AM
Binding multiple IP addresses to a nic card Natalie Linux - Networking 9 08-12-2003 08:27 PM
Multiple addresses for a single NIC grub Programming 1 08-04-2003 02:24 AM
Multiple IP addresses on one NIC hrr Linux - Networking 2 03-07-2003 12:04 PM


All times are GMT -5. The time now is 10:37 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