74b64122f29b2db6370978d09c61ef3d7ff02f66
[integration/test.git] / csit / suites / groupbasedpolicy / GBPSFC / 6-node / demo-symmetric-chain / 034_track_icmp_h36_5_h35_2.robot
1 *** Settings ***
2 Documentation    Deep icmp traffic inspection.
3 ...    Nodes are located on different VMs in different subnets and are members of different EPGs.
4 Library           SSHLibrary
5 Resource          ../../../../../libraries/GBP/OpenFlowUtils.robot
6 Resource          ../Variables.robot
7 Resource          ../Connections.robot
8 Suite Setup       Start Connections
9 Suite Teardown    Close Connections
10
11 *** Variables ***
12
13 *** Testcases ***
14
15 Ping from h36_5 to h35_2
16     [Documentation]    Test icmp request.
17     Set Test Variables    client_name=h36_5   client_ip=10.0.36.5    server_name=h35_2    server_ip=10.0.35.2
18     ...   ether_type=0x0800    proto=1    vxlan_port=3
19     Switch Connection    GPSFC6_CONNECTION
20     Ping from Docker    ${CLIENT_NAME}    ${SERVER_IP}
21
22 Start Endless Ping from h36_5 to h35_2
23     [Documentation]    Starting of endless pinging for traffic inspection.
24     Start Endless Ping from Docker    ${CLIENT_NAME}    ${SERVER_IP}
25
26 Find ICMP Req from h36_5 to h35_2 on GBPSFC6
27     [Documentation]    Inspecting icmp req on GBPSFC6.
28     Switch Connection    GPSFC6_CONNECTION
29     ${flow}    Inspect Classifier Outbound    in_port=7    out_port=${VXLAN_PORT}    eth_type=${ETHER_TYPE}    inner_src_ip=${CLIENT_IP}
30     ...    inner_dst_ip=${SERVER_IP}    next_hop_ip=${GBPSFC1}    proto=${PROTO}
31
32 Find ICMP Req from h36_5 to h35_2 on GBPSFC1
33     [Documentation]    Inspecting icmp req on GBPSFC1.
34     Switch Connection    GPSFC1_CONNECTION
35     Inspect Classifier Inbound    in_port=${VXLAN_PORT}    out_port=4    eth_type=${ETHER_TYPE}    inner_src_ip=${CLIENT_IP}    inner_dst_ip=${SERVER_IP}
36     ...    outer_src_ip=${GBPSFC6}    outer_dst_ip=${GBPSFC1}    proto=${PROTO}
37
38 Find ICMP Resp from h35_2 to h36_5 on GBPSFC1
39     [Documentation]    Inspecting icmp resp on GBPSFC1.
40     Switch Connection    GPSFC1_CONNECTION
41     ${flow}    Inspect Classifier Outbound    in_port=4    out_port=${VXLAN_PORT}    eth_type=${ETHER_TYPE}    inner_src_ip=${SERVER_IP}
42     ...    inner_dst_ip=${CLIENT_IP}    next_hop_ip=${GBPSFC6}    proto=${PROTO}
43
44 Find ICMP Resp from h35_2 to h36_5 on GBPSFC6
45     [Documentation]    Inspecting icmp resp on GBPSFC6.
46     Switch Connection    GPSFC6_CONNECTION
47     Inspect Classifier Inbound    in_port=${VXLAN_PORT}    out_port=7    eth_type=${ETHER_TYPE}    inner_src_ip=${SERVER_IP}    inner_dst_ip=${CLIENT_IP}
48     ...    outer_src_ip=${GBPSFC1}    outer_dst_ip=${GBPSFC6}    proto=${PROTO}
49
50 Stop Endless Ping from h36_5 to h35_2
51     [Documentation]    Stoping of endless pinging after traffic inspection finishes.
52     Switch Connection    GPSFC6_CONNECTION
53     Stop Endless Ping from Docker to Address   ${CLIENT_NAME}    ${SERVER_IP}
54
55