https://blueprints.launchpad.net/dragonflow/+spec/virtual-tunnel-port-support
The virtual tunnel port can leave the remote_ip field of tunnel port to be flow. And OpenFlow can designate remote_ip for tunnel port. So that every node only needs to create a few tunnel ports for tunnel connection.
Currently, Dragonflow node will create a tunnel port for every other Dragonflow node in the OpenStack cloud. This has several problems in real use case.
[1] | https://review.openstack.org/#/c/365077/ |
Create one virtual tunnel port for each supported tunnel type. So, no matter how many Dragonflow nodes are there in the OpenStack cloud, each node will only need to create and maintain several tunnel ports. These tunnel ports will be created at the Dragonflow controller’s first startup.
For example, the tunnel port will be:
$ sudo ovs-vsctl show
Bridge br-int
Controller "tcp:127.0.0.1:6653"
fail_mode: secure
Port gre-tunnel-port
Interface gre-tunnel-port
type: gre
options: {key=flow,local_ip=192.168.31.91,remote_ip=flow}
Port br-int
Interface br-int
type: internal
ovs_version: "2.5.0"
The supported tunnel types can be configured through configuration file. If new tunnel type is added, the new tunnel port will be created when administrator restarts Dragonflow controller. If a tunnel type is removed from the supported tunnel types, the tunnel port will be deleted when restart Dragonflow controller.
The ofport of each tunnel type will be recorded as global variable across the lifecycle of Dragonflow controller. If there are any changes to the tunnel port, the OpenVSwitch DB monitor will update the ofport of each tunnel type.
The tunnel_type field of chassis will be changed from a string to a list of supported tunnel types.
The chassis will be added to local cache. So that a remote port can find the chassis type and chassis IP address quickly.
A remote port might not be in current OpenStack cloud, but be in another OpenStack cloud that connects to current cloud. The old implementation of remote port will create a tunnel port for each remote chassis, and maintain a relationship of remote port and remote chassis in the cache of Dragonflow controller. If there is no remote port in the remote chassis, the tunnel port for remote chassis will be deleted. By using the virtual tunnel port, there is no need to maintain tunnel port for remote chassis. When a remote port is added, the IP address and tunnel type of the remote chassis will be added in the binding_profile. The tunnel type value will be the type of the network of the remote port. If a network packet needs to go to the remote port, it will go to the virtual tunnel port, instead of the specific tunnel port created in the old implementation. The OpenFlow will designate the destination IP address, according to the information of remote port’s binding_profile. When the remote port is deleted, only the related OpenFlows needs to be deleted.
The chassis update event from northbound DB will be notified to Dragonflow applications. So that the OpenFlow can be updated when chassis updates, for example, its IP address.
In the egress table, the flow will be added based on the type of the network, where the port is in, and the remote port’s chassis IP address.
In the ingress classification dispatch table, not only the tunnel ID will be used to match the incoming request, but also the in_port will be used. Different in_port means different tunnel types, so we can match network type together with network segmentation ID.
The following flow is installed in the ingress classification dispatch table for each tunnel network:
match=tun_id:T,in_port:I actions=load:N->OXM_OF_METADATA[],resubmit(,INGRESS_DESTINATION_PORT_LOOKUP_TABLE)
Where T is the segmentation ID of the network, I is the ofport of virtual tunnel port of the network type, and N is the local network ID of network in current Dragonflow controller.
The following flow is installed in the egress table for each remote port:
match=reg7:R actions=load:T->NXM_NX_TUN_ID[],load:D->NXM_NX_TUN_IPV4_DST[],output:O
Where R is the tunnel key of logical port in dragonflow, T is the segmentation ID of the network, D is the IP address of the destination chassis, O is the ofport of virtual tunnel port of the network type.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.