OpenBMC Network Route Management: Metric and Static Route config support

raviteja bailapudi raviteja28031990 at gmail.com
Tue Jun 6 00:19:06 AEST 2023


Hi All


Gentle reminder for the feedback on Static route feature


I have pushed a DMTF proposal and DMTF PR for adding static route
configuration to EthernetInterface schema.

Here is DMTF redfish PR to enable redfish static route configuration
https://github.com/DMTF/Redfish/pull/5464


This PR adds IPv4StaticRoutes resource under EthernetInterface schema which
allows clients to configure multiple static routes per interface.

Example:

"IPv4StaticRoutes": [

     {

            "NextHopAddress": "192.168.1.1",

            "DestinationAddress": "192.168.1.2",

            "SubnetMask": "255.255.255.255"

     },

     {

            "NextHopAddress": "192.168.2.1",

            "DestinationAddress": "192.1.2.0",

            "SubnetMask": "255.255.255.0"

     }]


This PR was reviewed and discussed in the DMTF meeting recently and one of
the suggestion from DMTF members were to check for community interest in
having this use case.


Would like to hear community views in allowing the user to add a static
route.


Thanks,

Raviteja

On Tue, Jul 26, 2022 at 2:55 PM Sunitha Harish <sunithaharish04 at gmail.com>
wrote:

>
> 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 and  configured 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.
>
> * IP  Config:*
>
>
> 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 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   Window  irtt
> Iface
>
> 0.0.0.0                10.x.x.1             0.0.0.0           UG         0
>       0           0   eth0
>
> 0.0.0.0                 9.x.x.1              0.0.0.0           UG        0
>       0           0   eth1  <<==== not pingable.
>
> 9.x.x.0                 0.0.0.0         255.255.255.0   U          0
>   0           0   eth1
>
> 10.x.x.0               0.0.0.0         255.255.255.0   U          0
>   0          0   eth0
>
> 169.254.0.0        0.0.0.0         255.255.0.0        U          0
>   0          0   eth0
>
>
>
> But with DHCP enabled on eth1, dhcp subnet with metric value 1024 was
> always at the bottom and was reachable
> as DHCP routes  get 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/20230605/b1990af2/attachment.htm>


More information about the openbmc mailing list