On VPP, packets with VLANs does not imply it go into a separate bridge domains 
(BDs).  For your case, your sub-interfaces for VLAN 100 and 200 on your host 
interface should be put into separate bridge domains, e.g. you can use BD IDs 
100 and 200, and have the correct behavior.  As I described in an earlier email 
thread on this mailing list, all packets in a BD are expected to have their 
first VLAN tag with the same ID.  You currently have both sub-interfaces in the 
same BD so is not the correct setup. Your "expected output" example is not 
correct as the MACs on different sub-interfaces should be in different BDs thus 
different BD-Idx.

DBGvpp# set int l2 bridge ?
  set interface l2 bridge                  set interface l2 bridge <interface> 
<bridge-domain-id> [bvi] [shg]
DBGvpp# show bridge-domain ?
  show bridge-domain                       show bridge-domain [bridge-domain-id 
[detail|int|arp|bd-tag]]

Regards,
John

From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Subramanya Bhatkal 
Nagesh
Sent: Monday, June 04, 2018 8:00 AM
To: vpp-dev@lists.fd.io
Cc: Padmavathy Ramakrishnan <padmavathy.ramakrish...@radisys.com>
Subject: [vpp-dev] Query on mac learning - VLAN

Hi,

We are interested in understanding if we can learn mac address on a per VLAN 
basis in VPP.

If an interface 'X' is part of VLAN 100, and interface 'Y' is part of VLAN 200
A host 'H' with mac "00:10:94:00:00:33" is behind a switch, ports of which are 
part of both VLAN 100 and VLAN 200.
Mac should be learnt for host 'H' on both VLAN's 100 and 200.

Traffic shall be forwarded to host based on the VLAN.

In the current implementation, by default the mac is learnt on the last learnt 
interface

DBGvpp# show l2fib verbose
    Mac-Address     BD-Idx If-Idx BSN-ISN Age(min) static filter bvi         
Interface-Name
 08:00:27:aa:bb:21    1      4      0/1      -       -      -     -     
GigabitEthernet0/8/0.100
L2FIB total/learned entries: 1/1  Last scan time: 0.0000e0sec  Learn limit: 
4194304

DBGvpp# l2fib add 08:00:27:aa:bb:21 100 GigabitEthernet0/9/0.100

DBGvpp# show l2fib verbose
    Mac-Address     BD-Idx If-Idx BSN-ISN Age(min) static filter bvi         
Interface-Name
 08:00:27:aa:bb:21    1      3      0/0      -       -      -     -     
GigabitEthernet0/9/0.100
L2FIB total/learned entries: 1/0  Last scan time: 0.0000e0sec  Learn limit: 
4194304

Expected Table:
Table shall look something like below
Mac-Address     BD-Idx If-Idx BSN-ISN Age(min) static filter bvi         
Interface-Name
 00:10:94:00:00:33    1      4      0/0      -       -      -     -     
GigabitEthernet0/8/0.100
00:10:94:00:00:33    1      3      0/0      -       -      -     -     
GigabitEthernet0/9/0.200
L2FIB total/learned entries: 2/2  Last scan time: 0.0000e0sec  Learn limit: 
4194304


Regards,
Subramanya
Radisys


Reply via email to