Re: L2 Bridge question on forwarding

John Lo (loj)
 

The MAC address ad:ef:ad:ef:de:ad is a multicast address.  That’s why packet with that destination MAC is flooded in the bridge.  Try assign a unicast MAC address to gtpu_tunnel1.

 

Regards,

John

 

From: vpp-dev@... <vpp-dev@...> On Behalf Of sunny cupertino
Sent: Friday, February 14, 2020 9:34 PM
To: vpp-dev@...
Subject: [vpp-dev] L2 Bridge question on forwarding

 

Hi All,

 

I request your help on L2 Bridge in VPP. I wanted to know if we can selectively forward L2 packets 

to different interfaces on a bridge based on the ethernet address. 

For e.g there is one interface and 2 GTPU tunnels on a L2 bridge. 

I have added an entry into the L2 Fib table telling which interface to use for that

particular ethernet address (ad:ef:ad:ef:de:ad ). 

 

vpp# show l2fib verbose         

    Mac-Address     BD-Idx If-Idx BSN-ISN Age(min) static filter bvi         Interface-Name        

 ad:ef:ad:ef:de:ad    1      4      0/0      no      -      -     -           gtpu_tunnel1         

 01:00:5e:00:00:fb    1      2      0/1      -       -      -     -           gtpu_tunnel0         

 de:ad:be:ef:de:ad    1      2      0/1      -       -      -     -           gtpu_tunnel0         

 28:f1:0e:4e:c2:be    1      3      0/5      -       -      -     -              tap210            

 

but when the packets arrive on tap210 they are sent to both tunnel1 and tunnel0 as well. 

I tried to switch off the flooding, in which case the packets are dropped saying L2 forward

feature is not enabled.  I request you to kindly let me know if this is possible at all to 

achieve. 

Thanks a lot, 

 

Here some information about setup.

 

vpp# show bridge 3 detail       

  BD-ID   Index   BSN  Age(min)  Learning  U-Forwrd   UU-Flood   Flooding  ARP-Term   BVI-Intf 

    3       1      0     off        on        on       flood        on       off        N/A    

 

           Interface           If-idx ISN  SHG  BVI  TxFlood        VLAN-Tag-Rewrite       

            tap210               3     5    0    -      *                 none             

         gtpu_tunnel0            2     1    0    -      *                 none             

         gtpu_tunnel1            4     3    0    -      *                 none             

vpp# 

 

 

trace:

 

Packet 1

 

01:08:35:178099: virtio-input

  virtio: hw_if_index 3 next-index 4 vring 0 len 1516

    hdr: flags 0x00 gso_type 0x00 hdr_len 0 gso_size 0 csum_start 0 csum_offset 0 num_buffers 1

01:08:35:178102: ethernet-input

  IP4: 28:f1:0e:4e:c2:be -> ad:ef:ad:ef:de:ad 802.1q vlan 4 priority 4

01:08:35:178104: l2-input

  l2-input: sw_if_index 3 dst ad:ef:ad:ef:de:ad src 28:f1:0e:4e:c2:be

01:08:35:178106: l2-learn

  l2-learn: sw_if_index 3 dst ad:ef:ad:ef:de:ad src 28:f1:0e:4e:c2:be bd_index 1

01:08:35:178109: l2-flood

  l2-flood: sw_if_index 3 dst ad:ef:ad:ef:de:ad src 28:f1:0e:4e:c2:be bd_index 1

  l2-flood: sw_if_index 3 dst ad:ef:ad:ef:de:ad src 28:f1:0e:4e:c2:be bd_index 1

01:08:35:178111: l2-output

  l2-output: sw_if_index 4 dst ad:ef:ad:ef:de:ad src 28:f1:0e:4e:c2:be data 81 00 80 04 08 00 45 00 05 da 19 bf

  l2-output: sw_if_index 2 dst ad:ef:ad:ef:de:ad src 28:f1:0e:4e:c2:be data 81 00 80 04 08 00 45 00 05 da 19 bf

01:08:35:178113: gtpu4-encap

  GTPU encap to gtpu_tunnel1 teid 7

  GTPU encap to gtpu_tunnel0 teid 3

01:08:35:178115: ip4-load-balance

  fib 4 dpo-idx 1 flow hash: 0x00000005

  UDP: 192.168.50.40 -> 192.168.50.10

    tos 0x00, ttl 254, length 1552, checksum 0xd159

    fragment id 0x0000

  UDP: 11189 -> 2152

    length 1532, checksum 0x0000

  fib 2 dpo-idx 1 flow hash: 0x00000005

  UDP: 192.168.50.40 -> 192.168.50.10

    tos 0x00, ttl 254, length 1552, checksum 0xd159

 

 

Join vpp-dev@lists.fd.io to automatically receive all group messages.