2 Documentation Deep inspection of HTTP traffic on symmetric chain.
3 ... Nodes are located on the same VM.
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_2 on Port 80
15 [Documentation] Starting HTTP service on docker container.
16 Set Test Variables client_name=h35_2 client_ip=10.0.35.2 server_name=h36_2 server_ip=10.0.36.2 service_port=80 ether_type=0x0800
17 ... proto=6 vxlan_gpe_port=2
18 Switch Connection GPSFC1_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 Curl from Docker ${CLIENT_NAME} ${SERVER_IP} service_port=${SERVICE_PORT}
25 Start Endless Curl on h35_2 on port 80
26 [Documentation] Starting endless HTTP session for traffic inspection.
27 Start Endless Curl from Docker ${CLIENT_NAME} ${SERVER_IP} ${SERVICE_PORT} sleep=1
29 On GBPSFC1 Send HTTP req h35_2-h36_2 to GBPSFC2
30 [Documentation] HTTP traffic inspection.
31 Switch Connection GPSFC1_CONNECTION
32 ${flow} Inspect Classifier Outbound in_port=4 out_port=${VXLAN_GPE_PORT} eth_type=${ETHER_TYPE} inner_src_ip=${CLIENT_IP} inner_dst_ip=${SERVER_IP}
33 ... next_hop_ip=${GBPSFC2} nsi=255 proto=${PROTO} dst_port=${SERVICE_PORT}
34 ${nsp_35_2-nsp_36_2} GET NSP Value From Flow ${flow}
35 Set Global Variable ${NSP_path1} ${nsp_35_2-nsp_36_2}
37 On GBPSFC2 Send HTTP req h35_2-h36_2 to GBPSFC3
38 [Documentation] HTTP traffic inspection.
39 Switch Connection GPSFC2_CONNECTION
40 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}
41 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC3} nsp=${NSP_path1} nsi=255 proto=${PROTO}
43 On GBPSFC3 Send HTTP req h35_2-h36_2 to GBPSFC2
44 [Documentation] HTTP traffic inspection.
45 Switch Connection GPSFC3_CONNECTION
46 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}
47 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path1} received_nsi=255
49 On GBPSFC2 Send HTTP req h35_2-h36_2 to GBPSFC4
50 [Documentation] HTTP traffic inspection.
51 Switch Connection GPSFC2_CONNECTION
52 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}
53 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path1} nsi=254 proto=${PROTO}
55 On GBPSFC4 Send HTTP req h35_2-h36_2 to GBPSFC5
56 [Documentation] HTTP traffic inspection.
57 Switch Connection GPSFC4_CONNECTION
58 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}
59 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC5} nsp=${NSP_path1} nsi=254 proto=${PROTO}
61 On GBPSFC5 Send HTTP req h35_2-h36_2 to GBPSFC4
62 [Documentation] HTTP traffic inspection.
63 Switch Connection GPSFC5_CONNECTION
64 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}
65 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path1} received_nsi=254
67 On GBPSFC4 Send HTTP req h35_2-h36_2 to GBPSFC1
68 [Documentation] HTTP traffic inspection.
69 Switch Connection GPSFC4_CONNECTION
70 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}
71 ... inner_dst_ip=${SERVER_IP} next_hop_ip=${GBPSFC1} nsp=${NSP_path1} nsi=253 proto=${PROTO}
73 On GBPSFC1 Send HTTP req h35_2-h36_2 to h36_2
74 [Documentation] HTTP traffic inspection.
75 Switch Connection GPSFC1_CONNECTION
76 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}
77 ... outer_dst_ip=${GBPSFC1} nsp=${NSP_path1} nsi=253 proto=${PROTO}
79 On GBPSFC1 Send HTTP resp h36_2-h35_2 to GBPSFC4
80 [Documentation] HTTP traffic inspection.
81 Switch Connection GPSFC1_CONNECTION
82 ${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}
83 ... next_hop_ip=${GBPSFC4} nsi=255 proto=${PROTO} src_port=${SERVICE_PORT}
84 ${nsp_36_2-nsp_35_2} GET NSP Value From Flow ${flow}
85 Set Global Variable ${NSP_path2} ${nsp_36_2-nsp_35_2}
87 On GBPSFC4 Send HTTP resp h36_2-h35_2 to GBPSFC5
88 [Documentation] HTTP traffic inspection.
89 Switch Connection GPSFC4_CONNECTION
90 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} inner_src_ip=${SERVER_IP}
91 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC5} nsp=${NSP_path2} nsi=255 proto=${PROTO}
93 On GBPSFC5 Send HTTP resp h36_2-h35_2 to GBPSFC4
94 [Documentation] HTTP traffic inspection.
95 Switch Connection GPSFC5_CONNECTION
96 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}
97 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC4} nsp=${NSP_path2} received_nsi=255
99 On GBPSFC4 Send HTTP resp h36_2-h35_2 to GBPSFC2
100 [Documentation] HTTP traffic inspection.
101 Switch Connection GPSFC4_CONNECTION
102 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}
103 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path2} nsi=254 proto=${PROTO}
105 On GBPSFC2 Send HTTP resp h36_2-h35_2 to GBPSFC3
106 [Documentation] HTTP traffic inspection.
107 Switch Connection GPSFC2_CONNECTION
108 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}
109 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC3} nsp=${NSP_path2} nsi=254 proto=${PROTO}
111 On GBPSFC3 Send HTTP resp h36_2-h35_2 to GBPSFC2
112 [Documentation] HTTP traffic inspection.
113 Switch Connection GPSFC3_CONNECTION
114 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}
115 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC2} nsp=${NSP_path2} received_nsi=254
117 On GBPSFC2 Send HTTP resp h36_2-h35_2 to GBPSFC1
118 [Documentation] HTTP traffic inspection.
119 Switch Connection GPSFC2_CONNECTION
120 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}
121 ... inner_dst_ip=${CLIENT_IP} next_hop_ip=${GBPSFC1} nsp=${NSP_path2} nsi=253 proto=${PROTO}
123 On GBPSFC1 Send HTTP resp h36_2-h35_2 to h35_2
124 [Documentation] HTTP traffic inspection.
125 Switch Connection GPSFC1_CONNECTION
126 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} outer_src_ip=${GBPSFC2}
127 ... outer_dst_ip=${GBPSFC1} nsp=${NSP_path2} nsi=253 proto=${PROTO}
130 [Documentation] Verifying that different paths were taken.
131 Should Not Be Equal As Numbers ${NSP_path1} ${NSP_path2}
133 Stop Endless Curl on h35_2 on port 80
134 [Documentation] Stopping endless HTTP session after traffic inspection finishes.
135 Switch Connection GPSFC1_CONNECTION
136 Stop Endless Curl from Docker ${CLIENT_NAME}
138 Stop HTTP on h36_2 on Port 80
139 [Documentation] Stopping HTTP service on the docker container.
140 Stop HTTP Service on Docker ${SERVER_NAME}