Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EVPN] Static MAC propagated via EVPN as dynamic #12419

Closed
Hedgehog-Guru opened this issue Oct 16, 2022 · 3 comments
Closed

[EVPN] Static MAC propagated via EVPN as dynamic #12419

Hedgehog-Guru opened this issue Oct 16, 2022 · 3 comments
Assignees

Comments

@Hedgehog-Guru
Copy link

Description

Static MAC propagated via EVPN without BGP MAC Mobility extended community, thus shown as dynamic on remote VTEP

Steps to reproduce the issue:

Two switches with any link connected them

  1. Both switches configured for EVPN: VTEP, NVO, BGP, etc
  2. Single vlan and vlan to VNI map
  3. Add static MAC to SW1
swss-container# cat > static-add.json <<EOF
[
{
"FDB_TABLE:Vlan11:00-01-00-AA-AA-AA": {
"port": "Ethernet64",
"type": "static"
},
"OP": "SET"
}
]
EOF
swss-container# swssconfig static-add.json
  1. Check MAC added locally as static: fdbshow
  2. Check that MAC on remote VTEP: show vxlan remotemac 1.1.1.1
  3. Check communities for that MAC NLRI inside FRR: show bgp l2vpn evpn

Describe the results you received:

type = dynamic

Describe the results you expected:

type = static

Output of show version:

SONiC Software Version: SONiC.202205_rc.17-12870dde8_Internal
Distribution: Debian 11.5
Kernel: 5.10.0-12-2-amd64
Build commit: 12870dde8
Build date: Tue Oct  4 09:54:37 UTC 2022
Built by: sw-r2d2-bot@r-build-sonic-ci03-242

Platform: x86_64-mlnx_msn3700-r0
HwSKU: ACS-MSN3700
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1928X02621
Model Number: MSN3700-VS2F
Hardware Revision: A1
Uptime: 19:42:39 up  9:46,  2 users,  load average: 0.40, 0.39, 0.44
Date: Fri 07 Oct 2022 19:42:39

Output of show techsupport:

sonic_dump_qa-eth-vt03-1-4600ca1_20221007_194235.tar.gz
sonic_dump_qa-eth-vt03-2-3700v_20221007_194228.tar.gz

Additional information you deem important (e.g. issue happens only occasionally):

SW1
-----------------------------------------------------
root@qa-eth-vt03-1-4600ca1:/home/admin# fdbshow
  No.    Vlan  MacAddress         Port        Type
-----  ------  -----------------  ----------  ------
    1      11  00:01:00:AA:AA:AA  Ethernet64  Static
Total number of entries 1
root@qa-eth-vt03-1-4600ca1:/home/admin# 

SW2
-----------------------------------------------------
root@qa-eth-vt03-2-3700v:/home/admin# show vxlan remotemac 1.1.1.1
+--------+-------------------+--------------+--------+---------+
| VLAN   | MAC               | RemoteVTEP   |    VNI | Type    |
+========+===================+==============+========+=========+
| Vlan11 | 00:01:00:aa:aa:aa | 1.1.1.1      | 770011 | dynamic |
+--------+-------------------+--------------+--------+---------+
Total count : 1

root@qa-eth-vt03-2-3700v:/home/admin# vtysh
qa-eth-vt03-2-3700v# show bgp l2vpn evpn 
...
   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1.1.1.1:4
*> [2]:[0]:[48]:[00:01:00:aa:aa:aa]
                    1.1.1.1                                0 1 i
                    RT:1:770011 ET:8                                <--- MAC Mobility Extended Community is expected
...
qa-eth-vt03-2-3700v# 

@dgsudharsan
Copy link
Collaborator

@adyeung Can you please assign someone to investigate this?

@kishorekunal01
Copy link
Contributor

kishorekunal01 commented Oct 28, 2022

In FRR (sticky MAC) bit is not getting set in the MACIP route advertisement.
Recreated the issue on my setup, and seeing the originator router is not setting sticky MAC

From Techsupport:
Local node:
00:01:00:aa:aa:aa dev Ethernet64 vlan 11 master Bridge static

Remote node:
00:01:00:aa:aa:aa dev VTEP2-11 vlan 11 extern_learn master Bridge <<< Static is not set
00:01:00:aa:aa:aa dev VTEP2-11 dst 1.1.1.1 self extern_learn

@dgsudharsan
Copy link
Collaborator

Fixed in sonic-net/sonic-swss#2521

mihirpat1 pushed a commit to mihirpat1/sonic-buildimage that referenced this issue Jun 14, 2023
…c MAC advertisement in EVPN. (sonic-net#2521)

- What I did
    On local MAC learning, update the MAC entry as local then delete the DST entry from the Kernel for remote MAC. This will make sure that FRR doesn't reinstall the remote MAC(sonic-net#12363)
    When installing the static MAC in the kernel set the sticky flag as well. (sonic-net#12419)

    - How I did it
    Move the DST entry delete code after the MAC update code.(sonic-net#12363)
    Pass sticky flag to the kernel in fdbsyncd code.((sonic-net#12419)

    - How to verify it
    Tested MAC move from remote to local and verified the MAC is local in Kernel.(sonic-net#12363)
    Verified in Kernel that sticky bit is set and the same as advertised by FRR in the network.((sonic-net#12419)

Signed-off-by: [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants