Routing

Expand all | Collapse all

BGP local address

Jump to Best Answer
  • 1.  BGP local address

    Posted 06-10-2019 05:28
    I need help understanding if the following two examples produce the same results. Our customer believes they are equivalent, but our modeling tool seems to disagree. The difference is the placement of local-address. Example from https://www.juniper.net/documentation/en_US/junos/topics/example/policy-bgp-levels.html# user@host# show protocols bgp { local-address 172.16.1.1; export send-direct; group internal-peers { type internal; export send-192.168.0.1; neighbor 172.16.2.2 { export send-192.168.20.1; } neighbor 172.16.3.3; } group other-group { type internal; neighbor 172.16.4.4; } } Example rewritten to replicate customer config: user@host# show protocols bgp { export send-direct; group internal-peers { type internal; local-address 172.16.1.1; export send-192.168.0.1; neighbor 172.16.2.2 { export send-192.168.20.1; } neighbor 172.16.3.3; } group other-group { type internal; local-address 172.16.1.1; neighbor 172.16.4.4; } }


  • 2.  RE: BGP local address

     
    Posted 06-10-2019 05:39
    Hi Truf, applying local-address under protocol bgp will apply it to all neighbours configured as in the first example , in the second you apply it under each group which should be equivalent to it. --------------------------------- If this solves your problem, please mark this post as "Accepted Solution."


  • 3.  RE: BGP local address

    Posted 06-10-2019 07:10
    Thank you, Asaleh, truf


  • 4.  RE: BGP local address
    Best Answer

    Posted 06-10-2019 05:55
    Hi Truf,

    Both the scenario that you have mentioned will achieve the same result.

    In the first case since the local address if mentioned at the beginning ,both the groups internal-peers and other-group will inherit the same local address as it is applied at the global level and we haven’t applied anything explicitly at the group level.

    show protocols bgp
    local-address 172.16.1.1;
    export send-direct;
    group internal-peers {
    type internal;
    export send-192.168.0.1;
    neighbor 172.16.2.2 {
    export send-192.168.20.1;
    }
    neighbor 172.16.3.3;
    }
    group other-group {
    type internal;
    neighbor 172.16.4.4;
    }



    Now in the second scenario, you are explicitly applying the local address at the group level and this will take precedence over the global level policy. But since your local address is the same the both config scenario will achieve the same result.


    Regards,
    Jibu


  • 5.  RE: BGP local address

    Posted 06-10-2019 07:13
    Thank you, Jibu, truf