Bah, i hit the wrong button before finishing the mail :)
Hi liu,
Hello, eveyone, I am learning the batman.adv recently.
We know that batman.adv works on layer 2. When the network topology change, batman.adv can know this change and handle it. But the IP layer doesn't know that. How to make IP layer handle the change of network topology?
The IP layer does not need to know - to the upper layers, a batman-adv network appears to be a network where all nodes are just one hop away - although they might be more far away in practice. So if you insert an IP packet, it will get transported automatically to the right destination (provided batman-adv knows where that is), even over multiple hops.
For example, I have 3 mesh nodes, client node A, gateway node B and geteway node C. A connects to internet via B. Then I shutdown B. I guess A will switch to C as it's gateway node automatically. But it's not so. A continuously send the ARP request packet to search the MAC address of B. The default gateway is still B, not C.
This will only work if the gateways IP stays the same. This could work like that:
- connect B and C to the same LAN, and enable bridge loop avoidance in
batman-adv
- This LAN should have only one router to the internet (e.g. your ADSL
modem).
- bridge the batman-interface bat0 and you Ethernet interface eth0 using a
linux bridge device
Please see our quick start guide for more information on the topic:
http://www.open-mesh.org/projects/batman-adv/wiki/Quick-start-guide#Mixing- non-BATMAN-systems-with-batman-adv
So, how should I do to make the IP layer be aware of that the gateway has swithed to another one?
By using bridges, you always send to the same gateway in your LAN, which does not change IP or MAC addresses - so your clients don't need to be aware of the topology change.
Cheers, Simon