BGP Basics
Inbound path
Neighbor → IN policy -> RIB-IN → best-path-selection→ LOC-RIB → Routing Table
Outbound path
LOC-RIB → OUT policy->Update-generation -> RIB-OUT(per neighbor) → Neighbor
iBGP & eBGP what attributes will change
R1------eBGP-------R2--------iBGP---------R3
From eBGP → iBGP, R2 sends the following attributes to R3:
AS_PATH → unchanged (note:-if a route originates within AS. then its EMPTY)
NEXT_HOP → unchanged (R1’s IP)
LOCAL_PREF → added by R2
ORIGIN → carried
MED → carried
COMMUNITIES → carried
Atomic Aggregate / Aggregator → carried
Only LOCAL_PREF is added. Nothing else is modified.
From R2 (iBGP) → R1 (eBGP):
R2 inserts its AS in AS_PATH
R2 sets NEXT_HOP to itself
Local Preference is removed
MED, ORIGIN, Communities, Aggregator attributes are carried normally
| Category | Policy Tool | Used For | Where Applied |
|---|---|---|---|
| Prefix Control | Prefix-list | Fast, scalable prefix filtering | Inbound / Outbound |
| Distribute-list | Basic filtering (older method) | Inbound (mostly IGP/BGP) | |
| ACL | Legacy match (less flexible than prefix-list) | Inbound / Redistribution | |
| Route-filter | Advanced prefix matching (Juniper style) | Policy framework | |
| RPKI | Validate route legitimacy (origin validation) | Inbound | |
| Maximum-prefix | Protect against route leaks | Neighbor-level | |
| Attribute Control | Route-map | Modify attributes (LP, MED, AS-path, etc.) | Inbound / Outbound |
| Policy-statement | Modern structured policy (Junos equivalent) | Inbound / Outbound | |
| BGP Community | Tag routes for policy decisions | Both | |
| Extended Community | MPLS VPN / EVPN control | Both | |
| Local Preference | Influence outbound traffic (inside AS) | Inbound | |
| MED | Influence inbound traffic (between ASes) | Outbound | |
| AS-Path prepend | Traffic engineering (make path less preferred) | Outbound | |
| Next-hop self | Ensure reachability in iBGP | Outbound | |
| AS Control | AS-Path filter | Loop prevention / path-based filtering | Inbound / Outbound |
| Allowas-in | Accept own AS (special cases) | Inbound | |
| Remove-private-AS | Clean private AS numbers | Outbound | |
| Redistribution | Route tag | Prevent routing loops during redistribution | IGP ↔ BGP boundary |
| Route-map (again) | Control what gets redistributed | Redistribution | |
| Traffic Steering | PBR (Policy-Based Routing) | Override routing table decision | Data plane (not BGP control) |
| BGP PIC / ECMP | Fast failover / load sharing | Forwarding plane |
How a Route Reflector Works in This Flow
A Route Reflector DOES NOT change the BGP flow.
It only changes the advertisement rules, so iBGP clients can learn routes from each other.
Let’s break it down:
RR: Ingress Path (when RR receives a route from a client)
1. Client → RR (iBGP)
RR receives an update from a client.
2. RR RIB-IN
Route stored in RIB-IN.
3. Inbound policy on RR
RR applies inbound route-map / policy if configured.
4. Loc-RIB
RR puts the selected (best-path) into its Loc-RIB.
RR does not change NEXT-HOP for EVPN or iBGP unless configured.
For normal IPv4, RR keeps next-hop "unchanged by default".
RR: Egress Path (RR sending the route out)
RR checks route-reflector rules:
RR reflects the route to:
| Learned from | RR sends to | Why |
|---|---|---|
| 1.Client | All other Clients + Non-clients (iBGP) | Route reflection rule |
| 2.Non-client | Only Clients | Route reflection rule |
| 3.eBGP | Both Clients + Non-clients | Normal behavior |
Then same steps continue:
RR Loc-RIB → Outbound Policy → RIB-OUT → BGP Update to neighbors
Detailed Flow on RR
RR behavior depends on the source of the route
Multi-tier RRs, Nested RR clusters, RR hierarchy
| Attribute | Applied | Used by |
|---|---|---|
| LOCAL_PREF | Inbound | Your AS |
| MED | Outbound | Neighbor AS |
| AS-PATH prepend | Outbound | Internet |
| Weight (Cisco) | Inbound | Local router |
There is NO route-refresh equivalent for outbound changes.
| Action | Session | TCP | Route exchange |
|---|---|---|---|
| Hard reset | Down / Up | Reset | Full re-advertise |
| Soft reset (in) | Stays up | No | Re-evaluate routes |
| Soft reset (out) | Stays up | No | Re-send routes |
| Route Refresh | Stays up | No | Ask peer to re-send |
What it does
Re-applies inbound policy
Uses stored Adj-RIB-In
No re-advertisement from peer
Requirement
👉 Router must store received routes
Downsides
❌ High memory usage
❌ Old-school method
Comments
Post a Comment