ExtremeSwitching (EXOS)

Expand all | Collapse all

How to configure route policy to redistribute connected route to bgp?

  • 1.  How to configure route policy to redistribute connected route to bgp?

    Posted 04-10-2018 10:06
    Hi guys,

    I want to redistribute direct (connected) routes to bgp basically.
    But I also want to specify community for particular prefixes as well.

    For example, a Router-A has vlan A (10.1.1.0/24) and vlan B (10.2.2.0/24), vlan C (10.3.3.0/24) locally.

    And Router-A wants to redistribute direct route to BGP but also want to specify 10.1.1.0/24 prefix with community 7777:100.

    So I tried to configure above as below:

    enable bgp export direct address-family ipv4-unicast export-policy CONN_TO_BGP

    Policy: CONN_TO_BGPentry 10 {
    if match any {
    nlri 10.1.1.0/24 ;
    }
    then {
    community set "7777:100" ;
    permit ;
    }
    }

    However, when I checked the routes from Router-B, it only receives 10.1.1.0/24 with community 7777:100 but no other direct routes.

    Please help me.


  • 2.  RE: How to configure route policy to redistribute connected route to bgp?

    Posted 04-10-2018 10:46
    Hi David,

    Try this

    CONN_TO_BGPentry 10 {
    if match any {
    nlri 10.1.1.0/24 ;
    }
    then {
    community set "7777:100" ;
    permit ;
    }
    }
    entry two {
    if match any {
    nlri 0.0.0.0/0;
    } then {
    permit;
    }
    }


  • 3.  RE: How to configure route policy to redistribute connected route to bgp?

    Posted 04-10-2018 11:20
    Let me ask one more question. With Parthiban’s anwer above, let say this router A has 3 bgp neighnors, router-b, router-c and router-d. I want to redistribute direct routes to all three neighbors basically. But I want to filter prefix 10.1.1.0/24 with community 7777:100 to router-c and also want to filter 10.2.2.0/24 with community 8888:100 to router-d. In orther words, router-b will receive all direct routes from router-a, router-c will receive all direct routes except 10.1.1.0/24 and router-d will receive all direct routes except 10.2.2.0/24. For this scenario, how should I configure route policies? Br David


  • 4.  RE: How to configure route policy to redistribute connected route to bgp?

    Posted 04-10-2018 10:46
    Hi Parthiban, Does entry two mean “all connected routes”?