multi icon indicating copy to clipboard operation
multi copied to clipboard

Change metrics at runtime

Open irl opened this issue 7 years ago • 7 comments

Is it possible to change metrics for the default route at runtime?

I have an application that I would like to run generating traffic over one interface at a time, so I need to promote and demote the routes to get the traffic generated over the correct one.

I can listen to netfilter messages to make sure the correct thing has happened and that nothing is interrupted, but I'm not sure how to make the correct thing happen to begin with.

Will a SIGHUP cause the yaml file to be reloaded, or is there another way to perform runtime reconfiguration?

irl avatar Sep 13 '16 17:09 irl

This is unfortunately not possible at the moment, but is a very good idea. Not sure when or if I will have time to look at it, unless it fits into one of my use-cases (or the people that pay me :)) Listening to a signal and then reloading the yaml file sounds like a good approach, so if you have to implement it then it would be much appreciated.

However, I have used source-based routing and the routing tables etc. is configured correctly. Thus, if you can modify your application to bind to IP (and potentially interface), then the traffic will be sent over the correct interface. In order to get or monitor all available interfaces, there are many solutions. You can for example listen to RTM_NEWROUTE messages and then filter on if the message describes a default route or not.

kristrev avatar Sep 13 '16 21:09 kristrev

I was not aware this was originally a request coming from the MAMI project, which makes the whole funding and priority issue much easier. We are fixing some other stuff related to the rules now, and I will incorporate your feature request in that work.

kristrev avatar Sep 16 '16 10:09 kristrev

Is the repo the development code you are having now, or ... not? :)

sferlin avatar Sep 16 '16 10:09 sferlin

Yes, this is where the old-school IPv4 routing magic happens.

kristrev avatar Sep 16 '16 10:09 kristrev

@kristrev Ah cool. I'm looking at modifying PATHspider for source-based routing, but if you get to implementing this feature before I get to that modification then it would be very much appreciated. (:

irl avatar Sep 16 '16 10:09 irl

Let us see who finishes first :) I just got delivered some more urgent tasks, so not sure when I will get to this. Will update this issue as I progress, I have a design ready so it is just a matter of finding a few spare hours.

Though, I think adding proper binding support to Pathspider would be great anyway :)

kristrev avatar Sep 16 '16 18:09 kristrev

Do you already have something on this? ( I am afraid i cannot avoid it, so I will have to do it if not available).

sferlin avatar Jan 12 '17 14:01 sferlin