Data Center

 View Only
last person joined: yesterday 

Ask questions and share experiences about Data Center Architecture and approaches.
  • 1.  VRF-Import/Export question

    Posted 03-07-2024 22:27
    Edited by LEEBAHI 03-07-2024 22:43

    Hi everyone,

    I am trying  to learn how to use use import and export policies to control what EVPN routes get installed into switching-instance rather than using vrf auto target option.

    I built this simple lab with two DC: DC3 and DC4,  two vMX are configured as layer2gateway  for stretched VLAN 100.

                                   

                    Both DC have following import and export policy:

    DC3:

     I then applied these policies as import and export under switching instance:

    DC4 should have mirror image of the policies:

    But DC3 will not announce  any type 2 routes say 100.100.100.100.5 to DC4:

    We can see above DC3 does have locally learned MAC/IP routes but none of them are being announced to DC4:

    The moment I removed all import and export policies, DC3 has no issue advertising MAC/IP routes to DC4.

    I removed import/export policies on DC3 and DC4, which now  uses RT 1:1 defined under switching instance:

    DC3 can advertise routes now:

    What am I missing?

    Much appreciated!!



    ------------------------------
    Be kind!!
    ------------------------------



  • 2.  RE: VRF-Import/Export question
    Best Answer

    Posted 03-08-2024 05:34

    Hi,

    If I am not wrong, you should not combine together vrf-target xxx and vrf-import/vrf-export to avoid confusion. You should either use vrf-target xxx in order to attach this community to advertised routes and accept received routes with this community; or for more granular control, you can use vrf-import and vrf-export if you have different import and export communities.

    However, when you use vrf-export, your policy should set and accept the community, not match and accept. For vrf-import you should match and accept the community, like below for instance - 

    community vxlan-vni5100 members target:54591:5100;

    policy-statement vxlan-vni5100-export {
        term 1 {
            then {
                community add vxlan-vni5100;
                accept;
            }
        }
    }
    policy-statement vxlan-vni5100-import {
        term 1 {
            from {
                protocol bgp;               
                community vxlan-vni5100;
            }
            then accept;
        }
    }

    So, fixing export policy should fix the problem.



    ------------------------------
    FARID AKHUNDOV
    ------------------------------



  • 3.  RE: VRF-Import/Export question

    Posted 03-08-2024 14:53

    Works like a charm!!

    Appreciated!!



    ------------------------------
    Be kind!!
    ------------------------------



  • 4.  RE: VRF-Import/Export question

    Posted 03-09-2024 03:18

    Glad to hear it worked.



    ------------------------------
    FARID AKHUNDOV
    ------------------------------



  • 5.  RE: VRF-Import/Export question

    Posted 03-08-2024 15:01
    Edited by spuluka 03-09-2024 07:04

    Thanks Farid, I will try again with your feed backs in mind.

    But I do have one question based on what you mentioned:

     you should not combine together vrf-target xxx and vrf-import/vrf-export to avoid confusion.

    Type 1/2/3  routes uses vrf target applied under switching instance using: vrf-target target 1:1

    But we can use vrf-import and vrf-export if we want to have different RT for type2/3 routes from the type 1 routes above.

    Much appreciated!!



    ------------------------------
    Be kind!!
    ------------------------------