All of lore.kernel.org
 help / color / mirror / Atom feed
From: Predrag Balorda <predrag.balorda@gmail.com>
To: 'The list for a Better Approach To Mobile Ad-hoc Networking'
	<b.a.t.m.a.n@open-mesh.net>
Subject: [B.A.T.M.A.N.] batman gw nodes and routing (rv792)
Date: Sun, 11 Nov 2007 23:30:11 +0100	[thread overview]
Message-ID: <000301c824b2$6f055c20$4d101460$@com> (raw)
In-Reply-To: <840E3F681DF3D043B353C0FDD4A6C353ABFC97@ex9.hostedexchange.local>

This is my setup - I sincerely hope ascii-art holds up as it took some time
to create! :-)

                 gateway
Internet ---- 123.456.789.100      router1
                     10.0.0.1 --- 10.0.0.10             router2
router3
                         (ath0)   105.0.0.1 --batman-- 105.0.0.2 --batman--
105.0.0.3
                         (eth0)    10.0.1.0             10.0.2.0
10.0.3.0
                         (bat0) 169.254.0.0 --PtP-- 169.254.2.79
                         (bat0) 169.254.0.0 --------------PtP-----------
169.254.2.80

I have read the bmx pdf and it is excellent. Everything works as it should
on batman-exp  rv792. But I have a problem. The guide assumes that your
gateway to the public internet is my 'router1' and it also assumes that you
have a firewall running on all those routers.

It also ends up with double-nat (well, actually triple-nat in my case). I
have gotten rid of one level of nat (on router1). But I'm still left with a
double nat.

Nat happens when default route traffic from batman nodes is sent down bat0
tunnel and then once again when my gateway passes it onto the public ip
space.

I have succeeded in creating a setup where no nat is done when client nodes
connect to 10.0.0.0/24 network (10.0.0.0/24 hna on router1) but if I want to
go out onto the internet I simply have to do 

iptables -t nat -A POSTROUTING -o bat0 -j MASQUERADE

on each batman node, otherwise nodes themselves can get out but their eth0
clients cannot (i.e. from 10.0.2.0/24 or 10.0.3.0/24 - 10.0.1.0/24 doesn't
have this problem as it has a default route entry in the output of 'route' -
other batman nodes don't)

Can someone with a bit more experience in these matters give me a hand. I
will probably end up having to use batman on gateway node as well but I'd
rather have this possibility of a gw node not runnig batman.

Thanks again!

Pele


  reply	other threads:[~2007-11-11 22:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 14:23 [B.A.T.M.A.N.] routing problem? Stefano Scipioni
2007-11-10 11:43 ` Axel Neumann
2007-11-11 15:55   ` Stefano Scipioni
2007-11-11 17:16     ` [B.A.T.M.A.N.] routing problem? / Changes in exp rv790 Axel Neumann
2007-11-11 20:41       ` [B.A.T.M.A.N.] batmand crash / core dump Michael Burmeister-Brown
2007-11-11 22:30         ` Predrag Balorda [this message]
2007-11-12 14:31           ` [B.A.T.M.A.N.] batman gw nodes and routing (rv792) Axel Neumann
2007-11-11 22:34         ` [B.A.T.M.A.N.] vis and batman-exp (rv780-792) Predrag Balorda
2007-11-12  7:57           ` Stefano Scipioni
2007-11-12 13:53             ` Axel Neumann
2007-11-12 14:00               ` Predrag Balorda
2007-11-12 17:13         ` [B.A.T.M.A.N.] batmand crash / core dump Axel Neumann
2007-11-24 13:02           ` Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000301c824b2$6f055c20$4d101460$@com' \
    --to=predrag.balorda@gmail.com \
    --cc=b.a.t.m.a.n@open-mesh.net \
    --cc=pele@balorda.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.