-
Notifications
You must be signed in to change notification settings - Fork 45
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
Gateway should be per-interface, ideally generalized to routes #26
Comments
Seems it is same as openbmc/openbmc#2671 |
In that case this is a bug in the systemd-networkd, where if you have the gateway(Gateway=fe80::1) in eth0.network as well as eth1.network then we should have the following routes in the routing table. 2002:af4:7480:1467:: dev eth0 metric 256 |
@wak-google : Can we close this one as we have already implemented the interface specific gateway. |
Whenever vmi sends down the dhcp ip to the biostable, all the properties (ip address, gateway, prefix length) will be updated whenever one of them changes in the biostable. The flow will be like: * Dbus signal for method change from static to DHCP or vice versa * Dbus signal for IP address change on biostable - fetch from biostable and update all 3 props on dbus * Dbus signal for prefix length change - fetch from biostable update all 3 props on dbus * Dbus signal for gateway change - from biostable update all 3 props on dbus Since the above 4 events happens asynchronously, there were places when the actual value of a biostable attribute is missed (i.e, attribute value fetched even before getting updated) and hypervisor app dbus gets updated with a wrong value. To avoid this issue, when a propertiesChanged signal is caught by the hypervisor app, then that particular attribute value of the biostable is fetched and updated onto the dbus, instead of updating all dbus properties at once. Tested By: * set dhcp to true * set method to static using patch on Bios endpoint: PATCH -d '{"Attributes": {"vmi_if1_ipv4_method": "IPv4Static"}}' \ https://$bmc/redfish/v1/Systems/system/Bios/Settings * configure static ip via patch on Bios endpoint: PATCH -d '{"Attributes": {"vmi_if1_ipv4_ipaddr": "10.5.20.28", \ "vmi_if1_ipv4_gateway": "10.5.20.1", "vmi_if1_ipv4_prefix_length": 22}}' \ https://$bmc/redfish/v1/Systems/system/Bios/Settings * check if the dbus contains the same values as the biostable Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Currently, the daemon writes the gateway route out to all of the interface files. This causes systemd-networkd to load that route for each interface into the kernel, and allows the kernel to decide which route to keep. Thankfully, this works for IPv4 because the kernel able to filter out the requests which don't have addresses matching a network configured for an interface. Unfortunately, for IPv6 it is common to have routers in the local subnet, which all interfaces share. So the kernel tries to instantiate the gateway on all interfaces and ends up doing something weird. Simply by manually editing the configurations and using only a single gateway entry, we can get the system out of the broken state.
Ideally we would just generalize the whole thing to a routes interface and allow clients to specify arbitrary routes that map more closely to systemd-networkd / linux primitives.
00-bmc-eth0.network
00-bmc-eth1.network
ip -6 route
Expected routes
The text was updated successfully, but these errors were encountered: