[K12OSN] eth alias help

Steve Wright paua at quicksilver.net.nz
Thu Feb 26 14:54:03 UTC 2004


On Fri, 2004-02-27 at 05:58, Caleb Wagnon wrote:
> Ok....Right now in my mail server I have 2 separate 10/100 nics recieving mail
> for 2 separate domains. If I take those out and put one gig nic in...can I
> create an alias (like eth 0:1) for the other domain and have things work like
> normal from the same nic? I assume I can but want to make sure.


Yes, you can, but it is the old way to do it.

Simply add both addresses to the interface.  The interface will
establish itself as usual, and then add the secondary IP address
directly, thusly ;


# ip address add 192.168.n.254/24 dev eth0

and it is done!  You may add as many scopes (subnets) as you like to one
interface, and then offer a range of different services on each
interface - just like they were separate physical networks.  The
networks will be invisible to each other (sort of.)

<OT> you can play other tricks too, like set everyones' default route to
this interface, and then set routing policy on who may talk to who.


HTH
/steve






More information about the K12OSN mailing list