2 Documentation Deep inspection of HTTP traffic on symmetric chain.
3 ... Nodes are located on different VMs.
4 Suite Setup Start Connections
5 Suite Teardown Close Connections
7 Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
8 Resource ../Variables.robot
9 Resource ../Connections.robot
14 Start HTTP on h36_4 on Port 80
15 [Documentation] Starting HTTP service on docker container.
16 Set Test Variables client_name=h35_3 client_ip=10.0.35.3 server_name=h36_4 server_ip=10.0.36.4 service_port=80 ether_type=0x0800
17 ... proto=6 vxlan_gpe_port=2
18 Switch Connection GPSFC6_CONNECTION
19 Start HTTP Service on Docker ${SERVER_NAME} ${SERVICE_PORT}
22 [Documentation] Test HTTP request from a docker container to serving docker container.
23 Switch Connection GPSFC1_CONNECTION
24 Curl from Docker ${CLIENT_NAME} ${SERVER_IP} service_port=${SERVICE_PORT}
26 Start Endless Curl on h35_3 on port 80
27 [Documentation] Starting endless HTTP session for traffic inspection.
28 Start Endless Curl from Docker ${CLIENT_NAME} ${SERVER_IP} ${SERVICE_PORT} sleep=1
30 On GBPSFC1 Send HTTP req h35_3-h36_4 to GBPSFC2
31 [Documentation] HTTP traffic inspection.
32 Switch Connection GPSFC1_CONNECTION
33 ${flow} Inspect Classifier Outbound in_port=5 out_port=${VXLAN_GPE_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
34 ... next_hop_ip=${GBPSFC2} nsi=255 proto=${PROTO} dst_port=${SERVICE_PORT}
35 ${nsp_35_3-nsp_36_4} GET NSP Value From Flow ${flow}
36 Set Global Variable ${NSP_path1} ${nsp_35_3-nsp_36_4}
38 On GBPSFC2 Send HTTP req h35_3-h36_4 to GBPSFC3
39 [Documentation] HTTP traffic inspection.
40 Switch Connection GPSFC2_CONNECTION
41 Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC1} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
42 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC3} nsp=${NSP_path1} nsi=255 proto=${PROTO}
44 On GBPSFC3 Send HTTP req h35_3-h36_4 to GBPSFC2
45 [Documentation] HTTP traffic inspection.
46 Switch Connection GPSFC3_CONNECTION
47 Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC3} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
48 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path1} received_nsi=255
50 On GBPSFC2 Send HTTP req h35_3-h36_4 to GBPSFC4
51 [Documentation] HTTP traffic inspection.
52 Switch Connection GPSFC2_CONNECTION
53 Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC3} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
54 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path1} nsi=254 proto=${PROTO}
56 On GBPSFC4 Send HTTP req h35_3-h36_4 to GBPSFC5
57 [Documentation] HTTP traffic inspection.
58 Switch Connection GPSFC4_CONNECTION
59 Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
60 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC5} nsp=${NSP_path1} nsi=254 proto=${PROTO}
62 On GBPSFC5 Send HTTP req h35_3-h36_4 to GBPSFC4
63 [Documentation] HTTP traffic inspection.
64 Switch Connection GPSFC5_CONNECTION
65 Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC5} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
66 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path1} received_nsi=254
68 On GBPSFC4 Send HTTP req h35_3-h36_4 to GBPSFC6
69 [Documentation] HTTP traffic inspection.
70 Switch Connection GPSFC4_CONNECTION
71 Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC5} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
72 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC6} nsp=${NSP_path1} nsi=253 proto=${PROTO}
74 On GBPSFC6 Send HTTP req h35_3-h36_4 to h36_4
75 [Documentation] HTTP traffic inspection.
76 Switch Connection GPSFC6_CONNECTION
77 Inspect Classifier Inbound in_port=${VXLAN_GPE_PORT} out_port=6 eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} outer_src_ip=${GBPSFC4}
78 ... outer_dst_ip=${GBPSFC6} nsp=${NSP_path1} nsi=253 proto=${PROTO}
80 On GBPSFC6 Send HTTP resp h36_4-h35_3 to GBPSFC4
81 [Documentation] HTTP traffic inspection.
82 Switch Connection GPSFC6_CONNECTION
83 ${flow} Inspect Classifier Outbound in_port=6 out_port=${VXLAN_GPE_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
84 ... next_hop_ip=${GBPSFC4} nsi=255 proto=${PROTO} src_port=${SERVICE_PORT}
85 ${nsp_36_4-nsp_35_3} GET NSP Value From Flow ${flow}
86 Set Global Variable ${NSP_path2} ${nsp_36_4-nsp_35_3}
88 On GBPSFC4 Send HTTP resp h36_4-h35_3 to GBPSFC5
89 [Documentation] HTTP traffic inspection.
90 Switch Connection GPSFC4_CONNECTION
91 Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC6} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
92 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC5} nsp=${NSP_path2} nsi=255 proto=${PROTO}
94 On GBPSFC5 Send HTTP resp h36_4-h35_3 to GBPSFC4
95 [Documentation] HTTP traffic inspection.
96 Switch Connection GPSFC5_CONNECTION
97 Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC5} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
98 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path2} received_nsi=255
100 On GBPSFC4 Send HTTP resp h36_4-h35_3 to GBPSFC2
101 [Documentation] HTTP traffic inspection.
102 Switch Connection GPSFC4_CONNECTION
103 Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC5} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
104 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path2} nsi=254 proto=${PROTO}
106 On GBPSFC2 Send HTTP resp h36_4-h35_3 to GBPSFC3
107 [Documentation] HTTP traffic inspection.
108 Switch Connection GPSFC2_CONNECTION
109 Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
110 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC3} nsp=${NSP_path2} nsi=254 proto=${PROTO}
112 On GBPSFC3 Send HTTP resp h36_4-h35_3 to GBPSFC2
113 [Documentation] HTTP traffic inspection.
114 Switch Connection GPSFC3_CONNECTION
115 Inspect Service Function in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC2} outer_dst_ip=${GBPSFC3} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
116 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path2} received_nsi=254
118 On GBPSFC2 Send HTTP resp h36_4-h35_3 to GBPSFC1
119 [Documentation] HTTP traffic inspection.
120 Switch Connection GPSFC2_CONNECTION
121 Inspect Service Function Forwarder in_port=${VXLAN_GPE_PORT} out_port=${VXLAN_GPE_PORT} outer_src_ip=${GBPSFC3} outer_dst_ip=${GBPSFC2} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
122 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC1} nsp=${NSP_path2} nsi=253 proto=${PROTO}
124 On GBPSFC1 Send HTTP resp h36_4-h35_3 to h35_3
125 [Documentation] HTTP traffic inspection.
126 Switch Connection GPSFC1_CONNECTION
127 Inspect Classifier Inbound in_port=${VXLAN_GPE_PORT} out_port=5 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} outer_src_ip=${GBPSFC2}
128 ... outer_dst_ip=${GBPSFC1} nsp=${NSP_path2} nsi=253 proto=${PROTO}
131 [Documentation] Verifying that different paths were taken.
132 Should Not Be Equal As Numbers ${NSP_path1} ${NSP_path2}
134 Stop Endless Curl on h35_3 on port 80
135 [Documentation] Stopping endless HTTP session after traffic inspection finishes.
136 Switch Connection GPSFC1_CONNECTION
137 Stop Endless Curl from Docker ${CLIENT_NAME}
139 Stop HTTP on h36_4 on Port 80
140 [Documentation] Stopping HTTP service on the docker container.
141 Switch Connection GPSFC6_CONNECTION
142 Stop HTTP Service on Docker ${SERVER_NAME}