### Notes #### The following is an example of how ingress/egress rules are applied on > pike 130 ubuntu@niedbalski-bastion:~/stsstack-bundles/openstack$ neutron qos-policy-create bw-limiter neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Created a new policy: +-----------------+--------------------------------------+ | Field | Value | +-----------------+--------------------------------------+ | created_at | 2019-08-23T17:10:52Z | | description | | | id | 9847ba6f-eca2-4d9f-8fdf-9a914b8cea12 | | is_default | False | | name | bw-limiter | | project_id | 8280dd071ff74caf90a7a32e0d942da4 | | revision_number | 0 | | rules | | | shared | False | | tags | | | tenant_id | 8280dd071ff74caf90a7a32e0d942da4 | | updated_at | 2019-08-23T17:10:52Z | +-----------------+--------------------------------------+ ubuntu@niedbalski-bastion:~/stsstack-bundles/openstack$ neutron qos-bandwidth-limit-rule-create bw-limiter --max-kbps 300 --max-burst-kbps 300 neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Created a new bandwidth_limit_rule: +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | direction | egress | | id | 749a6867-9cb9-421a-a53d-107abf57f914 | | max_burst_kbps | 300 | | max_kbps | 300 | +----------------+--------------------------------------+ ubuntu@niedbalski-bastion:~/stsstack-bundles/openstack$ openstack network qos policy list +--------------------------------------+------------+--------+---------+----------------------------------+ | ID | Name | Shared | Default | Project | +--------------------------------------+------------+--------+---------+----------------------------------+ | 9847ba6f-eca2-4d9f-8fdf-9a914b8cea12 | bw-limiter | False | False | 8280dd071ff74caf90a7a32e0d942da4 | +--------------------------------------+------------+--------+---------+----------------------------------+ ubuntu@niedbalski-bastion:~/stsstack-bundles/openstack$ openstack network qos rule list 9847ba6f-eca2-4d9f-8fdf-9a914b8cea12 +--------------------------------------+--------------------------------------+-----------------+----------+-----------------+----------+-----------+-----------+ | ID | QoS Policy ID | Type | Max Kbps | Max Burst Kbits | Min Kbps | DSCP mark | Direction | +--------------------------------------+--------------------------------------+-----------------+----------+-----------------+----------+-----------+-----------+ | 749a6867-9cb9-421a-a53d-107abf57f914 | 9847ba6f-eca2-4d9f-8fdf-9a914b8cea12 | bandwidth_limit | 300 | 300 | | | egress | 1 ubuntu@niedbalski-bastion:~/stsstack-bundles/openstack$ openstack network qos rule list 9847ba6f-eca2-4d9f-8fdf-9a914b8cea12 +--------------------------------------+--------------------------------------+-----------------+----------+-----------------+----------+-----------+-----------+ | ID | QoS Policy ID | Type | Max Kbps | Max Burst Kbits | Min Kbps | DSCP mark | Direction | +--------------------------------------+--------------------------------------+-----------------+----------+-----------------+----------+-----------+-----------+ | 749a6867-9cb9-421a-a53d-107abf57f914 | 9847ba6f-eca2-4d9f-8fdf-9a914b8cea12 | bandwidth_limit | 300 | 300 | | | egress | +--------------------------------------+--------------------------------------+-----------------+----------+-----------------+----------+-----------+-----------+ ubuntu@niedbalski-bastion:~/stsstack-bundles/openstack$ openstack port list +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+ | ID | Name | MAC Address | Fixed IP Addresses | Status | +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+ | 8599311c-f6fe-4ad7-a10d-48fba528da1b | | fa:16:3e:f5:a0:40 | ip_address='10.5.150.4', subnet_id='540ea7c5-b09c-4aa2-9d0e-d288d29071ad' | N/A | | c5e53b68-f91b-4c78-94bd-b956826edf95 | | fa:16:3e:7f:b2:04 | ip_address='192.168.21.1', subnet_id='1ffb79f2-6ef3-475d-808b-2a8d3d77b199' | ACTIVE | | cab9e51f-7a95-48fc-bbff-ab7be9b6e361 | | fa:16:3e:eb:b0:d3 | ip_address='192.168.21.21', subnet_id='1ffb79f2-6ef3-475d-808b-2a8d3d77b199' | ACTIVE | | d178b248-f8a3-4f75-b341-87c0af2643b8 | | fa:16:3e:75:7b:34 | ip_address='192.168.21.2', subnet_id='1ffb79f2-6ef3-475d-808b-2a8d3d77b199' | ACTIVE | | de8de50a-0ef8-4f6e-8308-44607c010e04 | | fa:16:3e:6b:3d:4c | ip_address='192.168.21.5', subnet_id='1ffb79f2-6ef3-475d-808b-2a8d3d77b199' | ACTIVE | | dec7deea-1325-4c26-a8f2-a1cf0cd2b2de | | fa:16:3e:dd:49:df | ip_address='10.5.150.2', subnet_id='540ea7c5-b09c-4aa2-9d0e-d288d29071ad' | N/A | | efff4195-1635-448c-8702-ecc17f3b5092 | | fa:16:3e:77:ad:c5 | ip_address='10.5.150.15', subnet_id='540ea7c5-b09c-4aa2-9d0e-d288d29071ad' | ACTIVE | +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+ ubuntu@niedbalski-bastion:~/stsstack-bundles/openstack$ openstack server list --all-projects +--------------------------------------+-----------------+--------+-----------------------------------+--------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+-----------------+--------+-----------------------------------+--------+----------+ | db17ea18-11e3-47e1-bb78-c0b7a3191eb2 | xenial-170353-1 | ACTIVE | private=192.168.21.21, 10.5.150.4 | xenial | m1.small | | fd6df02d-3783-480b-a4af-c4d26f4bfe13 | xenial-170353-2 | ACTIVE | private=192.168.21.5, 10.5.150.2 | xenial | m1.small | +--------------------------------------+-----------------+--------+-----------------------------------+--------+----------+ 130 ubuntu@niedbalski-bastion:~/stsstack-bundles/openstack$ openstack port show cab9e51f-7a95-48fc-bbff-ab7be9b6e361 | grep -i qos | qos_policy_id | 9847ba6f-eca2-4d9f-8fdf-9a914b8cea12 | root@juju-42b481-bionic-rocky-neutron-8:/home/ubuntu# sudo ovs-vsctl list interface tapcab9e51f-7a|grep ingress ingress_policing_burst: 300 ingress_policing_rate: 300 ubuntu@xenial-170353-1:~$ iperf3 -c 192.168.21.5 -t 10 Connecting to host 192.168.21.5, port 5201 [ 4] local 192.168.21.21 port 34224 connected to 192.168.21.5 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 102 KBytes 837 Kbits/sec 27 2.44 KBytes [ 4] 1.00-2.00 sec 96.3 KBytes 789 Kbits/sec 17 2.44 KBytes [ 4] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec 16 2.44 KBytes [ 4] 3.00-4.00 sec 90.2 KBytes 739 Kbits/sec 12 3.66 KBytes [ 4] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 16 3.66 KBytes [ 4] 5.00-6.00 sec 0.00 Bytes 0.00 bits/sec 19 2.44 KBytes [ 4] 6.00-7.00 sec 30.5 KBytes 250 Kbits/sec 13 2.44 KBytes [ 4] 7.00-8.00 sec 91.4 KBytes 749 Kbits/sec 18 2.44 KBytes [ 4] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec 13 2.44 KBytes [ 4] 9.00-10.00 sec 29.2 KBytes 240 Kbits/sec 18 2.44 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 440 KBytes 360 Kbits/sec 169 sender [ 4] 0.00-10.00 sec 380 KBytes 311 Kbits/sec receiver ubuntu@xenial-170353-1:~$ iperf3 -c 192.168.21.5 -t 10 -R Connecting to host 192.168.21.5, port 5201 Reverse mode, remote host 192.168.21.5 is sending [ 4] local 192.168.21.21 port 34228 connected to 192.168.21.5 port 5201 [ ID] Interval Transfer Bandwidth [ 4] 0.00-1.00 sec 25.4 MBytes 213 Mbits/sec [ 4] 1.00-2.00 sec 47.5 MBytes 398 Mbits/sec [ 4] 2.00-3.00 sec 46.2 MBytes 388 Mbits/sec [ 4] 3.00-4.00 sec 50.6 MBytes 424 Mbits/sec [ 4] 4.00-5.00 sec 42.8 MBytes 359 Mbits/sec [ 4] 5.00-6.00 sec 53.6 MBytes 450 Mbits/sec [ 4] 6.00-7.00 sec 55.6 MBytes 467 Mbits/sec [ 4] 7.00-8.00 sec 48.7 MBytes 409 Mbits/sec [ 4] 8.00-9.01 sec 34.4 MBytes 286 Mbits/sec [ 4] 9.01-10.00 sec 42.0 MBytes 356 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 450 MBytes 378 Mbits/sec 516 sender [ 4] 0.00-10.00 sec 448 MBytes 375 Mbits/sec receiver iperf Done. 2 ubuntu@niedbalski-bastion:~/stsstack-bundles/openstack$ openstack network qos rule create --type bandwidth-limit --max-kbps 300 --max-burst-kbits 300 --ingress 9847ba6f-eca2-4d9f-8fdf-9a914b8cea12 +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | direction | ingress | | id | ffb46484-346c-4487-91e9-7f215a2099c2 | | max_burst_kbps | 300 | | max_kbps | 300 | | name | None | | project_id | | +----------------+--------------------------------------+ 130 ubuntu@niedbalski-bastion:~/stsstack-bundles/openstack$ openstack network qos rule list 9847ba6f-eca2-4d9f-8fdf-9a914b8cea12 +--------------------------------------+--------------------------------------+-----------------+----------+-----------------+----------+-----------+-----------+ | ID | QoS Policy ID | Type | Max Kbps | Max Burst Kbits | Min Kbps | DSCP mark | Direction | +--------------------------------------+--------------------------------------+-----------------+----------+-----------------+----------+-----------+-----------+ | 749a6867-9cb9-421a-a53d-107abf57f914 | 9847ba6f-eca2-4d9f-8fdf-9a914b8cea12 | bandwidth_limit | 300 | 300 | | | egress | | ffb46484-346c-4487-91e9-7f215a2099c2 | 9847ba6f-eca2-4d9f-8fdf-9a914b8cea12 | bandwidth_limit | 300 | 300 | | | ingress | +--------------------------------------+--------------------------------------+-----------------+----------+-----------------+----------+-----------+-----------+ ubuntu@xenial-170353-1:~$ iperf3 -c 192.168.21.5 -t 10 -R Connecting to host 192.168.21.5, port 5201 Reverse mode, remote host 192.168.21.5 is sending [ 4] local 192.168.21.21 port 34236 connected to 192.168.21.5 port 5201 [ ID] Interval Transfer Bandwidth [ 4] 0.00-1.00 sec 53.6 KBytes 439 Kbits/sec [ 4] 1.00-2.00 sec 32.9 KBytes 270 Kbits/sec [ 4] 2.00-3.00 sec 35.3 KBytes 290 Kbits/sec [ 4] 3.00-4.00 sec 34.1 KBytes 280 Kbits/sec [ 4] 4.00-5.00 sec 36.6 KBytes 299 Kbits/sec [ 4] 5.00-6.00 sec 32.9 KBytes 270 Kbits/sec [ 4] 6.00-7.00 sec 35.3 KBytes 290 Kbits/sec [ 4] 7.00-8.00 sec 35.3 KBytes 289 Kbits/sec [ 4] 8.00-9.00 sec 34.1 KBytes 280 Kbits/sec [ 4] 9.00-10.00 sec 34.1 KBytes 280 Kbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 679 KBytes 556 Kbits/sec 0 sender [ 4] 0.00-10.00 sec 620 KBytes 508 Kbits/sec receiver iperf Done. root@juju-42b481-bionic-rocky-neutron-8:/home/ubuntu# sudo ovs-vsctl list qos _uuid : aae7b40f-3757-4721-98af-1d0a9ac528b2 external_ids : {id="tapcab9e51f-7a"} other_config : {max-rate="300000"} queues : {0=1ab0e661-636a-42d3-ab2a-ac7bd15e54d3} type : linux-htb root@juju-42b481-bionic-rocky-neutron-8:/home/ubuntu# sudo ovs-vsctl list queue _uuid : 1ab0e661-636a-42d3-ab2a-ac7bd15e54d3 dscp : [] external_ids : {id="tapcab9e51f-7a", queue_type="0"} other_config : {burst="300000", max-rate="300000"}