Discussion:
Two default routes?
(too old to reply)
John Klos
2009-08-11 03:49:13 UTC
Permalink
Hi,

I'm hoping someone can help me with a problem I've been running into
lately.

I have machines at several locations doing NAT and IPv6 for private
networks. In a few places, I'm also routing small static IPv4 nets over
gif tunnels.

In two locations, I have the NAT / IPv6 machine on a public IPv4 (cable
modem or DSL), and another IPv6-only machine on the private side. That
machine then has a gif tunnel over IPv6 over which the IPv4 subnet is
routed. This works perfectly.

However, if I want the NAT / IPv6 machine to also have the IPv4 subnet
routed to it, incoming packets work, but outgoing want to go out the cable
modem's / DSL's default IPv4 gateway, and not back out the gif tunnel.

How do I fix this?

Please let me know if you want examples.

Thanks,
John Klos

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
David Young
2009-08-11 04:48:47 UTC
Permalink
Post by John Klos
Hi,
I'm hoping someone can help me with a problem I've been running into
lately.
I don't understand the problem, yet. Maybe a diagram will help.

Dave
--
David Young OJC Technologies
***@ojctech.com Urbana, IL * (217) 278-3933

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Michael van Elst
2009-08-11 05:53:48 UTC
Permalink
Post by John Klos
However, if I want the NAT / IPv6 machine to also have the IPv4 subnet
routed to it, incoming packets work, but outgoing want to go out the cable
modem's / DSL's default IPv4 gateway, and not back out the gif tunnel.
Routing is done by destination address only. So unless you can
identify which networks talk to you via gif and which via
cable modem and provide distinguished routes instead of a default
route, the standard routing won't help you.
Post by John Klos
How do I fix this?
This is called source-based or policy routing. AFAIK you can
assemble something to this effect with IPF. Have a look at
the 'fastroute' option.
--
--
Michael van Elst
Internet: ***@serpens.de
"A potential Snark may lurk in every tree."

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Takahiro Kambe
2009-08-11 06:08:07 UTC
Permalink
In message <h5r11c$gh$***@serpens.de>
on Tue, 11 Aug 2009 05:53:48 +0000 (UTC),
Post by Michael van Elst
Post by John Klos
How do I fix this?
This is called source-based or policy routing. AFAIK you can
assemble something to this effect with IPF. Have a look at
the 'fastroute' option.
Or, try experimental srt(4). I can find srtconfig(1) but no real man
pange for srt(4). And MAKEDEV(8) also missing creating /dev/srtX. :-(
--
Takahiro Kambe <***@back-street.net>

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
der Mouse
2009-08-11 06:13:08 UTC
Permalink
Post by Takahiro Kambe
Or, try experimental srt(4). I can find srtconfig(1) but no real man
pange for srt(4). And MAKEDEV(8) also missing creating /dev/srtX. :-(
Each of those is largely my fault. If anyone has any questions about
srt, I'll be happy to do what I can to answer them, though srtconfig(1)
(which really ought to be srtconfig(8) - again, my fault, and indeed,
I'm somewhat surprised to find that it's section 1 even in my original
sources) is, at least by intention, enough to actually use srt
interfaces.

I really need to pry loose the time to fix these.

/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML ***@rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
John Klos
2009-08-11 06:21:24 UTC
Permalink
Post by David Young
Post by John Klos
I'm hoping someone can help me with a problem I've been running into
lately.
I don't understand the problem, yet. Maybe a diagram will help.
Picture a NAT & IPv6 machine connected to a cable modem with two
interfaces - one public, one private (well, IPv6 isn't private, but you
know what I mean). Let's forget about NAT for a minute - it's not a
factor.

Now add two tunnels. One provides IPv6 and a /64 is routed through it, and
the other provides IPv4 and a /28 is routed through that.

Some machines on the local network have 192.168.x.x addresses and do NAT
through the cable modem's IP, and others have IPs from the /28.

Say that the private interface is 38.119.55.161/28 (the public IPv4 subnet
routed over the gif tunnel), and there are other machines which are on
38.119.55.162 - 175, and their default route is 38.119.55.161.

So the question is how do you make the packets which are sent to
38.119.55.161 go back out through the tunnel, whereas the 192.168.x.x
packets go through NAT?

I'll have to take a look at that fastroute stuff...

Thanks,
John

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Hubert Feyrer
2009-08-11 20:24:31 UTC
Permalink
Post by der Mouse
Each of those is largely my fault. If anyone has any questions about
srt, I'll be happy to do what I can to answer them, though srtconfig(1)
(which really ought to be srtconfig(8) - again, my fault, and indeed,
I'm somewhat surprised to find that it's section 1 even in my original
sources) is, at least by intention, enough to actually use srt
interfaces.
I really need to pry loose the time to fix these.
Yes please.


- Hubert

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Hubert Feyrer
2009-08-11 21:34:50 UTC
Permalink
Post by John Klos
How do I fix this?
Not sure if that works on NetBSD, but I've used the following approach in
the past few days on a different system:
* use routes with different metrics, have the fallback route the worse
(higher) metric
* adjust routes when the primary uplink goes away, e.g. by pinging a
known destination.


- Hubert

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...