Ip6TnlTunnelRecipe
- class lnst.Recipes.ENRT.Ip6TnlTunnelRecipe.Ip6TnlTunnelRecipe(**kwargs)
Bases:
MTUHWConfigMixin
,PauseFramesHWConfigMixin
,BaseTunnelRecipe
This class implements a recipe that configures a simple Ip6Tnl tunnel between two hosts.
.--------. .------| switch |-----. | '--------' | | | .-------|------. .-------|------. | .--'-. | | .--'-. | | |eth0| | | |eth0| | | '----' | | '----' | | | | | | | | | | ----' '--- | | ----' '--- | | ip6tnl tunnel| | ip6tnl tunnel| | ---------- | | ---------- | | | | | | host1 | | host2 | '--------------' '--------------'
The actual test machinery is implemented in the
BaseEnrtRecipe
class.The test wide configuration is implemented in the
BaseTunnelRecipe
class.The recipe provides additional parameter:
- param tunnel_mode:
this parameter specifies the mode of the ip6tnl tunnel, can be any of the any, ipip6 or ip6ip6
- configure_underlying_network(config: EnrtConfiguration) tuple[RemoteDevice, RemoteDevice]
The underlying network for the tunnel consists of the Ethernet devices on the matched hosts.
- create_tunnel(config: EnrtConfiguration, tunnel_endpoints: tuple[RemoteDevice, RemoteDevice]) tuple[RemoteDevice, RemoteDevice]
The ip6tnl tunnel devices are configured with IPv6 addresses.
- generate_ping_endpoints(config)
The ping endpoints for this recipe are simply the tunnel endpoints
Returned as:
[PingEndpoints(self.matched.host1.ip6tnl, self.matched.host2.ip6tnl)]
- get_packet_assert_config(ping_config)
The packet assert test configuration contains filter for ip6 protocol and grep patterns to match the ICMP6 echo requests encapsulated by Ip6Tnl.