public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Freifunk Dresden <freifunk@ddmesh.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@open-mesh.net>
Subject: Re: [B.A.T.M.A.N.] no gateway / tun interface / default route
Date: Sun, 21 Oct 2007 19:35:09 +0200	[thread overview]
Message-ID: <471B8DCD.2020204@ddmesh.de> (raw)
In-Reply-To: <200710201300.01043.axel@open-mesh.net>

Hello,

If I use SNAT to change the source address, all other nodes
know where to send the ping answers:

The Ip of the wlan is 10.12.0.1
the ip of bbs is 172.16.0.1
iptables -t nat -I POSTROUTING -o bbs -j SNAT --to 10.12.0.1

A.eth1-A.bbc=====backbone=========B.bbs-B.eth1 -------------------C.eth1----------D.eth1
 10...1  172...1                 172...2  10...2                  10...3          10...4

Sendint from A to D is not a problem, all packages the have the
ip 172... as source address will be assigned the new 10er IP.
Node B,C and D will send answer back to the 10er IP.
Node B has a route to A over backbone (bbs).

>> If the 
>> only connection is via bbs or bbc the packages are natted to 172.12.. 
>> Only 
>> the the routers that are connected directly via the backbone (bbc->bbs)
>> should have routing entries of 172.16.0.0/12. All other nodes in the
>> network do not need to know these addresses and therefore I don't HNA
>> these.
> How could any non-neighboring node respond to a packet with a 172.12.. source 
> address?
> I would say you better NAT to the IP addresses of your  10.10.0.0/8 because 
> these are the addresses known by any node. But be careful not to NAT any OGMs 
> and any forwarded traffic.
What can happen if I do the SNAT? I think that OGMs are not FORWARDED. They
only go OUT or come IN. because batmand does not use the iptable roles
it does not know about the change of the source address.
The OGMs are generated for the original interface ip. OGMs that A sends to B
will be received via WLAN and also via BBS. When I understand batmand right
it uses the interface where the OGMs are comming from to calulate the routes
(not the source ip).

Bye Stephan


  reply	other threads:[~2007-10-21 17:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18 20:14 [B.A.T.M.A.N.] no gateway / tun interface / default route Freifunk Dresden
2007-10-18 23:35 ` Axel Neumann
2007-10-19 10:32   ` Axel Neumann
2007-10-19 10:51   ` Marek Lindner
2007-10-19 17:17     ` Freifunk Dresden
2007-10-19 17:52       ` Marek Lindner
2007-10-19 19:10         ` Freifunk Dresden
2007-10-20 11:00       ` Axel Neumann
2007-10-21 17:35         ` Freifunk Dresden [this message]
2007-10-21 18:07           ` Axel Neumann
2007-10-21 19:41             ` Freifunk Dresden
2007-10-22 12:58               ` Axel Neumann
2007-10-25 10:33                 ` Freifunk Dresden
2007-10-25 11:13                   ` Axel Neumann

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=471B8DCD.2020204@ddmesh.de \
    --to=freifunk@ddmesh.de \
    --cc=b.a.t.m.a.n@open-mesh.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox