1 Rookie
•
14 Posts
0
3052
May 19th, 2020 03:00
iDrac Redfish - Set static ip address for mgmt interface
Hi,
I'm trying to configure a static ipv4 address on the idrac mgmt interface.
I do that as follows:
REDFISH_OBJ.patch('Managers/iDRAC.Embedded.1/EthernetInterfaces/NIC.1',[{ 'IPv4Addresses' : [{ 'Address': '10.XXX.X.XX', 'AddressOrigin': 'Static', 'Gateway': '10.XXX.X.X', 'SubnetMask': '255.255.252.0' }])
But I get a result that the "Feature dhcp is enabled":
{ "Message": "The feature DHCP is enabled.", "MessageArgs": [ "DHCP" ], "MessageArgs@odata.count": 1, "MessageId": "IDRAC.2.1.ISM0013", "RelatedProperties": [ "IPv4Addresses" ], "RelatedProperties@odata.count": 1, "Resolution": "No response action is required.", "Severity": "Informational" }
I can't find any property under
Managers/iDRAC.Embedded.1/EthernetInterfaces/NIC.1
to disable dhcp.
So how do I set the static ipv4 address?
No Events found!



DELL-Shine K
4 Operator
•
3K Posts
1
May 19th, 2020 20:00
Thanks for the details
As per redfish schema "AddressOrigin" attribute is read only and you can not patch that attribute. To change iDRAC IP from DHCP to static, you can try PATCH operation on below URI and body
URI : redfish/v1/Managers/iDRAC.Embedded.1/Attributes
Body
{"Attributes":{
"IPv4.1.DHCPEnable": "Disabled",
"IPv4.1.Address": "10.XXX.X.XX",
"IPv4.1.Gateway": "10.XXX.X.X",
"IPv4.1.Netmask": "255.255.252.0"
}}
DELL-Shine K
4 Operator
•
3K Posts
0
May 19th, 2020 06:00
Can you share the server model and iDRAC FW version installed on the server
digitalo_
1 Rookie
•
14 Posts
0
May 19th, 2020 13:00
Sure it's a Dell PowerEdge R640 with iDrac 9, FW version 4.10.10.10.
digitalo_
1 Rookie
•
14 Posts
0
May 20th, 2020 05:00
That seems to work for me. I disabled the dhcp via redfish/v1/Managers/iDRAC.Embedded.1/Attributes and configured the static ip as I was previously doing. Thanks!
oothman
4 Posts
0
December 12th, 2022 12:00
I am doing this and I get a 415. When I set "Content-Type" to "application/json", I get a 406!
DELL-Shine K
4 Operator
•
3K Posts
0
December 12th, 2022 20:00
Can you share the server model and iDRAC FW version on the server? Can you also share the URI, headers and body used for the API?
oothman
4 Posts
0
December 13th, 2022 01:00
Thanks a lot for the quick reply.
Firmware: 6.00.02
Server model: M640 (2yjxkq2)
RequestDump
PATCH /redfish/v1/Managers/iDRAC.Embedded.1/Attributes HTTP/1.1
Host: 1.2.3.4
User-Agent: Go-http-client/1.1
Content-Length: 170
Accept: application/json, text/plain, */*
Authorization: Basic cNHtOlA1Sb5hZG05c3Q9cg==
X-Auth-Token: ace4fd4fca998414dd3efb646b5c644f
Accept-Encoding: gzip
{"Attributes":{"SysLog.1.Port":514,"SysLog.1.Server1":"something.booking.com","SysLog.1.Server2":"","SysLog.1.Server3":"","SysLog.1.SysLogEnable":"Enabled"}}
url https://1.2.3.4/redfish/v1/Managers/iDRAC.Embedded.1/Attributes
HTTP/1.1 415 Unsupported Media Type
Connection: close
Content-Length: 395
Content-Type: text/html; charset=iso-8859-1
Date: Mon, 12 Dec 2022 21:15:41 GMT
Server: Apache
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
X-Frame-Options: DENY
Unsupported Media Type
The supplied request data is not in a format
acceptable for processing by this resource.
Additionally, a 415 Unsupported Media Type
error was encountered while trying to use an ErrorDocument to handle the request.
DELL-Shine K
4 Operator
•
3K Posts
0
December 13th, 2022 02:00
Can you try accept header only with "application/json"
req.Header.Set("Accept", "application/json")
oothman
4 Posts
0
December 16th, 2022 01:00
Joey9165a8683
1 Rookie
•
3 Posts
0
December 10th, 2024 02:05
Did this ever get resolved? We are hitting the same problem
DELL-Joey C
Moderator
•
4K Posts
0
December 10th, 2024 09:29
Hi,
I'll leave this post for the public to respond if there is any resolution that they encounter, whilst, I'll reply to your new post.