2 Documentation Deep inspection of HTTP traffic on symmetric chain.
3 ... Nodes are located on the same VM.
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_2 on Port 80
16 [Documentation] Starting HTTP service on docker container.
17 Set Test Variables client_name=h35_2 client_ip=10.0.35.2 server_name=h36_2 server_ip=10.0.36.2
18 ... service_port=80 ether_type=0x0800 proto=6 vxlan_gpe_port=2
19 Switch Connection GPSFC1_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 Curl from Docker ${CLIENT_NAME} ${SERVER_IP} service_port=${SERVICE_PORT}
26 Start Endless Curl on h35_2 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_2-h36_2 to GBPSFC2
31 [Documentation] HTTP traffic inspection.
32 Switch Connection GPSFC1_CONNECTION
33 ${flow} Inspect Classifier Outbound in_port=4 out_port=${VXLAN_GPE_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP}
34 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC2} nsi=255 proto=${PROTO} dst_port=${SERVICE_PORT}
35 ${nsp_35_2-nsp_36_2} GET NSP Value From Flow ${flow}
36 Set Global Variable ${NSP_path1} ${nsp_35_2-nsp_36_2}
38 On GBPSFC2 Send HTTP req h35_2-h36_2 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}
42 ... inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC3} nsp=${NSP_path1} nsi=255 proto=${PROTO}
44 On GBPSFC3 Send HTTP req h35_2-h36_2 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}
48 ... inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path1} received_nsi=255
50 On GBPSFC2 Send HTTP req h35_2-h36_2 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}
54 ... inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path1} nsi=254 proto=${PROTO}
56 On GBPSFC4 Send HTTP req h35_2-h36_2 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}
60 ... inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC5} nsp=${NSP_path1} nsi=254 proto=${PROTO}
62 On GBPSFC5 Send HTTP req h35_2-h36_2 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}
66 ... inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path1} received_nsi=254
68 On GBPSFC4 Send HTTP req h35_2-h36_2 to GBPSFC1
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}
72 ... inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC1} nsp=${NSP_path1} nsi=253 proto=${PROTO}
74 On GBPSFC1 Send HTTP req h35_2-h36_2 to h36_2
75 [Documentation] HTTP traffic inspection.
76 Switch Connection GPSFC1_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}
78 ... outer_src_ip=${GBPSFC4} outer_dst_ip=${GBPSFC1} nsp=${NSP_path1} nsi=253 proto=${PROTO}
80 On GBPSFC1 Send HTTP resp h36_2-h35_2 to GBPSFC4
81 [Documentation] HTTP traffic inspection.
82 Switch Connection GPSFC1_CONNECTION
83 ${flow} Inspect Classifier Outbound in_port=6 out_port=${VXLAN_GPE_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP}
84 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC4} nsi=255 proto=${PROTO} src_port=${SERVICE_PORT}
85 ${nsp_36_2-nsp_35_2} GET NSP Value From Flow ${flow}
86 Set Global Variable ${NSP_path2} ${nsp_36_2-nsp_35_2}
88 On GBPSFC4 Send HTTP resp h36_2-h35_2 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=${GBPSFC1} outer_dst_ip=${GBPSFC4} eth_type=${ETHER_TYPE}
92 ... inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC5} nsp=${NSP_path2} nsi=255 proto=${PROTO}
94 On GBPSFC5 Send HTTP resp h36_2-h35_2 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}
98 ... inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path2} received_nsi=255
100 On GBPSFC4 Send HTTP resp h36_2-h35_2 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}
104 ... inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path2} nsi=254 proto=${PROTO}
106 On GBPSFC2 Send HTTP resp h36_2-h35_2 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}
110 ... inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC3} nsp=${NSP_path2} nsi=254 proto=${PROTO}
112 On GBPSFC3 Send HTTP resp h36_2-h35_2 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}
116 ... inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path2} received_nsi=254
118 On GBPSFC2 Send HTTP resp h36_2-h35_2 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}
122 ... inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC1} nsp=${NSP_path2} nsi=253 proto=${PROTO}
124 On GBPSFC1 Send HTTP resp h36_2-h35_2 to h35_2
125 [Documentation] HTTP traffic inspection.
126 Switch Connection GPSFC1_CONNECTION
127 Inspect Classifier Inbound in_port=${VXLAN_GPE_PORT} out_port=4 eth_type=${ETHER_TYPE} inner_src_ip=${SERVER_IP} inner_dst_ip=${CLIENT_IP}
128 ... outer_src_ip=${GBPSFC2} 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_2 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_2 on Port 80
140 [Documentation] Stopping HTTP service on the docker container.
141 Stop HTTP Service on Docker ${SERVER_NAME}