Configuring VLAN interface via redfish

Zhao, Jiaqing jiaqing.zhao at intel.com
Fri Jan 7 03:21:44 AEDT 2022


Hi, all

The initial message I sent on Dec 2021 is blocked since I was not a member of this mailing list at that time, please ignore that one.

With systemd-networkd, each VLAN is a virtual interface associated to the physical interface, and it has its own network config like IP address. Currently our phosphor-networkd also supports it well. But in the bmcweb side, we lack the implementation. And there is an issue long ago about it at https://github.com/openbmc/bmcweb/issues/79.

In current Redfish implementation, VLAN is only shown at /​redfish/​v1/​Managers/​bmc/​EthernetInterfaces/​<str>/​VLANs/​<str> with very limited information (Only VLAN ID). User cannot configure the interface itself. And the VLanNetworkInterface schema is deprecated on 2021.3.

My proposal is exposing the VLAN virtual interface in the same way as physical interface. In this way, we call utilize existing code of getting/setting interface properties, only need to extend some VLAN-specific properties. This is also the way suggested by Redfish schema.

Details are:

1. In EthernetInterface, use EthernetInterfaceType to indicate whether it is physical or VLAN (Physical/Virtual)
2. Add VLAN-specific properties like VLANId to VLAN interfaces.
3. Add a new API to create VLAN. (This replaces current POST /redfish/v1/Managers/bmc/EthernetInterfaces/<str>/VLANs)
4. Create a DELETE method handler in /redfish/v1/Managers/bmc/EthernetInterfaces/<str> for deleting VLAN interface.

For #3, my idea is to add an OEM action CreateVLAN in each physical interface, the payload will be in {"VLANId": 1} format. I know this is a non-standard way, but I cannot think of a better idea. POSTing the EthernetInterfaceCollection seems cannot handle which physical interface the VLAN interface belongs to.

Also, I found that changing VLAN ID is not supported in phosphor-networkd, though bmcweb current has a PATCH handler for it, it will not take effect. I am also going to remove it in my patch.

Any suggestions/alternatives will be appreciated.

Thanks,
Jiaqing



More information about the openbmc mailing list