Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface fallback from preferred to next highest priority #1518

Open
matte1 opened this issue Dec 13, 2022 · 4 comments
Open

Interface fallback from preferred to next highest priority #1518

matte1 opened this issue Dec 13, 2022 · 4 comments

Comments

@matte1
Copy link

matte1 commented Dec 13, 2022

I'm trying to set my configuration up such that it primarily uses eth0; however, many connections are local and if the Ethernet adapter lost power or became unplugged I would like those local connections to continue to work. My expectation here is that I could set the ethernet to be preferred and in the event that interface goes down it would switch to using local i.e.

        <NetworkInterface priority="1" address="192.168.254.1" multicast="true"></NetworkInterface>
        <NetworkInterface priority="0" address="127.0.0.1" multicast="false"></NetworkInterface>

However in practice I see that it always selects local which means I don't see any traffic over the ethernet interface. First of all is what I'm trying to do possible with cyclonedds and then second how can I set my configuration file to get this behavior?

@matte1
Copy link
Author

matte1 commented Jan 4, 2023

Bump!

@matte1 matte1 changed the title Interface fallback from preferred to next highest priority[ Interface fallback from preferred to next highest priority Jan 4, 2023
@eboasson
Copy link
Contributor

eboasson commented Jan 9, 2023

Thanks for Bump!-ing it 🙂

With those priority settings I would expect it to prefer ethernet (especially with multicast disabled over loopback); what I wouldn't expect it to do is to gracefully fall back when the ethernet disappears, simply because it doesn't yet keep track of interfaces coming up and going down. (That needs some rework of internals, there's a PR open that I really want to merge but never seem to get around to: #1080 ... yes, it's old ...)

Anyway, this clearly needs a bit more attention.

@matte1
Copy link
Author

matte1 commented Jan 16, 2023

Thanks eboasson! This is a key safety feature for us. Do you expect to revive that PR anytime soon or should I look for a workout around to this issue?

@eboasson
Copy link
Contributor

I am pretty sure reviving it means a bit of rework because of the massive cleanup of names and header file organisation that @dpotman did, but I think that beyond that it should basically still apply. I'll have to double-check the progress on "CQ" for including some 3rd party code in the project, bump that if it stalled.

What I am not sure about anymore is why it remained in draft status. The real trouble here is that I don't know when I'll be able to do it. I'd love to fetch it, update it, and merge it if everything checks out. It is a bit of a scary PR because it changes some quite fundamental bits that are really hard to test. But the alternative to updating & merging this PR is to do it all over, because it does rework some weak spots that do need this TLC.

Would you have time and be willing to have a quick look yourself what it means to update it? I find it is much easier to answer questions when there are many things vying for your attention than it is to do substantial real work. Sadly, because I rather like the real work ... Otherwise I'll do my best to make it happen this time round ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants