Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a strange situation, I have a server that is connected to an old static IP on a totally different gateway, dns, subnet and a new static IP again with a new gateway dns subnet. I also have about 50 domains pointed to the old IP, I want to make this as seemless as possible so is there a way to activate both connections on one nic? Here is a little diagram of the network topology:

2 Internet Connections go into switch ==> One line comes off switch and into server(Everything is layer 2 only)

share|improve this question
    
If you'd like a more detailed answer, please provide details on what operating system you are using. –  Tom Shaw Jun 3 '11 at 13:42
    
If you're running Linux it's actually pretty easy. You'll just need to run ifconfig eth0:1 11.22.33.44, then configure the gateway via route and everything should be working. Of course you need to be able to connect to the 2IP addresses from that cable you're plugging inside the nic. –  tftd Jun 4 '11 at 2:45
add comment

2 Answers 2

up vote 3 down vote accepted

Yes, use vLans to connect both networks to the same NIC on the server.

share|improve this answer
1  
That's probably best from a security point of view, but it is possible to have multiple subnets on the same vlan. –  Tom Shaw Jun 3 '11 at 13:41
    
but multiple default routes? :) –  SpacemanSpiff Jun 3 '11 at 14:01
1  
@Spaceman, no multiple default routes (on different networks) will break a normal Windows machine. –  Chris S Jun 3 '11 at 14:02
    
well, it shouldn't break it, each adapter is given a metric so... the first one will win –  SpacemanSpiff Jun 3 '11 at 14:06
1  
@Spaceman, more likely than not, both NICs will have the same metric. I've seen this break machines frequently. It's an invalid configuration and newer versions of Windows specifically warn you as such if you try to configure it. –  Chris S Jun 3 '11 at 14:11
show 2 more comments

Yes, this is called IP Aliasing.

If you want your system to be smart about routing (to avoid the problems with multiple default routes or asymmetrical routing), you can use policy-based routing.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.