Routing
Highlighted
Routing

BGP in JunOS - Help! Route advertisements, Prefix lists, policy statement, filter!!??

‎10-04-2017 12:33 PM

Hi, really struggling to work out these terms and how they build a way for advertising a prefix out using Juniper devices

 

Cisco appears to be straighforward, use the 'network command' - there doesnt appear to be the equivalent in Juniper? Is that correct?

 

So how does Juniper advertise prefixes?  Network prefixes, static route, routes from other protocols (redistributed routes)

 

Does anyone have any simple breakdown of how and syntax with an explanation of waht/how the terms prefix lists, policy statements, filters interact and build these advertisements? I'm going around in circles and I know there is a simple explanation somewhere?

 

Any help really appreciated - 

 

Thanks

 

 

 

 

5 REPLIES 5
Highlighted
Routing

Re: BGP in JunOS - Help! Route advertisements, Prefix lists, policy statement, filter!!??

‎10-04-2017 01:01 PM

have a look at

https://www.juniper.net/us/en/training/jnbooks/day-one/fundamentals-series/routing-internet-protocol...

 

a very good day one book also about BGP

Routing the Internet Protocol Juniper Day One Book

 

 

 

 

 

 

 

 

 

 

 

 

 

regards

 

alexander

Highlighted
Routing

Re: BGP in JunOS - Help! Route advertisements, Prefix lists, policy statement, filter!!??

‎10-08-2017 06:40 AM

You need to set routing options for aggregating your subnet, set router-id, the create the export filter, then export the filter to peer.

 

set routing-options aggregate route 1.2.3.0/24

set routing-options router-id 1.2.3.4

set policy-options policy-statement to-peer term export_prefix from protocol aggregate

set policy-options policy-statement to-peer term export_prefix from route-filter 1.2.3.0/24 exact

set policy-options policy-statement to-peer term export_prefix then accept

set policy-options policy-statement to-peer then reject

set protocols bgp group peer

set protocols bgp group peer type external

set protocols bgp group peer peer-as 1234
set protocols bgp group peer local-as 1234

set protocols bgp group peer neighbor 1.2.3.4 export to-peer

 

This will get you started.

You might need to set hold-time, import rules etc.

--
Best regards,

Ronnie Finseth
Network Engineer, iODC ApS (Denmark)
Highlighted
Routing

Re: BGP in JunOS - Help! Route advertisements, Prefix lists, policy statement, filter!!??

‎10-08-2017 11:18 PM

Hi, thanks, so all of this syntax is needed compared to Cisco:

 

R1#conf t

R1(config)# router bgp 500

R1(config-router)# network 2.2.2.2 255.255.255.255   (< --- advertising my loopback into BGP)

 

Is that right? Juniper will need  about 10 lines to do the same thing?

Highlighted
Routing

Re: BGP in JunOS - Help! Route advertisements, Prefix lists, policy statement, filter!!??

‎10-08-2017 11:19 PM

Great, thanks appreciate it

Highlighted
Routing

Re: BGP in JunOS - Help! Route advertisements, Prefix lists, policy statement, filter!!??

‎10-09-2017 01:29 PM

Network statements with Cisco redistributes specific routes into BGP. To do the same thing with Junos, you need to create a policy that you can use to redistribute specific routes into BGP. Here's a Junos equivalent to the Cisco config you posted:

 

 

set policy-options policy-statement EXPORT-BGP term LOOPBACK from route-filter 2.2.2.2/32 exact
set policy-options policy-statement EXPORT-BGP term LOOPBACK then accept
set protocols bgp group eBGP export EXPORT-BGP

 

 

Feedback