Network Hosts are responsible for allocating ips and setting up network.
There are multiple backend drivers that handle specific types of networking topologies. All of the network commands are issued to a subclass of NetworkManager.
Related Flags
network_driver: | Driver to use for network creation |
---|---|
flat_network_bridge: | |
Bridge device for simple network instances | |
flat_interface: | FlatDhcp will bridge into this interface if set |
flat_network_dns: | |
Dns for simple network | |
flat_network_dhcp_start: | |
Dhcp start for FlatDhcp | |
vlan_start: | First VLAN for private networks |
vpn_ip: | Public IP for the cloudpipe VPN servers |
vpn_start: | First Vpn port for private networks |
cnt_vpn_clients: | |
Number of addresses reserved for vpn clients | |
network_size: | Number of addresses in each private subnet |
floating_range: | Floating IP address block |
fixed_range: | Fixed IP address block |
date_dhcp_on_disassociate: | |
Whether to update dhcp when fixed_ip is disassociated | |
fixed_ip_disassociate_timeout: | |
Seconds after which a deallocated ip is disassociated |
Bases: nova.exception.Error
Address was already allocated.
Bases: nova.network.manager.NetworkManager
Flat networking with dhcp.
FlatDHCPManager will start up one dhcp server to give out addresses. It never injects network settings into the guest. Otherwise it behaves like FlatDHCPManager.
Setup dhcp for this network.
Returns a fixed ip to the pool.
Do any initialization that needs to be run if this is a standalone service.
Sets up matching network for compute hosts.
Bases: nova.network.manager.NetworkManager
Basic network where no vlans are used.
FlatManager does not do any bridge or vlan creation. The user is responsible for setting up whatever bridge is specified in flat_network_bridge (br100 by default). This bridge needs to be created on all compute hosts.
The idea is to create a single network for the host with a command like: nova-manage network create 192.168.0.0/24 1 256. Creating multiple networks for for one manager is currently not supported, but could be added by modifying allocate_fixed_ip and get_network to get the a network with new logic instead of network_get_by_bridge. Arbitrary lists of addresses in a single network can be accomplished with manual db editing.
If flat_injected is True, the compute host will attempt to inject network config into the guest. It attempts to modify /etc/network/interfaces and currently only works on debian based systems. To support a wider range of OSes, some other method may need to be devised to let the guest know which ip it should be using so that it can configure itself. Perhaps an attached disk or serial device with configuration info.
Metadata forwarding must be handled by the gateway, and since nova does not do any setup in this mode, it must be done manually. Requests to 169.254.169.254 port 80 will need to be forwarded to the api server.
Do any initialization that needs to be run if this is a standalone service.
Network is created manually.
Bases: nova.manager.SchedulerDependentManager
Implements common network manager functionality.
This class must be subclassed to support specific topologies.
Gets a fixed ip from the pool.
Gets an floating ip from the pool.
Associates an floating ip to a fixed ip.
Create networks based on parameters.
Returns a fixed ip to the pool.
Returns an floating ip to the pool.
Disassociates a floating ip.
Get the network host for the current context.
Do any initialization that needs to be run if this is a standalone service.
Called by dhcp-bridge when ip is leased.
Tasks to be run at a periodic interval.
Called by dhcp-bridge when ip is released.
Safely sets the host of the network.
Sets up matching network for compute hosts.
Sets up rules for fixed ip.
Bases: nova.network.manager.NetworkManager
Vlan network with dhcp.
VlanManager is the most complicated. It will create a host-managed vlan for each project. Each project gets its own subnet. The networks and associated subnets are created with nova-manage using a command like: nova-manage network create 10.0.0.0/8 3 16. This will create 3 networks of 16 addresses from the beginning of the 10.0.0.0 range.
A dhcp server is run for each subnet, so each project will have its own. For this mode to be useful, each project will need a vpn to access the instances in its subnet.
Gets a fixed ip from the pool.
Create networks based on parameters.
Returns a fixed ip to the pool.
Get the network for the current context.
Do any initialization that needs to be run if this is a standalone service.
Sets up matching network for compute hosts.