OpenBMC Network Route Management: Metric and Static Route config support

Sunitha Harish sunithaharish04 at gmail.com
Tue Jul 26 19:25:30 AEST 2022


On 23-06-2022 15:57, raviteja bailapudi wrote:
> Hi, Jiaqing
>
> We have noticed an issue while using Static IPv4 addresses on both 
> eth0 and eth1.
> We have configured a static private IP with the matching subnet of 
> Laptop Connected on eth0 andconfigured a static public IP on eth1.
> Both routes have got the metric value 0. eth0 route is the first entry 
> of the routing table which was being used for routing.
>
>
> Ping to eth1 IP <9.x.x.84> does not work and that Eth0 private IP 
> pings from the laptop connected.
>
> *IPConfig:*
>
>
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast 
> qlen 1000
>
> link/ether 08:94:ef:82:4c:76 brd ff:ff:ff:ff:ff:ff
>
> inet 169.254.7.123/16 <http://169.254.7.123/16> brd 169.254.255.255 
> scope link eth0
>
> valid_lft forever preferred_lft forever
>
> inet 10.x.x.100/24 brd 10.6.6.255 scope global eth0.—> Private IP 
> (Connected to laptop)
>
> valid_lft forever preferred_lft forever
>
> inet6 fe80::a94:efff:fe82:4c76/64 scope link
>
> valid_lft forever preferred_lft forever
>
> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast 
> qlen 1000
>
> link/ether 08:94:ef:82:4c:77 brd ff:ff:ff:ff:ff:ff
>
> inet 9.x.x.84/24 brd 9.x.x.255 scope global eth1. —> Public IP
>
> valid_lft forever preferred_lft forever
>
> inet6 fe80::a94:efff:fe82:4c77/64 scope link
>
> valid_lft forever preferred_lft forever
>
>
>
> *Routing table:*
>
> Kernel IP routing table
>
> Destination Gateway Genmask Flags MSS WindowirttIface
>
> 0.0.0.010.x.x.1 0.0.0.0 UG 0 0 0 eth0
>
> 0.0.0.0 9.x.x.10.0.0.0 UG00 0 eth1<<==== not pingable.
>
> 9.x.x.0 0.0.0.0 255.255.255.0 U00 0 eth1
>
> 10.x.x.0 0.0.0.0 255.255.255.0 U0 00 eth0
>
> 169.254.0.00.0.0.0 255.255.0.0U0 00 eth0
>
>
>
> But with DHCP enabled on eth1, dhcp subnet with metric value 1024 was 
> always at the bottom and was reachable
> as DHCP routesget priority over static routes.
>
>
Its good if Redfish has a way to set the metric value as an optional 
parameter while user PATCHes the Static IP address. This can be used by 
phosphor-networkd to set the route priority on that interface while 
adding route for this IP.

>
> Regards,
>
> Raviteja
>
>
> On Thu, Jun 23, 2022 at 12:34 PM Jiaqing Zhao 
> <jiaqing.zhao at linux.intel.com> wrote:
>
>     Hi, Raviteja
>
>     Can you help explain the routing issue you met?
>
>     I've also met a metric-related issue. When there are 2 interfaces,
>     one use DHCP,
>     the other use Static, systemd-networkd sets the metric 1024 on the
>     DHCP-assigned
>     default routev (metric for static default gateway is 0), which
>     causing peers
>     only reachable via the DHCP-assigned default route cannot be accessed.
>
>     And in current OpenBMC implementation, I think we should allow
>     setting null to
>     Gateway of IPv4StaticAddress to not set default route on that
>     interface.
>
>     Thanks,
>     Jiaqing
>
>     On 2022-06-22 18:50, raviteja bailapudi wrote:
>     > Hi Team
>     >
>     > We have hit network routing issues while using Static IPv4
>     addresses on
>     > both eth0 and eth1,  as both default gateways at the interfaces
>     were of the
>     > same metric value. To solve this problem we are planning to
>     provide an
>     > interface for admins to set the metric value for the gateway
>     while setting
>     > up the Static IPv4 network on BMC.
>     >
>     >
>     > To enable users to connect from outside-subnet clients, we also
>     need to
>     > support static routes on BMC.
>     >
>     >
>     > I have started a thread in redfish forum as well
>     >
>     >
>     https://redfishforum.com/thread/683/network-routing-table-management-support
>     >
>     >
>     > Please share your views on the same.
>     >
>     >
>     >
>     > Regards,
>     >
>     > Raviteja
>     >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220726/e11464e0/attachment.htm>


More information about the openbmc mailing list