NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: IP aliasing

Hash: SHA1

On Wed, 18 Jun 2008, DAve wrote:

> Good morning,
> I have been told by my Network Administrator that we will be changing IP
> blocks for several key services very soon. I have three new DNS servers
> running NetBSD on the new IP block already. I also have two legacy DNS servers
> (also on NetBSD) that I need to drag along behind me for a few more months.
> My new IP block is 65.124.104.X and my old IP block is 65.196.224.X. Is it
> possible to have a single machine answer for both IPs on a single interface?
> The network Gods claim they can route the traffic to me no problem, but I am
> unsure how to configure the alias for the interface.
> Old address:
> Netmask:
> Gateway:
> New address:
> Netmask:
> Gateway:
> Is it even possible to alias the old address with the new gateway?

you can have both ip's on the same interface with:

ifconfig intX inet
ifconfig intX inet alias

As for the default routes:

Depends on what your trying to do - i think you're going to have to talk 
to your local network guys - if the machines that are trying to reach the 
old ip's are reachable via the new gateway (and the new gateway won't be 
confused by packets coming from old ip's coming in on it's new ip 
interface[1]). Then just set the default route to the new gatway and be 
done with it.

There is no straight forward way on NetBSD to have two default routes, but 
if the set of machines that want to talk to the old ip's is known then you 
can add routes to just them via the old gateway with:

route add -net oldmachinesnetblock/mask

The other way is to use ipf 'fastroute' rule to shift the packets around 
manually, something like:

pass out on intX fastroute intX : from to any

(You'll need to test that carefully, i may have the syntax wrong. Tcpdump 
is your friend, run it from a machine other than the server your testing,
so you can see what going on on the wire, oh, and consider pf as well, 
(look for the 'route-to' option)).

[1] I am making assumptions about your network setup here, they may be 

- -- 
[]                                   [0x2ECA0975]
Version: GnuPG v1.4.7 (NetBSD)


Home | Main Index | Thread Index | Old Index