Configuring VLAN interface via redfish

Zhao, Jiaqing jiaqing.zhao at intel.com
Fri Dec 31 05:08:38 AEDT 2021


Hi, all

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 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, I got two ideas, I'm not sure which one is preferred

3.1 Action CreateVLAN in each physical interface. Payload will be {"VLANId": 1} format
3.2 POST method of /redfish/v1/Managers/bmc/EthernetInterfaces {"Id": "<Interface>_<VLANId>"}, e.g. {"Id": "eth0_1"}

Any suggestions/alternatives will be appreciated.

Thanks and happy new year,
Jiaqing



More information about the openbmc mailing list