- p_cust = (Ether(dst="00:00:de:ad:ba:be",
- src="00:00:de:ad:be:ef") /
- IP(src="10.10.10.10", dst="11.11.11.11") /
- UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
- p_core = (Ether(src="00:00:de:ad:ba:be",
- dst="00:00:de:ad:be:ef") /
- IP(dst="10.10.10.10", src="11.11.11.11") /
- UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=mpls_tun1.sw_if_index, bd_id=1)
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=mpls_tun2.sw_if_index, bd_id=1)
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=self.pg1.sw_if_index, bd_id=1)
+
+ #
+ # Packet from host on the customer interface to each host
+ # reachable over the core, and vice-versa
+ #
+ p_cust1 = (Ether(dst="00:00:de:ad:ba:b1",
+ src="00:00:de:ad:be:ef") /
+ IP(src="10.10.10.10", dst="11.11.11.11") /
+ UDP(sport=1234, dport=1234) /
+ Raw(b'\xa5' * 100))
+ p_cust2 = (Ether(dst="00:00:de:ad:ba:b2",
+ src="00:00:de:ad:be:ef") /
+ IP(src="10.10.10.10", dst="11.11.11.12") /
+ UDP(sport=1234, dport=1234) /
+ Raw(b'\xa5' * 100))
+ p_core1 = (Ether(dst=self.pg0.local_mac,
+ src=self.pg0.remote_mac) /
+ MPLS(label=55, ttl=64) /
+ Ether(src="00:00:de:ad:ba:b1",
+ dst="00:00:de:ad:be:ef") /
+ IP(dst="10.10.10.10", src="11.11.11.11") /
+ UDP(sport=1234, dport=1234) /
+ Raw(b'\xa5' * 100))
+ p_core2 = (Ether(dst=self.pg0.local_mac,
+ src=self.pg0.remote_mac) /
+ MPLS(label=56, ttl=64) /
+ Raw(b'\x01' * 4) / # PW CW
+ Ether(src="00:00:de:ad:ba:b2",
+ dst="00:00:de:ad:be:ef") /
+ IP(dst="10.10.10.10", src="11.11.11.12") /
+ UDP(sport=1234, dport=1234) /
+ Raw(b'\xa5' * 100))