vcenter vcha: ip spec
The
ip_spec
structure contains IP information used to configure a network interface. This structure was added in vSphere API 6.7.1.Representation:
{
"ip_family" : "IPV4",
"default_gateway" : "string",
"ipv4" : {
"address" : "string",
"prefix" : 1,
"subnet_mask" : "string"
},
"ipv6" : {
"address" : "string",
"prefix" : 1
},
"dns_servers" : [
"string",
"string"
]
}
"ip_family" : "IPV4",
"default_gateway" : "string",
"ipv4" : {
"address" : "string",
"prefix" : 1,
"subnet_mask" : "string"
},
"ipv6" : {
"address" : "string",
"prefix" : 1
},
"dns_servers" : [
"string",
"string"
]
}
Attributes:
Name | Type | Description |
---|---|---|
Required | ||
ip_family | string | Family of the IP address to configure the interface. This attribute was added in vSphere API 6.7.1. Defines the Ip address family. This enumeration was added in vSphere API 6.7.1. Value is one of: IPV4: IPV4 address family. This constant was added in vSphere API 6.7.1. IPV6: IPv6 address family. This constant was added in vSphere API 6.7.1. |
ipv4.address | string | IPV4 address to be used to configure the interface. This attribute was added in vSphere API 6.7.1. |
ipv6.address | string | IPv6 address to be used to configure the interface. This attribute was added in vSphere API 6.7.1. |
ipv6.prefix | long | The CIDR prefix for the interface. This attribute was added in vSphere API 6.7.1. |
Optional | ||
ipv4 | ipv4_spec | If the family of the ip is IPV4, then this will point to IPv4 address specification. This attribute was added in vSphere API 6.7.1. Optional. It is only relevant when ip_family has value IPV4. This field is optional and it is only relevant when the value of ip_family is IP_v4. |
ipv4.subnet_mask | string | The subnet mask for the interface. This attribute was added in vSphere API 6.7.1. Optional. If unset and the prefix field is unset, then an error will be reported.If unset and the prefix field is set, then the prefix field will be used to create a subnet mask whose first prefix bits are 1 and the remaining bits 0.If both the subnet_mask field and the prefix field are set and they do not represent the same value, then an error will be reported. |
ipv4.prefix | long | The CIDR prefix for the interface. This attribute was added in vSphere API 6.7.1. Optional. If unset and the subnet_mask field is unset, this an error will be reported.If unset and the subnet_mask field is set, then the subnet_mask field will be used.If both the subnet_mask field and the prefix field are set and they do not represent the same value, then an error will be reported. |
ipv6 | ipv6_spec | If the family of the ip is IPV6, then this will point to IPv6 address specification. This attribute was added in vSphere API 6.7.1. Optional. It is only relevant when ip_family has value IPV6. This field is optional and it is only relevant when the value of ip_family is IP_v6. |
default_gateway | string | The IP address of the Gateway for this interface. This attribute was added in vSphere API 6.7.1. Optional. If unset, gateway will not be used for the network interface. |
dns_servers | string[] | The list of IP addresses of the DNS servers for this interface. This list is a comma separated list. This attribute was added in vSphere API 6.7.1. Optional. If unset, DNS servers will not be used for the network interface. |