The Networking v2.0 API provides control over
both L2 network topologies and their allocated
IP addresses (IP Address Management or IPAM).
There is also an extension to cover basic L3
forwarding and NAT, which provides capabilities
similar to nova-network.
Table 7.15. API abstractions
Abstraction |
Description |
Network |
An isolated L2 network segment
(similar to a VLAN) that forms the
basis for describing the L2 network
topology available in an Networking
deployment. |
Subnet |
Associates a block of IP addresses
and other network configuration,
such as default gateways or
dns-servers, with an Networking
network. Each subnet represents
an IPv4 or IPv6 address block,
and each Networking network can
have multiple subnets. |
Port |
Represents an attachment port to a
L2 Networking network. When a port
is created on the network, by
default it is allocated an
available fixed IP address out of
one of the designated subnets for
each IP version (if one exists).
When the port is destroyed, its
allocated addresses return to the
pool of available IPs on the
subnet. Users of the Networking API
can either choose a specific IP
address from the block, or let
Networking choose the first
available IP address. |
This table summarizes the attributes available
for each networking abstraction. For information
about API abstraction and operations, see the
Networking API v2.0 Reference.
Table 7.16. Network attributes
Attribute |
Type |
Default value |
Description |
admin_state_up |
bool |
True |
Administrative state of the network.
If specified as False (down), this
network does not forward packets.
|
id |
uuid-str |
Generated |
UUID for this network. |
name |
string |
None |
Human-readable name for this network;
is not required to be unique. |
shared |
bool |
False |
Specifies whether this network
resource can be accessed by any
tenant. The default policy setting
restricts usage of this attribute to
administrative users only. |
status |
string |
N/A |
Indicates whether this network is
currently operational. |
subnets |
list(uuid-str) |
Empty list |
List of subnets associated with this
network. |
tenant_id |
uuid-str |
N/A |
Tenant owner of the network. Only
administrative users can set the
tenant identifier; this cannot be
changed using authorization policies.
|
Table 7.17. Subnet attributes
Attribute |
Type |
Default Value |
Description |
allocation_pools |
list(dict) |
Every address in
cidr , excluding
gateway_ip (if
configured). |
List of cidr sub-ranges that are
available for dynamic allocation to
ports. Syntax:
[ { "start":"10.0.0.2",
"end": "10.0.0.254"} ]
|
cidr |
string |
N/A |
IP range for this subnet, based on the
IP version. |
dns_nameservers |
list(string) |
Empty list |
List of DNS name servers used by hosts
in this subnet. |
enable_dhcp |
bool |
True |
Specifies whether DHCP is enabled for
this subnet. |
gateway_ip |
string |
First address in cidr
|
Default gateway used by devices in
this subnet. |
host_routes |
list(dict) |
Empty list |
Routes that should be used by devices
with IPs from this subnet (not
including local subnet route). |
id |
uuid-string |
Generated |
UUID representing this subnet. |
ip_version |
int |
4 |
IP version. |
name |
string |
None |
Human-readable name for this subnet
(might not be unique). |
network_id |
uuid-string |
N/A |
Network with which this subnet is
associated. |
tenant_id |
uuid-string |
N/A |
Owner of network. Only administrative
users can set the tenant identifier;
this cannot be changed using
authorization policies. |
Table 7.18. Port attributes
Attribute |
Type |
Default Value |
Description |
admin_state_up |
bool |
true |
Administrative state of this port. If
specified as False (down), this port
does not forward packets. |
device_id |
string |
None |
Identifies the device using this port
(for example, a virtual server's ID).
|
device_owner |
string |
None |
Identifies the entity using this port
(for example, a dhcp agent). |
fixed_ips |
list(dict) |
Automatically allocated from pool |
Specifies IP addresses for this port;
associates the port with the subnets
containing the listed IP addresses.
|
id |
uuid-string |
Generated |
UUID for this port. |
mac_address |
string |
Generated |
Mac address to use on this port. |
name |
string |
None |
Human-readable name for this port
(might not be unique). |
network_id |
uuid-string |
N/A |
Network with which this port is
associated. |
status |
string |
N/A |
Indicates whether the network is
currently operational. |
tenant_id |
uuid-string |
N/A |
Owner of the network. Only
administrative users can set the
tenant identifier; this cannot be
changed using authorization policies.
|