Hi,
I need two default routes on my router.
One for routing traffic originated on my router and one for forwarding.
I think this is a job for policy routing but I don't know how to achieve
this.
Frank
Frank
Hi Frank,
Don't you just need one forwarding rule in IPchains and one route whichQuote:> I need two default routes on my router.
> One for routing traffic originated on my router and one for forwarding.
> I think this is a job for policy routing but I don't know how to achieve
> this.
You can only really have one default route for a machine at any one time. You
can have other routes with different metrics, but normally only one default
route is present (is it the safety net).
See ya
Dean Thompson
--
+____________________________+____________________________________________+
| Bach. Computing (Hons) | ICQ - 45191180 |
| PhD Student | Office - <Off-Campus> |
| School Comp.Sci & Soft.Eng | Phone - +61 3 9903 2787 (Gen. Office) |
| MONASH (Caulfield Campus) | Fax - +61 3 9903 1077 |
| Melbourne, Australia | |
+----------------------------+--------------------------------------------+
--
Best regards / Mit freundlichen Gruessen
R. Pietsch
+____________________________+____________________________________________+Quote:> Hi Frank,
> > I need two default routes on my router.
> > One for routing traffic originated on my router and one for forwarding.
> > I think this is a job for policy routing but I don't know how to achieve
> > this.
> Don't you just need one forwarding rule in IPchains and one route which
> basically forwards all data off your network ?
> You can only really have one default route for a machine at any one time.
You
> can have other routes with different metrics, but normally only one
default
> route is present (is it the safety net).
> See ya
> Dean Thompson
> --
you may use a routing protocol across your lines, so when a lineQuote:> Natualy there is only one "DEFAULT" route.
> I also have 2 lines to different providers (permanent online). if one of
> them fail, I have to change the default route to the other one.
> This should be possible to do automatic. --- But how?
you can also craft some scripts to detect error conditions and
swap default routes.
if one of your lines is a PPP link, you can play with the defaultroute
option and some metrics, i.e.:
link 1 = ppp with defaultroute
link 2 = isdn with "hardcoded" default route of metric 2
link 1 default route will always be used, but when it's down,
link 2 will be used instead (and probably trigger a dialup).
finally, if your hosts are servers which receive connexions but
won't make outcoming connexions, you don't need a "global" default
route, but a "per link" default route, like:
ip rule add from my.fir.st.ip lookup 100
ip rule add from my.sec.ond.ip lookup 200
ip route add table 100 default via my.fir.st.gw
ip route add table 200 default via my.sec.ond.gw
so each response will go to the right link.
Hi!,
It can be done automatically with routing protocols, especially RIP and BGPQuote:> Natualy there is only one "DEFAULT" route.
> But:
> I also have 2 lines to different providers (permanent online). if one of
> them fail, I have to change the default route to the other one.
> This should be possible to do automatic. --- But how?
If one link is to fail (which can be detected by trying to reach the remote
gateway address) then you take the other route and lower its metric to 1.
This will have the effect of changing the default route for you. Once you
find that your primary line has come good, you can then take the route which
has a metric of 1 and increase it back to 2 or 3 and take the other route
metric and lower it to 1.
I suspect you will have to write a script like this to get your situation to
work, as routing protocols normally deal with different networks and not
necessarily the default route (although BGP makes an exception here).
See ya
Dean Thompson
--
+____________________________+____________________________________________+
| Bach. Computing (Hons) | ICQ - 45191180 |
| PhD Student | Office - <Off-Campus> |
| School Comp.Sci & Soft.Eng | Phone - +61 3 9903 2787 (Gen. Office) |
| MONASH (Caulfield Campus) | Fax - +61 3 9903 1077 |
| Melbourne, Australia | |
+----------------------------+--------------------------------------------+
Hi!,
It can be done automatically with routing protocols, especially RIP and BGPQuote:> Natualy there is only one "DEFAULT" route.
> But:
> I also have 2 lines to different providers (permanent online). if one of
> them fail, I have to change the default route to the other one.
> This should be possible to do automatic. --- But how?
If one link is to fail (which can be detected by trying to reach the remote
gateway address) then you take the other route and lower its metric to 1.
This will have the effect of changing the default route for you. Once you
find that your primary line has come good, you can then take the route which
has a metric of 1 and increase it back to 2 or 3 and take the other route
metric and lower it to 1.
I suspect you will have to write a script like this to get your situation to
work, as routing protocols normally deal with different networks and not
necessarily the default route (although BGP makes an exception here).
See ya
Dean Thompson
--
+____________________________+____________________________________________+
| Bach. Computing (Hons) | ICQ - 45191180 |
| PhD Student | Office - <Off-Campus> |
| School Comp.Sci & Soft.Eng | Phone - +61 3 9903 2787 (Gen. Office) |
| MONASH (Caulfield Campus) | Fax - +61 3 9903 1077 |
| Melbourne, Australia | |
+----------------------------+--------------------------------------------+
1. policy routing (routing based on source IP)
Hi, i'm trying to do routing based on source IP and not destination IP,
I tried the new "ipfw fwd" without success , do you know any other
way to do it ?
2. mailhost instead of sendmail
3. Source Routing/Policy Routing
4. ftp problem
5. advanced routing question (squid/policy based routing)
7. IPFWADM Forwarding default policy and routing
8. path error?
9. defunct routes (was Re: multiple default routes appear in solaris 2.5.1)
10. routed adds wrong default route
11. Routing Problem with pppd default route option.
12. diald routing problem, no default route for ppp0 with correct gateway
13. routed kills default route from pppd