Skip to main content

PATCH – Ethernet Interface Instance

Request

PATCH https://{{ip}}/redfish/v1/Managers/{{manager_instance}}/EthernetInterfaces/{{manager_ethifc_instance}}
Content-Type: application/json

Request body

Please refer to the properties that are patchable in Ethernet Interface Properties for which Read Only is False that can be sent as Request body in JSON format.

Note
DomainName should contain minimum two words with "." seperated.
Note
{{manager_ethifc_instance}} If this instance is usb0, PATCH is not supported. PATCH on the instance for changing network settings will cause the current connection to be terminated. Patch is not allowed for Ipv6/Ipv4 properties in DHCP mode. Patch of IPV6/IPV4 properties is allowed only in Static mode.

MACaddress/PermanentMACaddress is not allowed to patch and considered as read-only property Patch for ethernet interface can be applied in particular set. Patch set :IPv4Addresses, IPv6Addresses/IPv6StaticAddresses, VLAN, FQDN, HostName.AutoNeg,SpeedMbps,FullDuplex,MTUSize->InterfaceEnabled.

The reason is, as per the current design in BMC, if any changes applied in the network setting, the changes will be written in the network related files and network will restart. At that time other changes cannot be written.

For example if ipv4 and hostname/FQDN is applied at same time, for ipv4 details the changes will be written in the interface files and network will restart. At that time hostname/FQDN changes cannot be made.

So the restrictions were made to allow patch for particular set. Patching Interface Enabled for eth0/eth1.

Case 1: Bond is Enabled. Eth0 and eth1 cannot be patched and an error will be thrown as follows:

{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_5.Message",
"Message": "Since bond0 is enabled. InterfaceEnabled value of eth0/eth1 cannot be PATCHed
until bond0 is disabled.",
"MessageArgs": [
"InterfaceEnabled"
],
"MessageId": "SyncAgent.1.0.BondEnabled",
"RelatedProperties": [
"#/InterfaceEnabled"
],
"Resolution": "Disable Bond and try enabling/disabling eth0/eth1 the interface",
"Severity": "Warning"
}
],
"code": "SyncAgent.1.0.BondEnabled",
"message": "Since bond0 is enabled. InterfaceEnabled value of eth0/eth1 cannot be PATCHed until bond0 is disabled."
}
}

Case 2: Bond is Disabled. Eth0 and eth1 can be patched i.e enabled or disabled.
Note
Behaviour of DHCPv6->OperatingMode
If only SLAAC IP (stateless) --> OperatingMode display Stateless.
  1. If only DHCPv6 IP (stateful) --> OperatingMode display Stateful.

  2. If only LinkLocal IP --> OperatingMode display Stateless.

  3. If having combination of all IP's --> OperatingMode display Stateless

Before applying any patch by user, OperatingMode will maintain the address-origin value. (ex: If we have dhcp ip's then address-origin will be DHCP and OperatingMode will be Stateful) Once user apply patch, address-origin will have the actual outcome and OperatingMode will maintain the patched value(desired outcome) (ex: if patch is applied to change to stateless and we have no radvd server running, after successful patch we get only dhcp ip's, in that case we will show address-origin as DHCP and OperatingMode as Stateless)

Request example

Sample patch request body for ethernet-interface properties for interface instance uri, Ex: PATCH https://{{ip}}/redfish/v1/Managers/Self/EthernetInterfaces/eth0.

To modify hostname and fqdn:

{
"FQDN": "NEWHOST.us.megatrends.com",
"HostName": "NEWHOST"
}

To disable autoneg or to change FullDuplex/SpeedMbps we need to provide three properties:

{
"AutoNeg": false,
"FullDuplex": true,
"SpeedMbps": 10
}

To enable autoneg values:

{
"AutoNeg": true
}

To patch MTUSize:

{
"MTUSize": 1450
}

To disable dhcp for IPv4Address:

{
"DHCPv4": {
"DHCPEnabled": false
},
"IPv4Addresses": [
{
"Address": "10.0.124.86",
"Gateway": "10.0.120.1",
"SubnetMask": "255.255.248.0"
}
]
}

To modify IPv4StaticAddress details:

{
"IPv4StaticAddresses": [
{
"Address": "10.0.124.86",
"Gateway": "10.0.120.1",
"SubnetMask": "255.255.248.0"
}
]
}

To Enable DHCP in IPv4 when False value is disable DHCP.

{
"DHCPv4": {
"DHCPEnabled": true
}
}

To enable/disable interface

{
"InterfaceEnabled": true
}

{
"FQDN": "NEWHOST.us.megatrends.com",
"FullDuplex": true,
"AutoNeg": false,
"MTUSize": 1450,
"SpeedMbps": 10,
"HostName": "NEWHOST",
"MACAddress": "00:1a:2b:11:11:11",
"IPv4Addresses": [
{
"Address": "172.16.97.178",
"Gateway": "172.16.96.1",
"SubnetMask": "255.255.248.0"
}
],
"IPv6Addresses": [
{
"Address": "2001:db8:1:0:21a:2bff:fe11:1111"
}
],
"InterfaceEnabled": true
}

To Disable DHCP in IPV6Address DHCPv6 OperatingMode Allowable values -- allowable values disabled,stateless,stateful

{
"DHCPv6": {
"OperatingMode": "Disabled"
},
"IPv6Addresses": [
{
"Address": "2001:b021:2d:0:475e:a232:7e1d:7438",
"Oem": {
"Ami": {
"StaticIPAddressIndex": 10
}
}
}
]
}

To modify IPv6StaticAddress details:

{
"IPv6StaticAddresses": [
{
"Address": ":b021:2d:0:475e:a232:7e1d:7438",
"PrefixLength": 64,
"Oem": {
"Ami": {
"StaticIPAddressIndex": 10
}
}
}
]
}

To modify multi IPv6StaticAddress details:

{
"IPv6StaticAddresses": [
{
"Address": "2001:b021:2d:0:475e:a232:7e1d:7438",
"Oem": {
"Ami": {
"StaticIPAddressIndex": 9
}
},
"PrefixLength": 64
},
{
"Address": "2001:b021:2d:0:475e:a232:7e1d:7440",
"Oem": {
"Ami": {
"StaticIPAddressIndex": 10
}
},
"PrefixLength": 64
}
]
}

To clear IPv6StaticAddress details:

{
"IPv6StaticAddresses": [
{
"Address": null,
"PrefixLength": 0,
"Oem": {
"Ami": {
"StaticIPAddressIndex": 10
}
}
}
]
}

To Enable DHCP in IPv6 when False value is to disable DHCP.

{
"DHCPv6": {
"OperatingMode": "Stateless"
}
}

For StaticNameServers.

{
"StaticNameServers": [
"10.0.0.33",
"10.0.0.34",
"10.0.0.35"
]
}

Response

The response status is 202 with newly created Task details.

For Error Responses, refer to Error Response.

Note
  1. To make all settings for Ethernet interface effective, after the success of the PATCH method, the network service will restart. During this time (about 30s), BMC network is unreachable.

  2. Checking PATCH settings is different from previous Redfish service (RTP 1.7). The current Redfish service (RTP 1.8) will check if the settings are duplicated. If yes, it will report error.