Various Entities and RelationshipsAttributes and data types Observation: When you have multiple subnets associated with a network, you can pick the subnet on which the instance will be attached to.Notes:Note Decoupling between the abstraction and the technology that’s used to implement network.Talk about what capabilities are enabled by this model.Attachment postPort is an attachment point to a quantum network The device id identifies the instance-id or router-id or the dhcp-server-id that is connected to this portIt could be between an instance and network or a router and a network or a dhcp server and the network.When you create a port you are creating an “attachment or a connection” and an IP will be
What are the various components of quantum?How do these components communicate with one another?Quantum API server:When the quantum API server starts up, it does the following sequence of actions: a) gathers the configuration options from the config files (quantum.conf and the plugin config file) For instance, from the config file it figures out a) the port and host IP on which the API server should listen on. b) the plugin abstraction module that it should load (This is the piece of code that is responsible for creating the logical network model used by the plugin) c) authentication strategy d) policy.json file for authorization b) Then it loads the plugin abstraction module. This module reads the plugin specific configuration file and creates the logical model used by the plugin in the DB. c) Establishes the AMQP connection to RabbitMQ d) Loads the extension modules – quota and Quantum L3 Router module (quantum.api.extensions.l3.py) e) Uses the eventlet python library to start up a wsgi server on the quantum host on port 9696 f) Now the API server is ready to listen to client requestsAPI calls:create_network: - Authentication and authorization is performed using the middleware with the keystone identity service - Creates a logical network using the quantum plugin module and persists it in the DB. Sets its admin state to up. - Allocates a unique ID of 32 Hex characters (using the UUID module) to the network - If the network_type is Vlan , plugin module allocates a Vlan ID to the network from the pool of Vlan ID - The calls returns the network information (ID, vlan) back to the caller. The network state in the database looks like this:+----------------------------------+--------------------------------------+--------+--------+----------------+--------+-------------------------------------| tenant_id | id | name | status | admin_state_up | shared |+----------------------------------+--------------------------------------+--------+--------+----------------+--------+------------------------------------| 244be8af89624b1e94c0136d5d557a9d | e32fbdbd-2757-4dd2-9b61-ebd20606752e | net123 | ACTIVE | 1 | 0 |-------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------- +------------------+-----------------+-----------------------| network_id | network_type | physical_network | segmentation_id |+--------------------------------------+--------------+------------------+-----------------+------------------------| e32fbdbd-2757-4dd2-9b61-ebd20606752e | vlan | datanet1 | 2000 |+--------------------------------------+--------------+------------------+-----------------+-------------------------2) create_subnet: - plugin module persists the subnet information in the database and allocates a static IP for the dhcp server’s port. - The plugin module sends a notification to the dhcp-agent to create a subnet (dnsmasq dhcp server) on this network. Messages the network ID and subnet information. - The dhcp agent makes an RPC call to the API server to obtain a portID and IP allocation for the port - Then it creates a Linux tap interface and binds the dnsmasq dhcp server to the subnet. The agent makes an RPC call to obtain the subnet information from the DB - Since overlapping ip addresses are permitted, the dhcp agent uses the linux namespace to create a logically isolated dhcp server for that network3) Boot a vm on a network:4) Create a router:Note: A linux name space is created using the ipnetns command. A linux namespace is a logically sepated copy of the linux network stack, which means separate routing tables, firewall rules and network devices. With routing you are creating a namespace named qrouter-XX and enabling ip forwarding on the linux kernel: sysctl -w net.ipv4.ip_forward=1. Some additonal notes:Ordinary update workflow is: 1) REST API request is accepted by Quantum and routed to the corresponding Extension and Plugin. 2) Plugin performs validation of request (schema conformance, values and references check, etc). If validation fails one of 40x codes is returned (depending on reason). 3)DB object is updated and object is moved to PENDING_UPDATE state. 4) Request is transformed into task and pushed into queue. 5) Plugin responses user with HTTP 202 reply. Steps 1-5 are done synchronously. 6) Agent picks message from the queue and forwards it to Driver. Driver changes configuration of load balancing device. 7) Once completed the response message is pushed into Plugin's queue. 8) Plugin retrieves message and updates DB with either "ACTIVE" or "ERROR" status
Typically a provider network.Create networkcreate subnet (provide subnet and gateway information)Provide segmentation ID in OpenVswitch (Vlan1)
Typically a provider network.Provider admin creates the networkThese networks can be shared or can be mapped to tenantsSmall/medium size networkRequirement:You need to trunk all the tenant vlans to your L3 switch (typically the aggregation switch).Your internal virtual networks (vlans) are exposed to your physical switch here. So you have 4kvlan limitations.
Typically a provider network.Provider admin creates the networkThese networks can be shared or can be mapped to tenantsSmall/medium size networkRequirement:You need to trunk all the tenant vlans to your L3 switch (typically the aggregation switch)Drawbacks:Load on the gateway router – filtering, mac-addresses, arp-tables etc. Limit scalabilityHard to provide additional services such as floating IP/ VPN connectivity etc. (cloud admin needs to configure on the physical router or the VPN gateway)Vlan limitations.
vRouter and subnets are managed by the providerSecurityDrawbacks – does not support overlapping IP addressesHow the API call works – create routerMapping between provider networks to virtual networks
overlapping IP addresses are supported Virtual routers reside on the network nodes
traffic pattern between services – Nova compute -> Quantum API Quantum Client -> Quantum API Quantum agents -> Controller (AMQP (rabbit) + MySQL) VMs -> DHCP server VM -> gateway (routing between subnets and to the internet) Overlay networking such as GRE tunnels to connect the broadcast domains together
VIP not only represents the IP address but also other parameters such as the IP/protocol/port.