[Klug-general] Multiple routes out

Peter Childs pchilds at bcs.org
Mon Dec 6 20:09:52 UTC 2010


On 6 December 2010 19:57, Laurence Southon <laurence at southon.uk.net> wrote:

> On 06/12/10 18:34, Peter Childs wrote:
> >
> >
> > One for the box to get to the internet and one for the internet to get
> > to the box?
> >
> > Which can be done. but if I remember correctly you need to use ip not
> > route. where you can do lost of fun and intresting things that you can't
> > normally do with route. (Such as use two gateways and two internet
> > connections if you wish)
> >
> I believe you can, using iproute2. Have read about it, not done it.
>
> However, would it not be simpler to add an NIC to the server and operate
> a different subnet with the Smoothwall box? Or alias an IP/network if
> there must be only one physical interface.
>
> Apache2 (or whatever) could be configured to listen just on that other IP.
>
> Regards,
>
>
You can always run two ip address on one network card.

eth0 is the first interface to your network card...
eth0:0 is the next can can have a different ip, gateway etc etc

so

eth0 could be 192.168.2.1 with a subnet mask of 255.255.255.0
eth0:0 could be 192.168.3.1 with a subnet mask of 255.255.255.0

you then have two "networks" on the same set of cables quite useful when
somone gives you a web camera with a set ip address that is not in your
local area networks ip address range.

Its also used to allow machines to fail over so your could set up two
shorewall boxes with a shared ip then using heartbeat, if one fails the
other takes over.

These virtual network devices is something since I discovered it I've used
quite a bit.

May not answer the question, but it might give you a clue on what to try....

Peter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/kent/attachments/20101206/25e9752c/attachment.htm>


More information about the Kent mailing list