Creating stateful port groups

Follow the steps of this procedure to create a stateful group of ports, using the MidoNet CLI.

Before you launch the MidoNet CLI you need to find out the OpenStack UUID of the tenant on which you want to create your port group. To this end, you can use keystone. Issue the following commands in the terminal on the MidoNet host:

# keystone tenant-list
|                id                |   name   | enabled |
| 7a4937fa604a425e867f085427cc351e |  admin   |   True  |
| 037b382a5706483a822d0f7b3b2a9555 | alt_demo |   True  |
| 0a1bf57198074c779894776a9d002146 |   demo   |   True  |
| 28c40ac757e746f08747cdb32a83c40b | services |   True  |

The output of the command shows the full list of tenants. For this procedure we will use the 'admin' tenant, 7a4937fa604a425e867f085427cc351e.

  1. In the MidoNet CLI determine the list of available routers.

    midonet> list router
    router router0 name Edge Router state up
    router router1 name TenantRouter state up

    Let’s assume that the router whose ports you are going add to the port group is Edge Router, router0.

  2. Now list the ports on router0.

    midonet> router router0 list port
    port port0 device router0 state up mac 02:c2:0f:b0:f2:68 addresses
    port port1 device router0 state up mac 02:cb:3d:85:89:2a addresses
    port port2 device router0 state up mac 02:46:87:89:49:41 addresses peer bridge0:port0
    port port3 device router0 state up mac 02:6b:9f:0d:c4:a8 addresses

    You want to add port0 and port1 on the router to load balance the BGP traffic on the Edge Router.

  3. Load your tenant using the 'sett' command.

    midonet-cli> sett 7a4937fa604a425e867f085427cc351e
    tenant_id: 7a4937fa604a425e867f085427cc351e
  4. Create a stateful port group using the 'port-group create' command.

    midonet-cli> port-group create name SPG stateful true
  5. Add the two ports on the Edge Router that you want to participate in load balancing, to the port group you just created.

    midonet> port-group pgroup0 add member port router0:port0
    port-group pgroup0 port router0:port0
    midonet> port-group pgroup0 add member port router0:port1
    port-group pgroup0 port router0:port1

You have successfully added both router ports to the stateful port group, which you can verify by issuing the following command:

midonet> port-group pgroup0 list member
port-group pgroup0 port router0:port1
port-group pgroup0 port router0:port0
Questions? Discuss on Mailing Lists or Chat.
Found an error? Report a bug.

loading table of contents...