Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2019-09-17,master
commit 5f6dd8ebaa54e23a7024619928056fcee312ad59 Author: Sven Eckelmann sven@narfation.org Date: Tue Sep 17 10:28:36 2019 +0000
doc: batman-adv/OGMv2
5f6dd8ebaa54e23a7024619928056fcee312ad59 batman-adv/OGMv2.textile | 53 ++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 27 deletions(-)
diff --git a/batman-adv/OGMv2.textile b/batman-adv/OGMv2.textile index ed0b3fa..649ed56 100644 --- a/batman-adv/OGMv2.textile +++ b/batman-adv/OGMv2.textile @@ -35,15 +35,15 @@ Each node periodically (OGM interval) generates a single OGM which is broadcaste
+The Originator Message 2 (OGMv2) Format:+
- * Packet type: Initialize this field with the ELP packet type. - * Version: Set your internal compatibility version. - * TTL: Initialize with BATADV_TTL - * Flags: not used - * Sequence number: On first broadcast set the sequence number to an arbitrary value and increment the field by one for each following OGMv2. - * Originator Address: Set this field to the primary MAC address of this B.A.T.M.A.N. node. - * TVLV length: Length of the TLVL data appended to the OGM - * Throughput: Throughput metric value in 100 kbit/s. Initialize with BATADV_THROUGHPUT_MAX_VALUE - * TVLV data: Appended TVLV data for the originator. See [[TVLV]] for a detailed description. +* Packet type: Initialize this field with the ELP packet type. +* Version: Set your internal compatibility version. +* TTL: Initialize with BATADV_TTL +* Flags: not used +* Sequence number: On first broadcast set the sequence number to an arbitrary value and increment the field by one for each following OGMv2. +* Originator Address: Set this field to the primary MAC address of this B.A.T.M.A.N. node. +* TVLV length: Length of the TLVL data appended to the OGM +* Throughput: Throughput metric value in 100 kbit/s. Initialize with BATADV_THROUGHPUT_MAX_VALUE +* TVLV data: Appended TVLV data for the originator. See [[TVLV]] for a detailed description.
<pre> 0 1 2 3 @@ -83,33 +83,32 @@ Each step is performed per potential outgoing interface where the OGMv2 may be r
The following checks are performed before updating the metric:
- * *Protection window check:* If the OGMv2s sequence number is older than BATADV_OGM_MAX_AGE or newer than the BATADV_EXPECTED_SEQNO_RANGE, and the protection window is active, the packet is silently dropped. If both conditions are met but the protection window is not active yet, the OGMv2 is allowed but the protection window gets activated. - * *Age check:* If the sequence number is strictly older than the last OGMv2, the packet is silently dropped. The only exception is when the protection window has just been activated, then the OGMv2 can pass. +* *Protection window check:* If the OGMv2s sequence number is older than BATADV_OGM_MAX_AGE or newer than the BATADV_EXPECTED_SEQNO_RANGE, and the protection window is active, the packet is silently dropped. If both conditions are met but the protection window is not active yet, the OGMv2 is allowed but the protection window gets activated. +* *Age check:* If the sequence number is strictly older than the last OGMv2, the packet is silently dropped. The only exception is when the protection window has just been activated, then the OGMv2 can pass.
If the initial checks above have passed, the internal stats are updated:
- * the last seen timestamps of the router and the originator are updated - * the last sequence number and ttl values are adopted - * if the link throughput to the neighbor this OGMv2 was forwarded by is *lower* than the path throughput of the OGMv2, then this lower link throughput is adopted - * Forward penalties are applied: - - * if the considered interface is the *default* interface, no penalty is applied - * if the incoming and considered outgoing interface is the same *half duplex* interface and the reported throughput is larger than 1 MBit/s, the throughput is reduced by 50% - * Otherwise, a hop penalty is applied and the throughput is reduced by the according value (default 5.8% or 15/255). This is especially useful for "perfect" networks to create a decreasing metric over multiple hops. - * The throughput value with the penalties applied is stored for the router +* the last seen timestamps of the router and the originator are updated +* the last sequence number and ttl values are adopted +* if the link throughput to the neighbor this OGMv2 was forwarded by is *lower* than the path throughput of the OGMv2, then this lower link throughput is adopted +* Forward penalties are applied: +** if the considered interface is the *default* interface, no penalty is applied +** if the incoming and considered outgoing interface is the same *half duplex* interface and the reported throughput is larger than 1 MBit/s, the throughput is reduced by 50% +** Otherwise, a hop penalty is applied and the throughput is reduced by the according value (default 5.8% or 15/255). This is especially useful for "perfect" networks to create a decreasing metric over multiple hops. +* The throughput value with the penalties applied is stored for the router
h4. 3.2.3. Route Update
After that, we check the OGMv2 whether a router update should be done and the OGMv2 should be rebroadcasted
- * If the OGMv2 was received through a neighbor that is not (yet) a router, drop the OGMv2 +* If the OGMv2 was received through a neighbor that is not (yet) a router, drop the OGMv2
The passing OGMv2 will be considered for a router update:
- * If the OGMv2 has been received from the best router, no change is necessary - * If no router has been selected yet, the received router becomes the selected router immediately - * If the throughput from the received router is higher than the throughput via the selected router, the received router becomes the selected router - * Also, if the sequence number is by at least OGM_MAX_ORIG_DIFF higher than the last received sequence number from the selected router, the received router becomes the selected router. +* If the OGMv2 has been received from the best router, no change is necessary +* If no router has been selected yet, the received router becomes the selected router immediately +* If the throughput from the received router is higher than the throughput via the selected router, the received router becomes the selected router +* Also, if the sequence number is by at least OGM_MAX_ORIG_DIFF higher than the last received sequence number from the selected router, the received router becomes the selected router.
If the OGMv2 has been received by the (now) selected router, the OGM is forwarded on the considered outgoing interface (except for the *default* interface). However, the OGMv2 is not forwarded if another OGMv2 has been forwarded with the same sequence number.
@@ -119,8 +118,8 @@ h3. 4. Re-broadcasting other nodes' OGMv2s
When an OGMv2 is to be re-broadcasted some of the message fields must be changed others must be left unchanged. All fields not mentioned in the following section remain untouched:
- * The TTL must be decremented by one. If the TTL becomes zero (after the decrementation) the packet must be dropped. - * The Path throughput for the considered outgoing interface is adopted +* The TTL must be decremented by one. If the TTL becomes zero (after the decrementation) the packet must be dropped. +* The Path throughput for the considered outgoing interface is adopted
The OGMv2 is then rebroadcasted on the specific outgoing interface.