jolausa

sfc demo

Apr 4th, 2017
596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.13 KB | None | 0 0
  1. root@3d166b1f2b44:~/demo/basic# nova list --all-tenants
  2.  
  3. +--------------------------------------+-------------------------------------------------------+----------------------------------+--------+------------+-------------+------------------------------------+
  4. | ID | Name | Tenant ID | Status | Task State | Power State | Networks |
  5. +--------------------------------------+-------------------------------------------------------+----------------------------------+--------+------------+-------------+------------------------------------+
  6. | 7a8d42ee-a74d-4a65-9a5f-c54abfd77667 | client | 2fa8887b80ab44d59620d0221b2b37db | ACTIVE | - | Running | example-net=11.0.0.4, 172.16.0.142 |
  7. | 6621b6d7-12fd-4623-aebe-84754049c856 | server | 2fa8887b80ab44d59620d0221b2b37db | ACTIVE | - | Running | example-net=11.0.0.8, 172.16.0.139 |
  8. | e2372290-5f89-4a66-b0bd-ae5cedd4475c | ta-19a6-8e2f-4e81-8935-25d45ecb3968-vdu1-gfdipod6isyt | 2fa8887b80ab44d59620d0221b2b37db | ACTIVE | - | Running | example-net=11.0.0.7, 172.16.0.132 |
  9. | b0237441-5992-406a-91d2-9150110ca4a5 | ta-a6cd-5e1b-4126-b8f7-1a00149afe54-vdu1-okphunz4up3r | 2fa8887b80ab44d59620d0221b2b37db | ACTIVE | - | Running | example-net=11.0.0.6, 172.16.0.138 |
  10. +--------------------------------------+-------------------------------------------------------+----------------------------------+--------+------------+-------------+------------------------------------+
  11.  
  12.  
  13.  
  14. FIRST CASE)
  15. root@3d166b1f2b44:~/demo/basic# tacker sfc-classifier-list
  16. +-------------------------+----------+-------------+--------------------------+--------+
  17. | id | name | description | acl_match_criteria | status |
  18. +-------------------------+----------+-------------+--------------------------+--------+
  19. | 1a9b897a-54d0-4168-adf2 | red_ssh | | {u'source_port': 0, | ACTIVE |
  20. | -6ecad33f3e92 | | | u'protocol': 6, | |
  21. | | | | u'dest_port': 22} | |
  22. | a603a7bf-ab5b-4d2d- | red_http | | {u'source_port': 0, | ACTIVE |
  23. | 9cef-82ea79b32f7a | | | u'protocol': 6, | |
  24. | | | | u'dest_port': 80} |
  25. +-------------------------+-----------+-------------+-------------------------+--------+
  26.  
  27.  
  28. The client tries to access to port 22 and 80:
  29.  
  30. root@host-11-0-0-4:~# nc -vz 11.0.0.4 22
  31. Connection to 11.0.0.4 22 port [tcp/ssh] succeeded!
  32.  
  33. root@host-11-0-0-4:~# nc -vz 11.0.0.4 80
  34. nc: connect to 11.0.0.4 port 80 (tcp) failed: Connection refused
  35.  
  36.  
  37. SECOND CASE)
  38. I run change_classifier.sh and this is what we have now:
  39.  
  40. root@3d166b1f2b44:~/demo/basic# tacker sfc-classifier-list
  41. +-------------------------+-----------+-------------+-------------------------+--------+
  42. | id | name | description | acl_match_criteria | status |
  43. +-------------------------+-----------+-------------+-------------------------+--------+
  44. | 98043373-f09a-4529 | blue_http | | {u'source_port': 0, | ACTIVE |
  45. | -94ac-f5f36424cbf0 | | | u'protocol': 6, | |
  46. | | | | u'dest_port': 80} | |
  47. | b77f6c9b-3c4d-41cb- | blue_ssh | | {u'source_port': 0, | ACTIVE |
  48. | 80d1-7020fe34ce29 | | | u'protocol': 6, | |
  49. | | | | u'dest_port': 22} | |
  50. +-------------------------+-----------+-------------+-------------------------+--------+
  51.  
  52. And in the client side:
  53.  
  54. root@host-11-0-0-4:~# nc -vz 11.0.0.4 22
  55. Connection to 11.0.0.4 22 port [tcp/ssh] succeeded!
  56.  
  57. root@host-11-0-0-4:~# nc -vz 11.0.0.4 80
  58. nc: connect to 11.0.0.4 port 80 (tcp) failed: Connection refused
  59.  
  60.  
  61. !!!
Advertisement
Add Comment
Please, Sign In to add comment