On Fri, 5 Jul 2002, at 8:59am, Ken Ambrose wrote:
> Now I understand that having more than one default gateway is... weird,
> and, usually, means that you're running a routing protocol such as IGRP or
> somesuch.  But what if you're not?

  The kernel router works by finding entries in the routing table which
provide a route for the destination address of the packet.  If more than one
entry matches, it uses the entry with the highest metric.  If multiple
entires "tie" for the highest metric, the kernel simply picks the first one.

  If you are not using a routing daemon, then the kernel will always choose
the same default route.  If that route is down, the packets go into a black
hole.  That is why routing daemons exist; to make the routing table respond
to link state changes.

> Is there any way to say something like "if traffic originates on eth0,
> reply to it from eth0; if it comes from eth1, then use eth1", and go from
> there?

  Normally, IP routing does not look at the source address, only the
destination address.  What you describe is called "policy routing", and I
believe it is only available in kernel 2.4 or later.  The details I am fuzzy
on, but I think it might be part of the IPTABLES code.  Try Google for
"Linux policy routing".

-- 
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do not |
| necessarily represent the views or policy of any other person, entity or  |
| organization.  All information is provided without warranty of any kind.  |


*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

Reply via email to