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