from vpp_ip_route import VppIpRoute, VppRoutePath, VppMplsRoute, \
VppMplsIpBind, VppIpMRoute, VppMRoutePath, \
MRouteItfFlags, MRouteEntryFlags, VppIpTable, VppMplsTable, \
- VppMplsLabel, MplsLspMode
+ VppMplsLabel, MplsLspMode, find_mpls_route
from vpp_mpls_tunnel_interface import VppMPLSTunnelInterface
from scapy.packet import Raw
# ICMP sourced from the interface's address
self.assertEqual(rx_ip.src, src_if.local_ip6)
# hop-limit reset to 255 for IMCP packet
- self.assertEqual(rx_ip.hlim, 254)
+ self.assertEqual(rx_ip.hlim, 255)
icmp = rx[ICMPv6TimeExceeded]
labels=[VppMplsLabel(33)])])
route_32_eos.add_vpp_config()
+ self.assertTrue(
+ find_mpls_route(self, 0, 32, 1,
+ [VppRoutePath(self.pg0.remote_ip4,
+ self.pg0.sw_if_index,
+ labels=[VppMplsLabel(33)])]))
+
#
# a stream that matches the route for 10.0.0.1
# PG0 is in the default table
VppMplsLabel(46, ttl=47),
VppMplsLabel(33, ttl=47)])
+ def test_mpls_tunnel_many(self):
+ """ Multiple Tunnels """
+
+ for ii in range(10):
+ mpls_tun = VppMPLSTunnelInterface(
+ self,
+ [VppRoutePath(self.pg0.remote_ip4,
+ self.pg0.sw_if_index,
+ labels=[VppMplsLabel(44, ttl=32),
+ VppMplsLabel(46, MplsLspMode.UNIFORM)])])
+ mpls_tun.add_vpp_config()
+ mpls_tun.admin_up()
+
def test_v4_exp_null(self):
""" MPLS V4 Explicit NULL test """