Advertisement
jolausa

sfc demo

Apr 4th, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
  15.  
  16.  
  17. FIRST CASE)
  18. root@3d166b1f2b44:~/demo/basic# tacker sfc-classifier-list
  19. +--------------------------------------+----------+-------------+-------------------------------------------------------+--------+
  20. | id | name | description | acl_match_criteria | status |
  21. +--------------------------------------+----------+-------------+-------------------------------------------------------+--------+
  22. | 4a43ecca-58b3-461c-bf47-8d3dd85dc0bd | red_http | | {u'source_port': 0, u'protocol': 6, u'dest_port': 80} | ACTIVE |
  23. | b12d11a1-3e66-4851-bd64-e1b26ce309e2 | red_ssh | | {u'source_port': 0, u'protocol': 6, u'dest_port': 22} | ACTIVE |
  24. +--------------------------------------+----------+-------------+-------------------------------------------------------+--------+
  25.  
  26.  
  27. The client tries to access to port 22 and 80:
  28.  
  29. root@host-11-0-0-4:~# ssh root@11.0.0.8
  30. ^C
  31.  
  32. ==> SSH DOESNT WORK
  33.  
  34. root@host-11-0-0-4:~# wget 11.0.0.8
  35. --2017-04-05 02:28:29-- http://11.0.0.8/
  36. Connecting to 11.0.0.8:80... connected.
  37. HTTP request sent, awaiting response... 200 OK
  38. Length: 456 [text/html]
  39. Saving to: 'index.html.3'
  40.  
  41. index.html.3 100%[===============================>] 456 --.-KB/s in 0s
  42.  
  43. 2017-04-05 02:28:29 (93.3 MB/s) - 'index.html.3' saved [456/456]
  44.  
  45. ===> HTTP WORKS
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. SECOND CASE)
  53. I run change_classifier.sh and this is what we have now:
  54.  
  55. root@3d166b1f2b44:~/demo/basic# tacker sfc-classifier-list
  56. +--------------------------------------+-----------+-------------+-------------------------------------------------------+--------+
  57. | id | name | description | acl_match_criteria | status |
  58. +--------------------------------------+-----------+-------------+-------------------------------------------------------+--------+
  59. | 5f69c6d9-7938-4d87-916f-ba87e3da3b17 | blue_http | | {u'source_port': 0, u'protocol': 6, u'dest_port': 80} | ACTIVE |
  60. | 8e288e44-a847-4fe1-9277-0629a1385ea9 | blue_ssh | | {u'source_port': 0, u'protocol': 6, u'dest_port': 22} | ACTIVE |
  61. +--------------------------------------+-----------+-------------+-------------------------------------------------------+--------+
  62.  
  63. And in the client side:
  64.  
  65. root@host-11-0-0-4:~# ssh root@11.0.0.8
  66. ^C
  67. ==> SSH DOESNT WORK
  68.  
  69. root@host-11-0-0-4:~# wget 11.0.0.8
  70. --2017-04-05 02:30:16-- http://11.0.0.8/
  71. Connecting to 11.0.0.8:80... connected.
  72. HTTP request sent, awaiting response... 200 OK
  73. Length: 456 [text/html]
  74. Saving to: 'index.html.4'
  75.  
  76. index.html.4 100%[===============================================>] 456 --.-KB/s in 0s
  77.  
  78. 2017-04-05 02:30:16 (90.3 MB/s) - 'index.html.4' saved [456/456]
  79.  
  80. ===> HTTP WORKS
  81.  
  82.  
  83.  
  84. !!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement