In a hybrid environment, the IP address of a server may not be controlled by the underlying implementation. Instead, the access IP address may be part of the dedicated hardware; for example, a router/NAT device. In this case, the addresses provided by the implementation cannot actually be used to access the server (from outside the local LAN). Here, a separate access address may be assigned at creation time to provide access to the server. This address may not be directly bound to a network interface on the server and may not necessarily appear when a server's addresses are queried. See Section 2.2, “Server addresses”. Nonetheless, clients which need to access the server directly are encouraged to do so via an access address. In the example below, an IPv4 address is assigned at creation time.
Example 2.7. Create server with access IP: XML request
<?xml version="1.0" encoding="UTF-8"?> <server xmlns="http://docs.openstack.org/compute/api/v1.1" name="test" accessIPv4="67.23.10.132" imageRef="52415800-8b69-11e0-9b19-734f6f006e54" flavorRef="52415800-8b69-11e0-9b19-734f1195ff37" />
Example 2.8. Create server with access IP: JSON request
{ "server" : { "name" : "new-server-test", "imageRef" : "52415800-8b69-11e0-9b19-734f6f006e54", "flavorRef" : "52415800-8b69-11e0-9b19-734f1195ff37", "accessIPv4" : "67.23.10.132" } }
Note | |
---|---|
Both IPv4 and IPv6 addresses may be used as access addresses and both addresses may be assigned simultaneously as illustrated below. Access addresses may be updated after a server has been created. See Section 2.1, “Servers” for more details. |
Example 2.9. Create server with multiple access IPs: XML request
<?xml version="1.0" encoding="UTF-8"?> <server xmlns="http://docs.openstack.org/compute/api/v1.1" name="test" accessIPv4="67.23.10.132" accessIPv6="::babe:67.23.10.132" imageRef="52415800-8b69-11e0-9b19-734f6f006e54" flavorRef="52415800-8b69-11e0-9b19-734f1195ff37" />
Example 2.10. Create server with multiple access IPs: JSON request
{ "server" : { "name" : "new-server-test", "imageRef" : "52415800-8b69-11e0-9b19-734f6f006e54", "flavorRef" : "52415800-8b69-11e0-9b19-734f1195ff37", "accessIPv4" : "67.23.10.132", "accessIPv6" : "::babe:67.23.10.132" } }