Last active
December 23, 2015 20:29
-
-
Save sc68cal/6689999 to your computer and use it in GitHub Desktop.
Neutron QoS API workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@precise64:~$ neutron qos-create --type dscp --policies dscp=26 | |
Created a new qos: | |
+-------------+--------------------------------------+ | |
| Field | Value | | |
+-------------+--------------------------------------+ | |
| description | | | |
| id | d05567c3-38f1-4e20-a6be-5ef5be8d489c | | |
| policies | {"dscp": "26"} | | |
| tenant_id | de099da1f23449c8b38e5490e510fd25 | | |
| type | dscp | | |
+-------------+--------------------------------------+ | |
vagrant@precise64:~$ neutron port-list | |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+ | |
| id | name | mac_address | fixed_ips | | |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+ | |
| 16c78474-ff6d-4621-b63a-10d9480ef1e6 | | fa:16:3e:06:27:3d | {"subnet_id": "66d589e8-384e-4605-8bb3-035d8c9ead91", "ip_address": "10.0.0.1"} | | |
| 309f5c84-1d56-4f78-bf68-2c39d2c94026 | | fa:16:3e:cf:87:2d | {"subnet_id": "66d589e8-384e-4605-8bb3-035d8c9ead91", "ip_address": "10.0.0.2"} | | |
| 31424c09-3b9e-45e9-8c00-3d2cf5efca26 | | fa:16:3e:87:2a:10 | {"subnet_id": "66d589e8-384e-4605-8bb3-035d8c9ead91", "ip_address": "10.0.0.3"} | | |
| 46ce0b16-b7d1-4459-aaae-acf0f1795056 | | fa:16:3e:fa:16:d9 | {"subnet_id": "66d589e8-384e-4605-8bb3-035d8c9ead91", "ip_address": "10.0.0.4"} | | |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+ | |
vagrant@precise64:~$ neutron port-update 31424c09-3b9e-45e9-8c00-3d2cf5efca26 --qos d05567c3-38f1-4e20-a6be-5ef5be8d489c | |
Updated port: 31424c09-3b9e-45e9-8c00-3d2cf5efca26 | |
vagrant@precise64:~$ sudo ovs-ofctl dump-flows br-ex | |
NXST_FLOW reply (xid=0x4): | |
cookie=0x0, duration=7.78s, table=0, n_packets=0, n_bytes=0, priority=65535,in_port=4 actions=mod_nw_tos:104 | |
cookie=0x0, duration=1545.161s, table=0, n_packets=56, n_bytes=3722, priority=0 actions=NORMAL | |
vagrant@precise64:~$ nova list | |
+--------------------------------------+-------+--------+------------+-------------+------------------+ | |
| ID | Name | Status | Task State | Power State | Networks | | |
+--------------------------------------+-------+--------+------------+-------------+------------------+ | |
| b55b288a-ecae-41c7-aa8b-4ec20483dfe5 | test | ACTIVE | None | Running | private=10.0.0.3 | | |
| c6ba9747-eed3-4b6f-b93a-26b2fa000957 | test2 | ACTIVE | None | Running | private=10.0.0.4 | | |
+--------------------------------------+-------+--------+------------+-------------+------------------+ | |
vagrant@precise64:~$ sudo ip netns exec qrouter-124e1e63-7122-481d-bdf4-d7197b3a7e38 ssh cirros@10.0.0.3 | |
cirros@10.0.0.3's password: | |
$ ping 10.0.0.1 | |
PING 10.0.0.1 (10.0.0.1): 56 data bytes | |
64 bytes from 10.0.0.1: seq=0 ttl=64 time=3.399 ms | |
64 bytes from 10.0.0.1: seq=1 ttl=64 time=1.187 ms | |
64 bytes from 10.0.0.1: seq=2 ttl=64 time=0.832 ms | |
64 bytes from 10.0.0.1: seq=3 ttl=64 time=1.847 ms | |
64 bytes from 10.0.0.1: seq=4 ttl=64 time=0.927 ms | |
64 bytes from 10.0.0.1: seq=5 ttl=64 time=2.462 ms | |
64 bytes from 10.0.0.1: seq=6 ttl=64 time=2.060 ms | |
64 bytes from 10.0.0.1: seq=7 ttl=64 time=1.298 ms | |
64 bytes from 10.0.0.1: seq=8 ttl=64 time=0.942 ms | |
64 bytes from 10.0.0.1: seq=9 ttl=64 time=0.756 ms | |
64 bytes from 10.0.0.1: seq=10 ttl=64 time=0.768 ms | |
64 bytes from 10.0.0.1: seq=11 ttl=64 time=1.034 ms | |
^C | |
--- 10.0.0.1 ping statistics --- | |
12 packets transmitted, 12 packets received, 0% packet loss | |
round-trip min/avg/max = 0.756/1.459/3.399 ms | |
vagrant@precise64:~$ sudo ip netns exec qrouter-124e1e63-7122-481d-bdf4-d7197b3a7e38 tcpdump -v | |
06:42:49.971252 IP (tos 0x0, ttl 64, id 19114, offset 0, flags [DF], proto TCP (6), length 52) | |
10.0.0.1.39941 > 10.0.0.3.ssh: Flags [.], cksum 0x142a (incorrect -> 0x668a), ack 4865, win 263, options [nop,nop,TS val 971564 ecr 142528], length 0 | |
06:42:49.973707 IP (tos 0x10, ttl 64, id 23263, offset 0, flags [DF], proto TCP (6), length 100) | |
10.0.0.3.ssh > 10.0.0.1.39941: Flags [P.], cksum 0x145a (incorrect -> 0x5cfa), seq 4865:4913, ack 288, win 4256, options [nop,nop,TS val 142529 ecr 971564], length 48 | |
06:42:49.973768 IP (tos 0x0, ttl 64, id 19115, offset 0, flags [DF], proto TCP (6), length 52) | |
10.0.0.1.39941 > 10.0.0.3.ssh: Flags [.], cksum 0x142a (incorrect -> 0x6658), ack 4913, win 263, options [nop,nop,TS val 971565 ecr 142529], length 0 | |
06:42:49.975402 IP (tos 0x10, ttl 64, id 23264, offset 0, flags [DF], proto TCP (6), length 116) | |
10.0.0.3.ssh > 10.0.0.1.39941: Flags [P.], cksum 0x146a (incorrect -> 0x5d33), seq 4913:4977, ack 288, win 4256, options [nop,nop,TS val 142529 ecr 971565], length 64 | |
06:42:49.975460 IP (tos 0x0, ttl 64, id 19116, offset 0, flags [DF], proto TCP (6), length 52) | |
10.0.0.1.39941 > 10.0.0.3.ssh: Flags [.], cksum 0x142a (incorrect -> 0x6618), ack 4977, win 263, options [nop,nop,TS val 971565 ecr 142529], length 0 | |
06:42:49.977065 IP (tos 0x10, ttl 64, id 23265, offset 0, flags [DF], proto TCP (6), length 148) | |
10.0.0.3.ssh > 10.0.0.1.39941: Flags [P.], cksum 0x148a (incorrect -> 0x0734), seq 4977:5073, ack 288, win 4256, options [nop,nop,TS val 142529 ecr 971565], length 96 | |
06:42:49.977123 IP (tos 0x0, ttl 64, id 19117, offset 0, flags [DF], proto TCP (6), length 52) | |
10.0.0.1.39941 > 10.0.0.3.ssh: Flags [.], cksum 0x142a (incorrect -> 0x65b7), ack 5073, win 263, options [nop,nop,TS val 971566 ecr 142529], length 0 | |
06:42:49.979468 IP (tos 0x10, ttl 64, id 23266, offset 0, flags [DF], proto TCP (6), length 148) | |
10.0.0.3.ssh > 10.0.0.1.39941: Flags [P.], cksum 0x148a (incorrect -> 0x3b69), seq 5073:5169, ack 288, win 4256, options [nop,nop,TS val 142530 ecr 971566], length 96 | |
06:42:49.979530 IP (tos 0x0, ttl 64, id 19118, offset 0, flags [DF], proto TCP (6), length 52) | |
10.0.0.1.39941 > 10.0.0.3.ssh: Flags [.], cksum 0x142a (incorrect -> 0x6556), ack 5169, win 263, options [nop,nop,TS val 971566 ecr 142530], length 0 | |
06:42:49.984602 IP (tos 0x10, ttl 64, id 23267, offset 0, flags [DF], proto TCP (6), length 100) | |
10.0.0.3.ssh > 10.0.0.1.39941: Flags [P.], cksum 0x145a (incorrect -> 0x023b), seq 5169:5217, ack 288, win 4256, options [nop,nop,TS val 142531 ecr 971566], length 48 | |
06:42:49.984671 IP (tos 0x0, ttl 64, id 19119, offset 0, flags [DF], proto TCP (6), length 52) | |
10.0.0.1.39941 > 10.0.0.3.ssh: Flags [.], cksum 0x142a (incorrect -> 0x6523), ack 5217, win 263, options [nop,nop,TS val 971568 ecr 142531], length 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment