679acd787433ca475c8365b96f1bef96f0f52823
[csit.git] / tests / vpp / func / ip4_tunnels / lisp / eth2p-ethip4lispgpe-ip4base-func.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Library | resources.libraries.python.topology.Topology
16 | Library | resources.libraries.python.NodePath
17 | Library | resources.libraries.python.Trace
18 | Library | resources.libraries.python.IPUtil
19 | Library | resources.libraries.python.VPPUtil
20 | Library | resources.libraries.python.InterfaceUtil
21 | Library | resources.libraries.python.VhostUser
22 | Resource | resources/libraries/robot/shared/traffic.robot
23 | Resource | resources/libraries/robot/shared/default.robot
24 | Resource | resources/libraries/robot/shared/interfaces.robot
25 | Resource | resources/libraries/robot/shared/testing_path.robot
26 | Resource | resources/libraries/robot/ip/ip4.robot
27 | Resource | resources/libraries/robot/vm/qemu.robot
28 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
29 | Resource | resources/libraries/robot/overlay/lispgpe.robot
30 # Import configuration and test data:
31 | Variables | resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py
32 | ...
33 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP
34 | ...
35 | Test Setup | Set up functional test
36 | ...
37 | Test Teardown | Tear down LISP functional test
38 | ...
39 | Documentation | *ip4-lispgpe-ip4 encapsulation test cases*
40 | ...
41 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
42 | ... | with single links between nodes.
43 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\
44 | ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel.
45 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\
46 | ... | routing and static routes. LISPoIPv4 tunnel is configured between\
47 | ... | DUT1 and DUT2.
48 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\
49 | ... | both directions by TG on links to DUT1 and DUT2; on receive\
50 | ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr\
51 | ... | and MAC addresses.
52 | ... | *[Ref] Applicable standard specifications:* RFC6830.
53
54 *** Test Cases ***
55 | TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using physical interfaces
56 | | [Documentation]
57 | | ... | [Top] TG-DUT1-DUT2-TG.
58 | | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\
59 | | ... | TG-DUTn.
60 | | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2.
61 | | ... | [Ver] Case: ip4-lispgpe-ip4 - phy2lisp
62 | | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\
63 | | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\
64 | | ... | received packets are correct.
65 | | ... | [Ref] RFC6830.
66 | | ...
67 | | Given Configure path in 3-node circular topology
68 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
69 | | And Set interfaces in 3-node circular topology up
70 | | And Configure IP addresses on interfaces
71 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4}
72 | | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4}
73 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4}
74 | | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4}
75 | | And Add IP Neighbors
76 | | When Configure LISP GPE topology in 3-node circular topology
77 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
78 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
79 | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
80 | | ... | ${dut1_to_dut2_ip4_static_adjacency}
81 | | ... | ${dut2_to_dut1_ip4_static_adjacency}
82 | | Then Send packet and verify headers
83 | | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
84 | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
85 | | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
86 | | And Send packet and verify headers
87 | | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
88 | | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
89 | | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
90
91 *** Keywords ***
92 | Add IP Neighbors
93 | | [Documentation]
94 | | ... | Add IP neighbors to physical interfaces on DUTs.
95 | | ...
96 | | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4}
97 | | ... | ${tg_to_dut1_mac}
98 | | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4}
99 | | ... | ${tg_to_dut2_mac}
100 | | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4}
101 | | ... | ${dut2_to_dut1_mac}
102 | | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4}
103 | | ... | ${dut1_to_dut2_mac}