Juniper Lab aggregate route
March 2nd, 2011 in
CCIE,
Juniper | tags:
aggregate,
Juniper,
JunOS
This post is about how to configure aggregation and redistribute it into bgp.
Starting point for this post will be the same mpls network as seen in the previous posts. See below the diagram of the network topology :

For the purpose of this post I configured the following ip address on router 6
Interface configuration :
|
|
|
Router 6 :
set interfaces fxp2 vlan-tagging
set interfaces fxp2 unit 10 vlan-id 10
set interfaces fxp2 unit 10 family inet address 10.10.1.1/24
set interfaces fxp2 unit 10 family inet address 10.10.2.1/24
set interfaces fxp2 unit 10 family inet address 10.10.3.1/24
set interfaces fxp2 unit 10 family inet address 10.10.4.1/24
|
On router 1 I configured statics which point router 6, this is needed so that there are contributing routes for the aggregate route.
Static routes :
|
|
|
Router 1 :
set routing-instances VPNA routing-options static route 10.10.1.0/24 next-hop 10.0.16.2
set routing-instances VPNA routing-options static route 10.10.2.0/24 next-hop 10.0.16.2
set routing-instances VPNA routing-options static route 10.10.3.0/24 next-hop 10.0.16.2
Now that the statics are defined we can define the aggregate route in VPNA on router 1 :
set routing-instances VPNA routing-options aggregate route 10.10.0.0/22
And redistribute it in BGP :
set policy-options policy-statement export-VPNA term 20 from protocol aggregate
set policy-options policy-statement export-VPNA term 20 from route-filter 10.10.0.0/22 exact
set policy-options policy-statement export-VPNA term 20 then community add VPNA
set policy-options policy-statement export-VPNA term 20 then accept
Be sure to insert it before the REJECT term :
insert policy-options policy-statement export-VPNA term 20 before term REJECT
|
See details about the aggregated route in VPNA :
Show aggregate route detail :
|
|
|
Router 1 :
chris@IPLOGIC-1# run show route protocol aggregate table VPNA detail
VPNA.inet.0: 11 destinations, 11 routes (10 active, 0 holddown, 1 hidden)
10.10.0.0/22 (1 entry, 1 announced)
*Aggregate Preference: 130
Next hop type: Reject
Next-hop reference count: 3
State:
Local AS: 65001
Age: 52:12
Task: Aggregate
Announcement bits (2): 1-KRT 3-BGP RT Background
AS path: I (LocalAgg)
Flags: Depth: 0 Active
AS path list:
AS path: I Refcount: 3
Contributing Routes (3):
10.10.1.0/24 proto Static
10.10.2.0/24 proto Static
10.10.3.0/24 proto Static
|
Now let’s take a look in the routing table of router 5 and see if the aggregated route is there :
Show route table on router 5 :
|
|
|
Router 5 :
chris@IPLOGIC-5# run show route
inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
5.5.5.5/32 *[Direct/0] 02:52:18
> via lo0.0
6.6.6.6/32 *[BGP/170] 02:51:30, localpref 100
AS path: 65001 65006 I
> to 10.0.45.1 via fxp3.450
10.0.45.0/30 *[Direct/0] 02:52:18
> via fxp3.450
10.0.45.2/32 *[Local/0] 02:52:18
Local via fxp3.450
10.10.0.0/22 *[BGP/170] 02:51:30, localpref 100
AS path: 65001 I
> to 10.0.45.1 via fxp3.450
__juniper_private2__.inet.0: 1 destinations, 1 routes (0 active, 0 holddown, 1 hidden)
|
As you can see the aggregate is in there, let’s see if we can ping one of the ip-addresses configured on router 6 :
Ping from router 5 :
|
|
|
Router 5 :
chris@IPLOGIC-5# run ping 10.10.3.1 source 5.5.5.5
PING 10.10.3.1 (10.10.3.1): 56 data bytes
64 bytes from 10.10.3.1: icmp_seq=0 ttl=63 time=70.974 ms
64 bytes from 10.10.3.1: icmp_seq=1 ttl=63 time=2.368 ms
64 bytes from 10.10.3.1: icmp_seq=2 ttl=63 time=1.525 ms
^C
--- 10.10.3.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.525/24.956/70.974/32.542 ms
|