Static routing without flood question
Hi Johannes and all,
Is it possible to add an option to the static routing strategy, such that if it's enabled, a bundle is sent only via the first matching route, instead of all of the available routes for the bundle destination? This would avoid flooding.
Best regards, Sergey Sireskin
Hi,
there is no option to do that. The only way would be to change the behavior of the StaticRoutingExtension in the code.
Kind regards, Johannes Morgenroth
Am 21.08.2013 13:57, schrieb ssireskin@gmail.com:
Hi Johannes and all,
Is it possible to add an option to the static routing strategy, such that if it's enabled, a bundle is sent only via the first matching route, instead of all of the available routes for the bundle destination? This would avoid flooding.
Best regards, Sergey Sireskin
Johannes,
I know that there is no such an option, I was asking about the possibility of adding such an option.
I tried to add iter = _routes.end(); after transferTo(route.getDestination(), task.bundle); in StaticRoutingExtension.cpp, but it didn't help.
Could you please advise, which part of StaticRoutingExtension I should look at?
Best regards, Sergey Sireskin
2013/8/21 Johannes Morgenroth morgenroth@ibr.cs.tu-bs.de
Hi,
there is no option to do that. The only way would be to change the behavior of the StaticRoutingExtension in the code.
Kind regards, Johannes Morgenroth
Am 21.08.2013 13:57, schrieb ssireskin@gmail.com:
Hi Johannes and all,
Is it possible to add an option to the static routing strategy, such that if it's enabled, a bundle is sent only via the first matching route, instead of all of the available routes for the bundle destination? This would avoid flooding.
Best regards, Sergey Sireskin
-- !! This message is brought to you via the `ibr-dtn' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to <ibr-dtn-request@ibr.cs.tu-bs.** de ibr-dtn-request@ibr.cs.tu-bs.de> !! or look at https://www.ibr.cs.tu-bs.de/**mailman/listinfo/ibr-dtnhttps://www.ibr.cs.tu-bs.de/mailman/listinfo/ibr-dtn .
Look at the code starting at line 175:
// remove all routes of the previous round routes.clear();
// look for routes to this node for (std::list<StaticRoute*>::const_iterator iter = _routes.begin(); iter != _routes.end(); ++iter) { const StaticRoute *route = (*iter); if (route->getDestination() == task.eid) { // add to the valid routes routes.push_back(route); } }
In this part the router selects the valid routes for a neighbor. The best way would be to limit routes here, so that only the routes are selected where no other path exists. "dtn::core::BundleCore::getInstance().getConnectionManager().getNeighbors()" gives you a list of current neighbors.
The reason way you can not simply abort a loop here is that bundle routing is much different to usual network routing. Here, the extensions are select the bundles to forward in rounds and in each round only one neighbor is considered. So you can not know, if another round has already forwarded the bundle to another neighbor.
Kind regards, Johannes Morgenroth
Am 21.08.2013 14:49, schrieb ssireskin@gmail.com:
Johannes,
I know that there is no such an option, I was asking about the possibility of adding such an option.
I tried to add iter = _routes.end(); after transferTo(route.getDestination(), task.bundle); in StaticRoutingExtension.cpp, but it didn't help.
Could you please advise, which part of StaticRoutingExtension I should look at?
Best regards, Sergey Sireskin
Thank you for helping me, Johannes!
I'm not familiar with ibr-dtn logic and I'm not a good programmer, so it is difficult to me to understand your explanation. I understood, that bundles are selected for forwarding in rounds, one round for each neighbor. But I can't understand this part: "only the routes are selected where no other path exists", mainly "where no other path exists". Could you please explain the algorithm in more detail?
1. Get a list of current neighbors; 2. ...; 3. ...
Best regards, Sergey Sireskin
2013/8/21 Johannes Morgenroth morgenroth@ibr.cs.tu-bs.de
Look at the code starting at line 175:
// remove all routes of the previous round routes.clear();
// look for routes to this node for (std::list<StaticRoute*>::**const_iterator iter = _routes.begin(); iter != _routes.end(); ++iter) { const StaticRoute *route = (*iter); if (route->getDestination() == task.eid) { // add to the valid routes routes.push_back(route); } }
In this part the router selects the valid routes for a neighbor. The best way would be to limit routes here, so that only the routes are selected where no other path exists. "dtn::core::BundleCore::**getInstance().** getConnectionManager().**getNeighbors()" gives you a list of current neighbors.
The reason way you can not simply abort a loop here is that bundle routing is much different to usual network routing. Here, the extensions are select the bundles to forward in rounds and in each round only one neighbor is considered. So you can not know, if another round has already forwarded the bundle to another neighbor.
Kind regards, Johannes Morgenroth
Am 21.08.2013 14:49, schrieb ssireskin@gmail.com:
Johannes,
I know that there is no such an option, I was asking about the possibility of adding such an option.
I tried to add iter = _routes.end(); after transferTo(route.**getDestination(), task.bundle); in StaticRoutingExtension.cpp, but it didn't help.
Could you please advise, which part of StaticRoutingExtension I should look at?
Best regards, Sergey Sireskin
Hello.
As I understand you right, what you want is to select the "first" route for a specific destination and exclude other routes for the same destination.
Consider this routing table with patterns X and Y:
[1] bundles matching Y routed to A [2] bundles matching X routed to A [3] bundles matching Y routes to B
In each round you have to select the valid entries.
Assuming A and B is in your neighbor list, the algorithm might start with neighbor A and select these entries...
[1] bundles matching Y routed to A [2] bundles matching X routed to A
Now every bundle matching Y or X is forwarded to A.
As next the algorithm consider the neighbor C in another round and selects these routes:
[3] bundles matching Y routes to B
That forwards all bundles matching Y to B.
All together we have the situation that A and B gets all bundles matching Y. (That is the current behavior.)
To limit the routing, you need to limit the route selection. If the algorithm processes neighbor B, it can notice that there is also neighbor A available which has the same pattern assigned. Based on the ordering of node names it is possible to skip the routes already valid for another node. The result then is this route set.
[2] bundles matching X routed to A
Bundle matching pattern Y are now only forwarded to node A, if node A and B are available as neighbor.
Kind regards, Johannes Morgenroth
Am 21.08.2013 16:01, schrieb ssireskin@gmail.com:
Thank you for helping me, Johannes!
I'm not familiar with ibr-dtn logic and I'm not a good programmer, so it is difficult to me to understand your explanation. I understood, that bundles are selected for forwarding in rounds, one round for each neighbor. But I can't understand this part: "only the routes are selected where no other path exists", mainly "where no other path exists". Could you please explain the algorithm in more detail?
- Get a list of current neighbors;
- ...;
- ...
Best regards, Sergey Sireskin
Hello Johannes,
You understand me absolutely right. I have followed your instructions (as I understood them), but I didn't manage to achieve my goal. Please, have a look at the attached source code and dtnd log file after sending one ping bundle from node 227 to 232.
Here is my algorithm: 1. Find first neighbor in neighbor list which has eid == task.eid. 2. Find route with destination eid (in deed it is next hop eid, not destination eid, if my understanding is right) == task.eid and route destination eid == first neighbor eid. 3. If such a route is found - push_back. Else, skip this route destination.
According to the log file this code does something useless. It finds a route to a neighbor via another neighbor whose eid == task.eid.
Could you pleas help me fixing this code?
2013/8/21 Johannes Morgenroth morgenroth@ibr.cs.tu-bs.de
Hello.
As I understand you right, what you want is to select the "first" route for a specific destination and exclude other routes for the same destination.
Consider this routing table with patterns X and Y:
[1] bundles matching Y routed to A [2] bundles matching X routed to A [3] bundles matching Y routes to B
In each round you have to select the valid entries.
Assuming A and B is in your neighbor list, the algorithm might start with neighbor A and select these entries...
[1] bundles matching Y routed to A [2] bundles matching X routed to A
Now every bundle matching Y or X is forwarded to A.
As next the algorithm consider the neighbor C in another round and selects these routes:
[3] bundles matching Y routes to B
That forwards all bundles matching Y to B.
All together we have the situation that A and B gets all bundles matching Y. (That is the current behavior.)
To limit the routing, you need to limit the route selection. If the algorithm processes neighbor B, it can notice that there is also neighbor A available which has the same pattern assigned. Based on the ordering of node names it is possible to skip the routes already valid for another node. The result then is this route set.
[2] bundles matching X routed to A
Bundle matching pattern Y are now only forwarded to node A, if node A and B are available as neighbor.
Kind regards, Johannes Morgenroth
Am 21.08.2013 16:01, schrieb ssireskin@gmail.com:
Thank you for helping me, Johannes!
I'm not familiar with ibr-dtn logic and I'm not a good programmer, so it is difficult to me to understand your explanation. I understood, that bundles are selected for forwarding in rounds, one round for each neighbor. But I can't understand this part: "only the routes are selected where no other path exists", mainly "where no other path exists". Could you please explain the algorithm in more detail?
- Get a list of current neighbors;
- ...;
- ...
Best regards, Sergey Sireskin
participants (2)
-
Johannes Morgenroth
-
ssireskin@gmail.com