On Sat, 7 Apr 2001, Nick Rogness wrote:
>
> Multi-Destination gif tunnel
>
> Anybody had any success at setting these things up? I have a couple of
> questions...maybe someone can answer:
Since noone answered the mail, I will post the solution in case
someone needs this info and searches the mail archives. Maybe it
could be added in the gif man page at some point.
>
> In gif(4) man:
>
> "With IFF_LINK0 interface flag, gif can be configured to implement
> multi-destination tunnel. With IFF_LINK0, it is able to configure egress
> point to IPv4 wildcard address (0.0.0.0) or IPv6 unspecified address
> (0::0)."
>
> Umm ok:
>
> # ifconfig gif0 link0
> # gifconfig gif0 inet 10.0.0.1 0.0.0.0
>
OK, 10.0.0.1 being your outside IP.
> "In this case, destination address for the outer IP header is determined
> based on the routing table setup."
>
> Ok, what about the inner header setup?
The inner header is setup with ifconfig, no different than it is
with a bi-directional gif tunnel. So:
hadji# ifconfig gif0 172.16.1.1 172.16.1.2
172.16.1.1 being Your inside source IP and 172.16.1.2 being the
inside destination IP.
>
> And what about the outside destination ip? How do you
> configure that to go out gif0 ? With the -iface flag [tried it
> didn't work].
The tricky part here is to remove the existing interface route
that is added with the above ifconfig command.
hadji# route delete 172.16.1.2
I'm sure there are variations on how to get this to work
without removing this route, but I chose to remove the route
instead.
Then add the route for gif outside dest IP like so:
hadji# route add 172.16.1.2 24.13.10.5 -iface 172.16.1.1
So the packet going outbound will have a header like this:
10.0.0.1 > 24.13.10.5 : 172.16.1.1 > 172.16.1.2
|____________________| |______________________|
^ ^
Outside header Inside header
Now, Setup the other side with the same strategy:
thunder# ifconfig gif0 link0
thunder# gifconfig gif0 inet 24.13.10.5 0.0.0.0
thunder# ifconfig gif0 172.16.1.2 172.16.1.1
thunder# route delete 172.16.1.1
thunder# route add 172.16.1.1 10.0.0.1 -iface 172.16.1.2
Nick Rogness <[EMAIL PROTECTED]>
- Keep on Routing in a Free World...
"FreeBSD: The Power to Serve!"
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message