ipmcset -d ipaddr
更新时间: 2026/07/16
在Gitcode上查看源码ipmcset -d ipaddr
命令功能
设置 IP 地址
命令格式
text
ipmcset -d ipaddr -v <ipaddr> <mask> [gateway] [groupid]参数说明
| Name | Location | Type | Required | Default | Constraint | Description |
|---|---|---|---|---|---|---|
ipaddr | ReqBody | string | 是 | - | [{"Type": "Regex", "Formula": "^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$"}] | - |
mask | ReqBody | string | 是 | - | [{"Type": "Regex", "Formula": "^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$"}] | - |
gateway | ReqBody | string | 否 | - | [{"Type": "Regex", "Formula": "^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$"}] | - |
group_id | ReqBody | integer | 否 | - | - | - |
响应/输出说明
| Name | Location | Type | Required | Default | Constraint | Description |
|---|---|---|---|---|---|---|
gateway | RspBody | - | 否 | - | - | - |
IsGroupIdValid | RspBody | - | 否 | - | - | - |
后端处理流
| Step | Type | Path/URI | Interface | Field/Method | Source | Destination |
|---|---|---|---|---|---|---|
| 1 | Property | ${Statements/PatchGroupID()/Ipv4/Path} | ${Statements/PatchGroupID()/Ipv4/Interface} | - | - | {"DefaultGateway": "DefaultGateway"} |
| 2 | Method | ${Statements/PatchGroupID()/Ipv4/Path} | ${Statements/PatchGroupID()/Ipv4/Interface} | SetIpMaskGateway | - | - |
| 3 | Method | ${Statements/PatchGroupID()/Ipv4/Path} | ${Statements/PatchGroupID()/Ipv4/Interface} | SetIpMaskGateway | - | - |
使用示例
text
ipmcset -d ipaddr -v <ipaddr> <mask> [gateway] [groupid]输出样例
| Scenario | Output | Source |
|---|---|---|
| 成功 | Set IP address successfully. | interface_config/cli/echoes/ipmcset/_ipaddr |
| 成功 | Set MASK address successfully. | interface_config/cli/echoes/ipmcset/_ipaddr |
| 成功 | Set GATEWAY successfully. | interface_config/cli/echoes/ipmcset/_ipaddr |
来源信息
| Item | Value |
|---|---|
| 命令类型 | ipmcset |
| target | _ |
| dataitem | ipaddr |
| URI | /cli/v1/_/ipaddr |
| Interface Type | Patch |
| 配置来源 | interface_config/cli/ipmcset/network.json |
| 请求版本 | 26.06_2026.06.30 |
| 源码提交 | 5606349e |
| 生成时间 | 2026-07-16T01:48:37 |