Git Product home page Git Product logo

Comments (8)

anatol avatar anatol commented on May 17, 2024

Hi @benalexau thank you for this great high-quality issue report.

I actually never tried a configuration with 2 ethernet interfaces.

the DNS server is on a different subnet than the server's IP address

I do not think it should be a problem. Requests to DNS should be handled the same way as any other IP endpoint. Any non-subnet IP packets should be routed to the default gateway.

Unused ethernet port enp1s0

Having inactive ethernet ports is definitely an issue for the booster network init code. Currently booster listens for udev events and once it receives ADD event for a net device it starts initializing it. If it is unable to initialize the interface booster returns an error which we see at eth0: DHCP: no ACK received.

Booster should have a way to specify active interface(s). The other interfaces should be ignored.

Note that in your case the systems sees so called predictable network name while booster sees raw interface names (before the systemd rename).

A quick test/fix for this part would be modifying booster's udevListener() loop and filter out the inactive interface (eth0):

if iface=="eth0" {
  continue
}

I am travelling next week and my response will be slow. Feel free to modify the sources as mentioned above. Otherwise I will try it once I am back to my workstation.

from booster.

anatol avatar anatol commented on May 17, 2024

One way to debug the issue and make sure that it will not come back is to have an integration test to cover this use-case.

Is there a way to reproduce the setup you have (2 ethernet ports + DNS outside of subnet) with QEMU?

from booster.

anatol avatar anatol commented on May 17, 2024

Actually reading booster's DHCP handing code I realized that this codepath does not set the gateway. So yeah it is an issue with having DNS outside of the subnet. And it should be fixed.

Here is how the default route initialized with static configuration. runDhcp() should do something similar.

defaultRoute := netlink.Route{Gw: gw}
if err := netlink.RouteAdd(&defaultRoute); err != nil {
   return err
}

from booster.

anatol avatar anatol commented on May 17, 2024

@benalexau the first issue (DNS outside of subnet) should be fixed now. PTAL. I do not have an integration test for this use-case unfortunately. I need qemu to create 2 network interfaces with DHCP and DNS outside of subnet. If you or someone else knows how to do it please share your knowledge.

As of the second issue (handling multiple network interfaces) I need to think how to implement it correctly. booster needs a config option that specifies what interfaces should be enabled. One caveat with it is that Linux can rename interface names so we need a reliable way to identify interfaces. Note that network MAC address might be changed as well.

from booster.

benalexau avatar benalexau commented on May 17, 2024

I just ran a test as follows:

  • Server @ 192.168.110.101/24 running AUR:booster-git 0.2.r13.gd78ff6a-1
  • DNS @ 192.168.1.1/24 assigned by DHCP
  • Tang @ 192.168.50.105/24 resolved by DNS

So we have Booster receiving a DHCP address on one subnet, talking to a DNS server on a different subnet, and then communicating with a Tang server on a third subnet. This all worked fine!

Thanks @anatol!

from booster.

anatol avatar anatol commented on May 17, 2024

It sounds great @benalexau

The second part of the issues (handling multiple conflicting interfaces) should be resolved now a well. Please take a look and let me know if you see any issues.

from booster.

benalexau avatar benalexau commented on May 17, 2024

@anatol I tested AUR:booster-git 0.3.r20.g764b6ab-1 on the above server and it did not give any errors or unusual messages during boot. I think it's working well.

from booster.

anatol avatar anatol commented on May 17, 2024

Great to hear it. Thank you for testing.

from booster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.