LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2007, 06:14 AM   #1
Sheridan
Member
 
Registered: Aug 2007
Location: Hungary
Distribution: Fedora, CentOS
Posts: 91

Rep: Reputation: 21
Different class IPs on one adapter


Hi Guys, I have just one short question:

Is it possible to assign IPs from different "C" classes to the same ethernet interface? (I suppose it should be, but I'm not sure...)

Like this:

eth0: 192.168.1.2
eth0:0: 192.168.2.2
eth0:1: 192.168.3.2
eth0:2: 192.168.4.2

and so on...

Cheers!
 
Old 09-06-2007, 07:34 AM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 934

Rep: Reputation: 104Reputation: 104
Which IP would the system use with outbound traffic? IP A if traffic is sent through gateway A and IP B if sent through gateway B? Mmmmhhh, sounds quite shaky...
 
Old 09-06-2007, 08:34 AM   #3
Sheridan
Member
 
Registered: Aug 2007
Location: Hungary
Distribution: Fedora, CentOS
Posts: 91

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by Pearlseattle View Post
Which IP would the system use with outbound traffic? IP A if traffic is sent through gateway A and IP B if sent through gateway B? Mmmmhhh, sounds quite shaky...
Yeah...

It will be something like this: There's a loadbalanced apache cluster, basically, with one machine for outside contact. Our SEM figured what if we assign different IP-s for every of our sites hosted there, what's more, let's assign them from different C classes. So he issued the contract with the provider like that. He wants to boost google rankings I believe... Now what I have to do is to assign all the 29 different C class IPs to the balancer "gateway" machine for the system and make this work... Sweet.

Anyway... there should be a way to do this...
 
Old 09-06-2007, 08:55 AM   #4
cconstantine
Member
 
Registered: Dec 2005
Distribution: RedHat, Ubuntu
Posts: 101

Rep: Reputation: 15
not shaky...

Quote:
Originally Posted by Pearlseattle View Post
Which IP would the system use with outbound traffic? IP A if traffic is sent through gateway A and IP B if sent through gateway B? Mmmmhhh, sounds quite shaky...
if you config your daemons (eg, sshd, apache) to bind to specific IPs, and then setup route maps on the system, you'll get the traffic flowing out the correct virtual interface towards the correct gateway IP. We use this for systems with multiple physical NICs. One NIC has all the "management" services (sshd, f/w rules to allow us to connect) and the other NIC has the public service bound and different f/w rules.

-c
 
  


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
Getting things straight: Apache, SSL, Multiple External IPs / Internal IPs robin.com.au Linux - Server 21 10-14-2007 12:39 AM
Realtek 8150 class USB-LAN adapter devices Maidros Solaris / OpenSolaris 1 10-22-2006 07:17 AM
Tow different network ips class on the same switch (intelligent hub) shahg_shahg Linux - Networking 2 12-06-2005 07:02 PM
how to define a specific range of IPs and/or multiple IPs in an iptables rule?... TheHellsMaster Linux - Security 9 09-20-2004 11:06 AM
Blocking A Class of Ips w/ Iptables kemplej Linux - Security 4 09-03-2004 12:02 PM


All times are GMT -5. The time now is 05:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration