Hi!
I have the following setup:
ISP 1 ISP 2
+------ +------
\ /
\ /
+----------+
| router A |
+----------+
/ \
\ IBGP /
/ \
+----------+ +----------+
| router B | | router C |
+----------+ +----------+
| |
CLIENTS CLIENTS
Routes are distributed between router A, B, and C via IBGP. There are also
two upstream providers and we have globally routable ips which are
advertised to both providers via BGP and also some ips which are only
routable to each individual isp.
So now we have the situation where we need two default gateways on router
A (depending on source network). Usually this would be simple:
ip rule add from $ispa_net table ISPA
ip route add default via $ispa_gw table ISPA
ip route add default via $ispb_gw
and you give ISPA table a higher priority (lets say 252).
My problem now is if I get routes from router B and C via BGP, zebra adds it
to the main table, but since routing table ISPA is evaluated first and only
contains a default gateway, all packets are sent out via isp A instead of
being routed to router B.
This problem could be solved if
(a) I could add both those default routes in the main table (e.g.
something like this would''ve been perfect (if it was possible):
ip route from $ispa_net to default via $ispa_gw
ip route from $ispb_net to default via $ispb_gw
because then Zebra would add its routes in the same table and those
more specific rules would be evaluated before the default routes)
(b) Zebra added its routes into all the tables, but that would be
riciculous (imagine adding 50000+ routes into multiple tables and
evaluating all of them)
Anybody have any idea how I can solve this?
--
Regards
Abraham
Watson''s Law:
The reliability of machinery is inversely proportional to the
number and significance of any persons watching it.
___________________________________________________
Abraham vd Merwe - Frogfoot Networks CC
9 Kinnaird Court, 33 Main Street, Newlands, 7700
Phone: +27 21 686 1674 Cell: +27 82 565 4451
Http: http://www.frogfoot.net/ Email: abz@frogfoot.net