[ale] Howto assign 2 IPs of different classes to same machine

David Brooks db at amorphous.org
Mon Sep 6 11:11:41 EDT 1999


Well, you have a few options.  Either a) you can put two NICs in the
machine, and assign different IP addresses to each NIC. (preferred -- I
have this set up at home on my OpenBSD box that serves as a gateway, it
works splendidly.  I've also had the same box runing RH6.0, also worked
splendidly).  The only problem is, you can only assign one default
route, so obviously it woud be set to your router or proxy or whatever
is your normal default route.  Just make sure you set network routes for
each card so the traffic knows where to go in case of a link dropping. 
There's some tricky LILO configuration in making Linux boot with two
NICs, but perhaps someone on this list can help you out.

You other option is to keep one NIC in the machine, and set up IP
Aliasing in your kernel.  This allows for the setting up of "virtual
devices" on one ethernet card, i.e., if you had a card eth0, you could
set up eth0:0:, eth0:1, eth0:2, etc.  Each one of those would act as its
own device, and you can add seperate routes for each.
Just follow the routing advice above.

-Dave
db at amorphous.org



Laith Elias Haddadin wrote:
> 
> How can I assign 2 ips of different classes to the same machine where each IP
> has its own gateway.
> 
> For example
> 
> The first IP is 212.98.132.252  and its gateway is 212.98.132.254 (Primary
> Link)
> The second IP is 195.6.53.109 and its gateway is 195.6.53.110 (Secondary
> Link)
> 
> This machine is a Mail server and the reason we want to do that is for MX5 and
> MX10 so that if the Primary Link goes down, the MX10 picks up and the mail
> will still arrive to the Mail Server.
> 
> I'm not sure where to look for this kind of in depth IP configurations.  Much
> less if there is packaged software specifics (i.e. proxy server, mail server)
> that I would need to take in consideration.
> 
> Laith E.H.
> 
> ____________________________________________________________________
> Get free email and a permanent address at http://www.amexmail.com/?A=1






More information about the Ale mailing list