Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
.gitignore | D | 23-Nov-2023 | 18 | 2 | 1 | |
README | D | 23-Nov-2023 | 2.3 KiB | 59 | 46 | |
bridge_igmp.sh | D | 23-Nov-2023 | 2.8 KiB | 153 | 107 | |
bridge_port_isolation.sh | D | 23-Nov-2023 | 2.3 KiB | 152 | 112 | |
bridge_sticky_fdb.sh | D | 23-Nov-2023 | 1.1 KiB | 70 | 52 | |
bridge_vlan_aware.sh | D | 23-Nov-2023 | 2.5 KiB | 152 | 103 | |
bridge_vlan_unaware.sh | D | 23-Nov-2023 | 1.2 KiB | 105 | 74 | |
config | D | 23-Nov-2023 | 303 | 15 | 14 | |
devlink_lib.sh | D | 23-Nov-2023 | 9.1 KiB | 413 | 311 | |
ethtool.sh | D | 23-Nov-2023 | 7 KiB | 319 | 226 | |
ethtool_lib.sh | D | 23-Nov-2023 | 1.5 KiB | 70 | 52 | |
forwarding.config.sample | D | 23-Nov-2023 | 1 KiB | 39 | 18 | |
gre_inner_v4_multipath.sh | D | 23-Nov-2023 | 7.5 KiB | 306 | 182 | |
gre_inner_v6_multipath.sh | D | 23-Nov-2023 | 7.7 KiB | 307 | 183 | |
gre_multipath.sh | D | 23-Nov-2023 | 6.3 KiB | 258 | 157 | |
ip6gre_inner_v4_multipath.sh | D | 23-Nov-2023 | 7.8 KiB | 305 | 182 | |
ip6gre_inner_v6_multipath.sh | D | 23-Nov-2023 | 7.9 KiB | 306 | 183 | |
ipip_flat_gre.sh | D | 23-Nov-2023 | 838 | 64 | 43 | |
ipip_flat_gre_key.sh | D | 23-Nov-2023 | 860 | 64 | 43 | |
ipip_flat_gre_keys.sh | D | 23-Nov-2023 | 886 | 64 | 43 | |
ipip_hier_gre.sh | D | 23-Nov-2023 | 887 | 64 | 43 | |
ipip_hier_gre_key.sh | D | 23-Nov-2023 | 910 | 64 | 43 | |
ipip_hier_gre_keys.sh | D | 23-Nov-2023 | 938 | 64 | 43 | |
ipip_lib.sh | D | 23-Nov-2023 | 8.4 KiB | 350 | 158 | |
lib.sh | D | 23-Nov-2023 | 19.8 KiB | 1,068 | 817 | |
loopback.sh | D | 23-Nov-2023 | 1.6 KiB | 103 | 69 | |
mirror_gre.sh | D | 23-Nov-2023 | 3.3 KiB | 160 | 112 | |
mirror_gre_bound.sh | D | 23-Nov-2023 | 5.8 KiB | 227 | 130 | |
mirror_gre_bridge_1d.sh | D | 23-Nov-2023 | 4.2 KiB | 133 | 68 | |
mirror_gre_bridge_1d_vlan.sh | D | 23-Nov-2023 | 2.1 KiB | 124 | 86 | |
mirror_gre_bridge_1q.sh | D | 23-Nov-2023 | 4 KiB | 127 | 66 | |
mirror_gre_bridge_1q_lag.sh | D | 23-Nov-2023 | 7.3 KiB | 293 | 191 | |
mirror_gre_changes.sh | D | 23-Nov-2023 | 5.7 KiB | 273 | 193 | |
mirror_gre_flower.sh | D | 23-Nov-2023 | 2.8 KiB | 138 | 94 | |
mirror_gre_lag_lacp.sh | D | 23-Nov-2023 | 7.3 KiB | 286 | 183 | |
mirror_gre_lib.sh | D | 23-Nov-2023 | 2.5 KiB | 131 | 98 | |
mirror_gre_neigh.sh | D | 23-Nov-2023 | 2.3 KiB | 116 | 79 | |
mirror_gre_nh.sh | D | 23-Nov-2023 | 2.9 KiB | 132 | 85 | |
mirror_gre_topo_lib.sh | D | 23-Nov-2023 | 3.4 KiB | 95 | 45 | |
mirror_gre_vlan.sh | D | 23-Nov-2023 | 1.7 KiB | 93 | 63 | |
mirror_gre_vlan_bridge_1q.sh | D | 23-Nov-2023 | 8.9 KiB | 348 | 225 | |
mirror_lib.sh | D | 23-Nov-2023 | 2.7 KiB | 136 | 108 | |
mirror_topo_lib.sh | D | 23-Nov-2023 | 2.7 KiB | 102 | 59 | |
mirror_vlan.sh | D | 23-Nov-2023 | 2.2 KiB | 132 | 93 | |
router.sh | D | 23-Nov-2023 | 2.1 KiB | 136 | 95 | |
router_bridge.sh | D | 23-Nov-2023 | 1.8 KiB | 114 | 83 | |
router_bridge_vlan.sh | D | 23-Nov-2023 | 2.1 KiB | 133 | 97 | |
router_broadcast.sh | D | 23-Nov-2023 | 5 KiB | 238 | 179 | |
router_mpath_nh.sh | D | 23-Nov-2023 | 7.9 KiB | 360 | 260 | |
router_multicast.sh | D | 23-Nov-2023 | 11.3 KiB | 417 | 270 | |
router_multipath.sh | D | 23-Nov-2023 | 8.2 KiB | 343 | 248 | |
router_vid_1.sh | D | 23-Nov-2023 | 2.1 KiB | 136 | 95 | |
tc_actions.sh | D | 23-Nov-2023 | 4.3 KiB | 214 | 153 | |
tc_chains.sh | D | 23-Nov-2023 | 4.8 KiB | 206 | 148 | |
tc_common.sh | D | 23-Nov-2023 | 916 | 51 | 39 | |
tc_flower.sh | D | 23-Nov-2023 | 10.1 KiB | 376 | 266 | |
tc_flower_router.sh | D | 23-Nov-2023 | 3 KiB | 173 | 123 | |
tc_shblocks.sh | D | 23-Nov-2023 | 2.7 KiB | 153 | 108 | |
tc_vlan_modify.sh | D | 23-Nov-2023 | 3.2 KiB | 165 | 116 | |
vxlan_asymmetric.sh | D | 23-Nov-2023 | 17.2 KiB | 568 | 347 | |
vxlan_bridge_1d.sh | D | 23-Nov-2023 | 20 KiB | 787 | 542 | |
vxlan_bridge_1d_port_8472.sh | D | 23-Nov-2023 | 172 | 11 | 5 | |
vxlan_bridge_1q.sh | D | 23-Nov-2023 | 23.5 KiB | 861 | 556 | |
vxlan_bridge_1q_port_8472.sh | D | 23-Nov-2023 | 172 | 11 | 5 | |
vxlan_symmetric.sh | D | 23-Nov-2023 | 17.7 KiB | 552 | 339 |
README
1Motivation 2========== 3 4One of the nice things about network namespaces is that they allow one 5to easily create and test complex environments. 6 7Unfortunately, these namespaces can not be used with actual switching 8ASICs, as their ports can not be migrated to other network namespaces 9(NETIF_F_NETNS_LOCAL) and most of them probably do not support the 10L1-separation provided by namespaces. 11 12However, a similar kind of flexibility can be achieved by using VRFs and 13by looping the switch ports together. For example: 14 15 br0 16 + 17 vrf-h1 | vrf-h2 18 + +---+----+ + 19 | | | | 20 192.0.2.1/24 + + + + 192.0.2.2/24 21 swp1 swp2 swp3 swp4 22 + + + + 23 | | | | 24 +--------+ +--------+ 25 26The VRFs act as lightweight namespaces representing hosts connected to 27the switch. 28 29This approach for testing switch ASICs has several advantages over the 30traditional method that requires multiple physical machines, to name a 31few: 32 331. Only the device under test (DUT) is being tested without noise from 34other system. 35 362. Ability to easily provision complex topologies. Testing bridging 37between 4-ports LAGs or 8-way ECMP requires many physical links that are 38not always available. With the VRF-based approach one merely needs to 39loopback more ports. 40 41These tests are written with switch ASICs in mind, but they can be run 42on any Linux box using veth pairs to emulate physical loopbacks. 43 44Guidelines for Writing Tests 45============================ 46 47o Where possible, reuse an existing topology for different tests instead 48 of recreating the same topology. 49o Tests that use anything but the most trivial topologies should include 50 an ASCII art showing the topology. 51o Where possible, IPv6 and IPv4 addresses shall conform to RFC 3849 and 52 RFC 5737, respectively. 53o Where possible, tests shall be written so that they can be reused by 54 multiple topologies and added to lib.sh. 55o Checks shall be added to lib.sh for any external dependencies. 56o Code shall be checked using ShellCheck [1] prior to submission. 57 581. https://www.shellcheck.net/ 59