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

grml-terminalserver-config fails when multiple networks are present #4

Open
Spida opened this issue Nov 15, 2018 · 1 comment
Open
Labels
grml-release Grml ISO release specific issues help-wanted Lack of resources, please contribute if it's important for you

Comments

@Spida
Copy link

Spida commented Nov 15, 2018

I tried to run grml-terminalserver from 2017.05 in a virtualbox-5.2. The first network interface presented to grml was configured to NAT the hosts network. The second network was a usb network adapter (in my case a Lenovo USB3 with RTL8153, driver rmmod'ed on host) forwarded in the VM. My intention was to use the first (NAT) network to get internet, the second (usb) network for pxe-boot clients.

What I would have expected:
I would have expected to be asked which interface to use for the pxe-clients, configure the interface (if not already up) choose a dhcp client IP range and the boot (image) options.

What happened instead:
I was asked, as expected, which interface to use. I was then asked to configure both interfaces with IP, netmask, broadcast, default gateway, DNS server. Setting that configuration failed, I was unable to proceed to the configuration of the DHCP server.

Initial analysis:
(a) netcardconfig starts with running "ifdown $DV" (line 171), which fails since the device is neither configured in /etc/network/interface nor up.
(b) I do not understand how the endless loop in grml-terminalserver-config (lines 161 to 167) is supposed to be terminated. If I comment out the loop, it works for me
(c) the default configuration suggested by grml-terminalserver-config does not work for me. in the default, it suggest a default gateway for my second interface, which results in getting "RTNETLINK answers: File exists" since it is not useful to have two default gateways, so I need to skip the second default gateway (may be part of the problem)
(d) the default client ip range (to be put into the dnsmasq configuration) is suggested without regard for the configuration of the network interface. imo, the default should be chosen from INSIDE the network range of the configured interface

@jkirk jkirk added grml-release Grml ISO release specific issues help-wanted Lack of resources, please contribute if it's important for you labels Oct 23, 2019
mika added a commit to grml/grml-network that referenced this issue Aug 17, 2022
…ists already

When multiple NICs are present, a default gateway might exist already,
while adding another default gateway then fails and is confusing.
So instead let's present an empty input text dialog then, so the
defaults should work fine.

See grml/grml-terminalserver#4
@mika
Copy link
Member

mika commented Aug 17, 2022

So I managed to look into this those days, you raised some good points, thanks @Spida!

Regarding your analysis:

a) this is sadly necessary due to the way ifupdown works, but if someone is aware of a nice way to detect that the device really is unconfigured and ifdown $device is unneeded, I'd be more than happy to rework this!
b) the loop terminates as soon as a valid IP configuration is detected (this is related to (c) here as you already anticipated)
c) indeed, that's something that bugged me also, took care of this in grml/grml-network@5681e2b, released as grml-network v0.14.0
d) the default client IP range should be suggested from within the provided network configuration, though there was a stupid bug regarding the actual IP range, with bc3bf20 (released as grml-terminalserver v0.104.0) this should be better now, though if you have any further suggestions how to improve that please let us know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grml-release Grml ISO release specific issues help-wanted Lack of resources, please contribute if it's important for you
Projects
None yet
Development

No branches or pull requests

3 participants