Originating BGP advertisements and BGP community tagging in Juniper

Originating BGP advertisement can be configured to any iBGP peer router. Here’s the sample configuration of originating BGP routes and community tagging in Juniper.

BGP

Assuming these are the summarized prefixes that you want to advertise via BGP.
111.111.0.0/16
222.222.0.0/16

Configuration:

routing-options {
graceful-restart;
router-id 1.1.1.1;
autonomous-system 11111;

protocols {
bgp {
group RR-IBGP {
type internal;
description RR-IPv4;
local-address 192.168.100.6;
family inet {
unicast;
}
authentication-key “$1$N3tBioBwfdFsFVwgoGDh.3C0oL”; ## SECRET-DATA
export bgp-statement;
neighbor 192.168.100.5 {
description iBGP to Route Reflector;
}

policy-statement bgp-statement {
term SITE1 {
from {
route-filter 111.111.0.0/16 exact;
route-filter 222.222.0.0/16 exact;
}
then {
community add SITE1;
accept;
}

community SITE1 members 12345:111;

In display set:
set routing-options graceful-restart

set routing-options router-id 1.1.1.1
set routing-options autonomous-system 11111

set protocols bgp group RR-IBGP type internal
set protocols bgp group RR-IBGP description RR-IPv4
set protocols bgp group RR-IBGP local-address 192.168.100.6
set protocols bgp group RR-IBGP family inet unicast
set protocols bgp group RR-IBGP authentication-key “$1$N3tBioBwfdFsFVwgoGDh.3C0oL”
set protocols bgp group RR-IBGP export bgp-statement
set protocols bgp group RR-IBGP neighbor 192.168.100.5 description iBGP to Route Reflector

set policy-options policy-statement bgp-statement term SB from route-filter 111.111.0.0/16 exact
set policy-options policy-statement bgp-statement term SB from route-filter 222.222.0.0/16  exact
set policy-options policy-statement bgp-statement term SITE1 then community add SB
set policy-options policy-statement bgp-statement term SITE1 then accept

set policy-options community SITE1 members 12345:111

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *