LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 05: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, 05:20 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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, 05: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, 01:49 PM   #4
javaroast
Member
 
Registered: Apr 2005
Posts: 131

Rep: Reputation: 19
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 01:50 PM.
 
Old 04-26-2005, 04:53 PM   #5
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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 06:10 AM
Multiple addresses on one NIC via DHCP - possible? babzog Linux - Networking 0 03-25-2004 11:43 AM
Binding multiple IP addresses to a nic card Natalie Linux - Networking 9 08-12-2003 09:27 PM
Multiple addresses for a single NIC grub Programming 1 08-04-2003 03:24 AM
Multiple IP addresses on one NIC hrr Linux - Networking 2 03-07-2003 01:04 PM

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

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