Default Gateway for a system v/s Default gateway per Interface

Ratan Gupta ratagupt at linux.vnet.ibm.com
Tue Jun 23 19:10:37 AEST 2020


Hi Alexender,

I am not sure how it can be achieved through some compile time option(as 
the existing dbus interface requires changes. Might be version Dbus 
Interfaces which is currently not supported.

Phosphor-networkd uses systemd-networkd as backend which supports 
multiple default gateway as fall back gateway without implementing 
policy based routing(Both gateways are on the main routing table).

Ratan

On 6/20/20 4:10 AM, Alexander Amelkin wrote:
> Please, Ratan, if you implement those per-interface gateways again, 
> could you leave an option to have a single system-wide default gateway 
> only?
>
> I honestly don't see any use for multiple gateways without policy 
> routing being implemented, and then I don't see any use for policy 
> routing in a BMC (as opposed to a router). So I would like to keep us 
> from unneeded questions from the customers, and so I would prefer to 
> have only a single gateway, as well as single sets of DNS and NTP 
> servers without having to patch across the whole OpenBMC codebase.
>
> If there was a compile-time option (distro/machine feature?) to use 
> either per-interface or system-wide gateway/DNS/NTP, that would be 
> very nice.
>
> Thank you.
> Alexander.
>
> P.S. Sorry for sending this twice, forgot to include the list the 
> first time.
>
> 24.04.2020 18:06, Ratan Gupta пишет:
>> Hi All,
>>
>> Currently, OpenBMC stack allows a single default gateway for the 
>> system. Latest kernel allows to configure multiple default gateways.
>>
>> Eg: In a system with two interfaces eth0 and eth1,
>>
>> eth0 configured with static address and having gateway(192.168.2.1)
>> eth1 configured with DHCP and gets Gateway from DHCP server (10.10.10.1)
>> ~~~~~~~~~~~~~
>> Kernel IP routing table
>> Destination     Gateway         Genmask         Flags   MSS Window  
>> irtt Iface
>> 0.0.0.0         19.168.2.1      0.0.0.0         UG        0 
>> 0          0 eth0
>> 0.0.0.0         10.10.10.1      0.0.0.0         UG        0 
>> 0          0 eth1
>> ~~~~~~~~~~~~~~
>>
>> Kernel will first try using the default gateway having higher metric 
>> value and then fall back to the lower.
>>
>> More references: 
>> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_the_default_gateway
>>
>> I'm proposing to make this change in the openBMC D-bus interfaces to 
>> tie the gateway property with the Ethernet interface schema instead 
>> of System configuration.
>>
>> Ethernet Interface Schema =>
>>
>> https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Network/EthernetInterface.interface.yaml 
>>
>>
>> System Configuration Schema =>
>>
>> https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Network/SystemConfiguration.interface.yaml 
>>
>>
>>
>> Please let me know your suggestions.
>>
>> Regards
>> Ratan Gupta
>>


More information about the openbmc mailing list