Professional Documents
Culture Documents
Using Rib-Groups or Auto-Export For Route Leaking - J-Net Community
Using Rib-Groups or Auto-Export For Route Leaking - J-Net Community
net:80/t5/TheRoutingChurn/Using-rib-groups-or-auto-export-for-route-leaking/…
#TheRoutingChurn
Article Options
Announceme
Using rib-groups or auto-export for route leaking
by Gonzalo Gómez Herrero (gonzalo) 08-05-2013 03:34 AM - edited New feature:
icons to your
Top Tags
Route leaking across instances is a widely used technique in many networking environments to allow
certain end-to-end communication flows conditioned by policies, to implement deterministic flow redirection MPLS 6PE
rules or to influence route distribution and resolution, among others. mpls-vpn 6
junosphere
The underlying mechanism is based on being able to share routes across different Routing Information
labeled unica
Bases (RIBs).
Junos OS offers multiple options and alternatives to instantiate this concept. Two well-known data
structures to achieve that are rib-groups and auto-export in case of L3VPN routing and forwarding instances
(VRFs).
Community R
With this article, I am reviewing datapoints, similarities and differences between these both Junos OS
features, as a prelude for a particular use case in the next post, and I will be using a multi-VRF scenario as Event calenda
very simple scenario to illustrate all these topics. Technical web
Products
Junos OS rib-groups Training
rib-groups were defined at the very first Junos OS releases as a resource to be able to share routes Terms of Serv
across Routing Information Bases (RIBs). This feature groups more than a single routing table (no matter
if belonging to a VRF or not) to form a routing-table group, where different protocols can import routes
into (and can eventually export routes from). Labels
More details for rib-groups can be found under: http://www.juniper.net/techpubs/en_US/junos13.1/to 6PE (9)
pics/reference/configuration-statement/rib-groups-...
6VPE (4)
There are even more recent address translation features in Junos OS associated when grouping tables BGP (8)
from different families, as described in other posts in this blog, like 6PE and 6VPE over IPv4 BGP-LU - Part
BGP-LU (5)
I and 6PE and 6VPE over IPv4 BGP-LU - Part II, to perform not only route sharing across tables, but also
address translation when doing so. broadband (1
rib-groups are actually a rich and versatile functionality, with multiple options to fine tune, mainly via
import-policy. Among others, following distinctive aspects can be relevant for comparison:
• rib-groups are applied on a per protocol basis, not on a per table basis. Routes from the protocol About the Au
are imported into a group of tables. It is essential to determine which protocols routes are then
learned from, so as to construct a route sharing scheme to import routes into multiple RIBs. Gon
• rib-groups are a generic construct, beyond the VRF itself, to group routing tables. These RIBs can (gonzal
Juniper E
belong to the default routing instance, VRFs, virtual-routers etc. It is then itself independent of Route
Targets (RTs), which is an [RFC4364] VRF-only related concept
I am currently
• rib-groups create secondary route copies in RIBs that are exportable for protocols in the
EMEA Profes
corresponding instances from the routing-table group and also exportable for VRF routes when and have bee
adding the Route Distinguisher (RD) to advertise them via MP-BGP. This mechanism creates sibling (inter)network
paths locally in other local tables and all these routes are then redistributed with MP-BGP. years. I love t
offers us the t
to be able to l
Considering an arbitrary example based on leaking across multiple IPv4 RIBs from different instances
every day: fro
and diverse PE-CE protocols with their policies, rib-groups can be depicted as in the following from custome
diagram, to interact at protocol level to import routes into arbitrary groups of routing tables: other colleagu
mistakes and
is the ongoing
ongoing learn
joining Junipe
worked in var
for system int
providers, so
'other side'. A
father of 2 an
Madrid. I like
and celtic mu
an amateur p
MTBiker, whe
spare time.
Juan Ant
Ven (anton)
Juniper Employe
Love to break
can remembe
hands-on exp
during my MS
ications and E
(MSEE); mov
space industr
critical system
ground segm
Became profe
consulting en
carriers in the
providing exp
living the Jun
ideas to pract
customer que
challenges. E
playing the gu
Latest Article
Inter-AS Optio
IPv6 L3VPNs
About route le
Using rib-grou
route leaking
Latest Comm
efuentes on:
auto-export fo
Gonzalo
(gonzalo) on
Note that some protocol export policies are actually looking to match into leaked routes, such as the IPv4 and IPv6
OSPFv2 export policies looking to match certain BGP routes in all instances but A. Also, bear in mind
ryantang on:
that there are as many routes advertised via MP-BGP as indirectly enforced by rib-groups when triggered blac
importing them in local VRFs.
Gonzalo
For instance, for this specific case using rib-groups, these would be the actual indicators when (gonzalo) on
applying them to an eBGP session as PE-CE protocol: IPv4 BGP-LU
[edit routing-instances]
Gonzalo
A { (gonzalo) on
instance-type vrf; in IPv6-only V
[...]
bgp { Gonzalo
export [ ... redist-ospf-direct-local ]; (gonzalo) on
group ebgp { Size to avoid
type external;
family inet {
unicast {
rib-group A-to-all; Archives
} 09-29-2013 -
}
peer-as 65001; 09-01-2013 -
neighbor 10.100.0.1; 08-04-2013 -
}
} View Comple
}
}
B {
[...]
}
C {
[...]
}
[...]
Z {
[...]
}
Note that the above highlighted BGP_RT_Background bit refers to exporting such routes out of each VRF table
towards MP-BGP (adding RD):
[…]
Z.inet.0: 12 destinations, 18 routes (12 active, 0 holddown, 6 hidden)
Prefix Nexthop MED Lclpref AS path
0.0.0.0/0 Self 100 65002 65001 I
This newer policy-based inter-instance export is based on constructing a VRF target tree when examining
vrf-import and vrf-export policies with given RT communities and, if this feature is enabled and a
certain instance refers to a given RT in its vrf-import policy, this is automatically added to the import list
of the RT itself and the route is imported. The symmetrical concept applies for vrf-export policies.
This provides a basic route sharing architecture for VRFs by means of having a module that tracks route
changes in routing tables that are exporters of a particular RT. When a route change occurs, the instance's
vrf-export policy will be applied to the route, not only with regards to its redistribution via MP-BGP, but
also for the sake of being imported to all local tables with matching RT in their vrf-import policy.
In this sense, only the primary route is then redistributed via MP-BGP, as opposed to rib-groups, as it is
understood that other local VRFs only need to import the RT-matching route.
auto-export is the external representation of this concept, which needs to be bound to matching RTs
in vrf-import and vrf-export policies. More details for this feature can be found under:
http://www.juniper.net/techpubs/en_US/junos13.1/topics/concept/auto-export-overview.html
auto-export is then a very intuitive and easy-to-configure feature, because multi-RT matching policies
are usually already in place for remote leaking purposes (that is, building extranets or hub-and-spoke
L3VPN setups). However, there are some aspects worth highlighting:
• auto-export is applied on a per table and not per protocol basis. Just matching RTs in both
directions is enough, no matter which protocols routes are learned from.
• auto-export is inherently tied to Route Targets (RTs). Junos OS offers similar but more generic
instance-import and instance-export data structures, applicable on a per instance basis
(thus, it is used with other instance types than VRFs as well), but they require in that case to explicitly
set instance names, rather than more generic RTs. The inter-instance route sharing graph needs to
be then explicitly derived from the instance-import and instance-export configuration, rather
than inherently constructed with RTs when evaluating vrf-import and vrf-export policies.
• auto-export creates secondary route copies in RIBs that are exportable for protocols in the
corresponding instances from the routing-table group. However, these secondary local copies are not
advertised via MP-BGP. There are no sibling paths but the primary table exported via MP-BGP.
Considering then the same route leaking example across multiple IPv4 RIBs from different instances and
diverse PE-CE protocols with their policies, auto-export would apply at the VRF table level:
auto_export_route_leaking.jpg
[edit routing-instances]
A {
instance-type vrf;
[...]
routing-options {
auto-export;
}
bgp {
export [ ... redist-ospf-direct-local ];
group ebgp {
type external;
family inet {
unicast;
}
peer-as 65001;
neighbor 10.100.0.1;
}
}
}
}
B {
[...]
routing-options {
auto-export;
}
}
C {
[...]
routing-options {
auto-export;
}
}
[...]
Z {
[...]
routing-options {
auto-export;
}
}
and this is reflected in the same flags for local routes, but an additional rt-export bit:
but note that the BGP_RT_Background bit only appears in the primary route, and thus affects exporting such only
routes out of the primary VRF table towards MP-BGP (adding RD):
I would recommend to weigh these consequences of using one or the other feature for advanced
designs. In fact, this decision became a cornerstone in a use case that I had to evaluate for a project and
I am going to expose in the next post!
In the meantime, if you have any questions about them, please be my guest via comment posting or
tweeting back at @go_nzo
Comments
Great post! Both topics can be somewhat arcane to new Jubies. I also strenuously recommend the first chapter of
Network Mergers and Migrations for more great information on these 2 topics.
Permalink 0
Thanks for your feedback and appreciation, StuckInActive, and many thanks also for the book promotion!
Permalink 0
Hi Gonzalo,
We have auto-export in all vrfs of the same PE and it's working for 100.100.254.0/24 prefix (vrfa--->vrfb)
In the "vrfb" we have the BGP_RT_Background even though it is from a secondary table:
VRF B:
xxxxx.inet.0: 383 destinations, 2836 routes (383 active, 0 holddown, 0 hidden)
100.100.254.0/24 (5 entries, 1 announced)
TSI:
KRT in-kernel 100.100.254.0/24 -> {100.100.226.239, 100.100.226.237}
Page 0 idx 1 Type 1 val f925260
Nexthop: Self
AS path: [65000] 65000 ?
Communities:
Path 100.100.254.0 from 100.100.226.237 Vector len 4. Val: 1
*BGP Preference: 170/-101
Next hop type: Router, Next hop index: 1058217
Address: 0x150b5b48
Next-hop reference count: 132
Source: 100.100.226.237
Next hop: 100.100.226.239 via ae20.1992, selected
State: <Secondary Active Ext>
Peer AS: 65112
Age: 3d 6:32:04 Metric: 0
Task: BGP_65112.100.100.226.237+179
Announcement bits (3): 0-KRT 1-BGP_RT_Background 2-RT >>>>>>>>>>>????????(rt-export)
AS path: 65112 ?
AS path: Recorded
Communities: target:65000:117
<snip>
Primary Routing Table VRFA.inet.0
Regards,
magda
Permalink 0
You must be a registered user to add a comment here. If you've already registered, please log in. If you haven't registered yet,
please register and log in.
Post a Comment
Site Map / RSS Feeds / Careers / Accessibility / Feedback / Privacy & Policy / Legal Notices Copyright© 1999-2013 Juniper Netw