def METHOD_NAME(self, configuration):
    """
    One L2TP tunnel is configured on both hosts using the
    :any:`L2TPManager`. Each host configures one L2TP session for the
    tunnel. IPv4 addresses are assigned to the l2tp session devices.
    """
    endpoint1, endpoint2 = configuration.tunnel_endpoints
    host1 = endpoint1.netns
    host2 = endpoint2.netns
    if self.params.carrier_ipversion == "ipv4":
        ip_filter = {"family": AF_INET}
    else:
        ip_filter = {"family": AF_INET6, "is_link_local": False}
    endpoint1_ip = endpoint1.ips_filter(**ip_filter)[0]
    endpoint2_ip = endpoint2.ips_filter(**ip_filter)[0]
    for host in [host1, host2]:
        host.run("modprobe l2tp_eth")
    host1.l2tp = host1.init_class(L2TPManager)
    host2.l2tp = host2.init_class(L2TPManager)
    host1.l2tp.METHOD_NAME(
        tunnel_id=1000,
        peer_tunnel_id=1000,
        encap=self.params.l2tp_encapsulation,
        local=str(endpoint1_ip),
        remote=str(endpoint2_ip),
        udp_sport=5000,
        udp_dport=5000,
    )
    host2.l2tp.METHOD_NAME(
        tunnel_id=1000,
        peer_tunnel_id=1000,
        encap=self.params.l2tp_encapsulation,
        local=str(endpoint2_ip),
        remote=str(endpoint1_ip),
        udp_sport=5000,
        udp_dport=5000,
    )
    host1.l2tp_session1 = L2TPSessionDevice(
        tunnel_id=1000,
        session_id=2000,
        peer_session_id=2000,
    )
    host2.l2tp_session1 = L2TPSessionDevice(
        tunnel_id=1000,
        session_id=2000,
        peer_session_id=2000,
    )
    for device in [host1.l2tp_session1, host2.l2tp_session1]:
        device.up()
    ip1 = "10.42.1.1/8"
    ip2 = "10.42.1.2/8"
    host1.l2tp_session1.ip_add(ip1, peer=ip2)
    host2.l2tp_session1.ip_add(ip2, peer=ip1)
    configuration.tunnel_devices.extend([host1.l2tp_session1, host2.l2tp_session1])