What Is ORIGIN?
ORIGIN (type code 1) is a well-known mandatory path attribute that shows how the route entered BGP (BGP Path Attributes and Best Path Selection). The value is one octet, set by the router that brought the route into BGP, and RFC 4271 section 5.1.1 says no other speaker should change it.
The Three Values
| Value | Name | Meaning |
|---|---|---|
| 0 | IGP | A BGP speaker put the route into BGP explicitly, as a route interior to its own AS. |
| 1 | EGP | Learned from EGP (RFC 904), the predecessor of BGP. EGP is no longer used, so this never appears in practice. |
| 2 | Incomplete | The route entered BGP some other way. Routes injected by redistribution fall here. |
In show bgp the value appears as a single character at the end of each line (i / e / ?). Inside an UPDATE it is a one-octet number (0 / 1 / 2); the character in show is that value condensed to one letter.
i in the third column of *>i is the status code for “internal” (learned over iBGP) and has nothing to do with the i at the end of the line.Which Operation Produces Which Value
| How the route enters BGP | ORIGIN |
|---|---|
Declared explicitly with network | IGP (i) |
Generated as an aggregate with aggregate-address | IGP if every component is IGP. If at least one component is Incomplete the aggregate is Incomplete; if none is Incomplete but at least one is EGP it is EGP (RFC 4271 9.2.2.2, BGP route aggregation) |
| Redistributed from another protocol, a static route or a connected route | Incomplete (?) |
network is the administrator declaring routes one by one, hence IGP; redistribute pours in another protocol’s routes, whose provenance BGP cannot see, hence Incomplete.
Where It Sits in Best Path Selection
ORIGIN is compared at the fifth step of best path selection, and the lower value wins (IGP < EGP < Incomplete).
In practice LOCAL_PREF or AS_PATH length usually decides first, so ORIGIN matters only when everything above it is tied - for instance when the same prefix is injected at two places in the AS, once with network and once with redistribute.
Levelling ORIGIN to IGP When Advertising to eBGP
Routes originated in your own AS with network are IGP from the start. With redistribute even local routes end up as a mix of i and ?, which can affect best path selection in the neighboring AS. One way to avoid that is a route policy that levels the value to IGP on the way out to eBGP.
ORIGIN erases the information about how the route entered BGP, and RFC 4271 section 5.1.1 says other speakers should not change it. Keep it to cases where the mix of ? actually causes trouble, and be careful not to apply it to routes received from other ASes (transit routes).The simple form levels every route sent to that peer.
route-policy EBGP-OUT
set origin igp
pass
end-policy
!
router bgp <AS number>
neighbor <eBGP peer address>
address-family ipv4 unicast
route-policy EBGP-OUT out
!
!
!route-map EBGP-OUT permit 10
set origin igp
!
router bgp <AS number>
address-family ipv4
neighbor <eBGP peer address> activate
neighbor <eBGP peer address> route-map EBGP-OUT outThe pass on IOS XR and the permit 10 on IOS XE both mean “let every route through”; without them nothing is advertised at all.
This form also hits transit routes. To limit it to routes originated in your own AS, match an empty AS_PATH (^$). The local AS number is prepended after the route policy runs, so from an outbound policy’s point of view a locally originated route has an empty AS_PATH.
as-path-set LOCAL-ORIGIN
ios-regex '^$'
end-set
!
route-policy EBGP-OUT
if as-path in LOCAL-ORIGIN then
set origin igp
endif
pass
end-policyip as-path access-list 1 permit ^$
!
route-map EBGP-OUT permit 10
match as-path 1
set origin igp
!
route-map EBGP-OUT permit 20The empty permit 20 on IOS XE lets the non-matching routes through; without it everything that is not locally originated is dropped.
Verification on Real Devices
Six XRd 26.1.1 routers confirm (1) that ORIGIN decides the best path when everything above it is tied, and (2) what differs between rewriting every route and limiting the rewrite with ^$.
| Router | AS | Role |
|---|---|---|
| R1 | 65001 | Advertises 192.168.99.0/24 with network (ORIGIN is i); Loopback99 holds the prefix |
| R2 | 65001 | Observation point. Receives R1’s i and R3’s ? at the same time |
| R3 | 65001 | Advertises the same 192.168.99.0/24 with redistribute static (ORIGIN is ?). eBGP with R4 |
| R4 | 65002 | Receives from R3. The peer used for the outbound policy tests |
| R5 | 65003 | One AS further out, to see whether the rewrite travels that far |
| R6 | 65004 | Source of the transit routes: 192.168.6.0/24 via network (i) and 192.168.66.0/24 via redistribute static (?) |
AS 65001 runs OSPF area 0, with a full mesh of iBGP sessions between the Loopback0s. R3’s static route points at R1’s Loopback0 (10.0.0.1) recursively, so even when R3’s path wins, traffic still reaches R1’s Loopback99.
| STEP | Change | What to check |
|---|---|---|
| 0 | none (initial state) | Steps 1 to 4 are tied, so ORIGIN decides at step 5 (i wins) |
| 1 | no network 192.168.99.0/24 on R1 | The i route disappears and R2’s best becomes ?; R4, R5 and R6 show ? at the end of the line too |
| 2 | Restore network on R1 | Back to the STEP 0 state |
| 3 | EBGP-OUT-ALL on R3 (set origin igp for every route) | Not only the local route: the transit route is rewritten to i as well |
| 4 | EBGP-OUT-LOCAL on R3 (^$ only, final state) | Only the locally originated route becomes i; the transit route stays ? |
In every STEP R4 and R5 send 50 pings and a traceroute to 192.168.99.1, which also records which path carried the traffic.
STEP 0: ORIGIN Decides the Best Path
In R2’s BGP table only 192.168.99.0/24 has two lines, ending in i (from R1) and ? (from R3).
RP/0/RP0/CPU0:R2#show bgp
Sun Sep 27 12:33:27.495 UTC
BGP router identifier 10.0.0.2, local AS number 65001
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000 RD version: 11
BGP main routing table version 11
BGP NSR Initial initsync version 3 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i192.168.1.0/24 10.0.0.1 0 100 0 i
*> 192.168.2.0/24 0.0.0.0 0 32768 i
*>i192.168.3.0/24 10.0.0.3 0 100 0 i
*>i192.168.4.0/24 10.3.4.4 0 100 0 65002 i
*>i192.168.5.0/24 10.3.4.4 100 0 65002 65003 i
*>i192.168.6.0/24 10.1.6.6 0 100 0 65004 i
*>i192.168.66.0/24 10.1.6.6 0 100 0 65004 ?
*>i192.168.99.0/24 10.0.0.1 0 100 0 i
* i 10.0.0.1 0 100 0 ?
Processed 8 prefixes, 9 pathsThe detailed output shows that steps 1 to 4 are all tied. The NEXT_HOP and the IGP metric are the same; the only difference is ORIGIN.
RP/0/RP0/CPU0:R2#show bgp 192.168.99.0/24
Sun Sep 27 12:33:28.055 UTC
BGP routing table entry for 192.168.99.0/24
Versions:
Process bRIB/RIB SendTblVer
Speaker 8 8
Last Modified: Sep 27 12:25:36.023 for 00:07:52
Paths: (2 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local, (received & used)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best, group-best
Received Path ID 0, Local Path ID 1, version 8
Path #2: Received by speaker 0
Not advertised to any peer
Local, (received & used)
10.0.0.1 (metric 2) from 10.0.0.3 (10.0.0.3)
Origin incomplete, metric 0, localpref 100, valid, internal
Received Path ID 0, Local Path ID 0, version 0| Order | Criterion | Path #1 (from R1) | Path #2 (from R3) | Result |
|---|---|---|---|---|
| 1 | WEIGHT | 0 | 0 | tied |
| 2 | LOCAL_PREF | 100 | 100 | tied |
| 3 | Locally originated | both learned over iBGP | both learned over iBGP | tied |
| 4 | AS_PATH length | 0 (originated inside the AS) | 0 (originated inside the AS) | tied |
| 5 | ORIGIN | IGP | Incomplete | Path #1 wins |
Because R3’s static route points at R1’s Loopback0, the NEXT_HOP is 10.0.0.1 on both paths. Whichever is chosen, traffic goes to the same router, R1, and the pings from R4 in AS 65002 to 192.168.99.1 get through.
RP/0/RP0/CPU0:R2#show route bgp
Sun Sep 27 12:33:27.791 UTC
B 192.168.1.0/24 [200/0] via 10.0.0.1, 00:07:52
B 192.168.3.0/24 [200/0] via 10.0.0.3, 00:08:03
B 192.168.4.0/24 [200/0] via 10.3.4.4, 00:08:03
B 192.168.5.0/24 [200/0] via 10.3.4.4, 00:08:03
B 192.168.6.0/24 [200/0] via 10.1.6.6, 00:07:51
B 192.168.66.0/24 [200/0] via 10.1.6.6, 00:07:51
B 192.168.99.0/24 [200/0] via 10.0.0.1, 00:07:52RP/0/RP0/CPU0:R4#ping 192.168.99.1 source 192.168.4.1 count 50 timeout 1
Sun Sep 27 12:34:51.497 UTC
Type escape sequence to abort.
Sending 50, 100-byte ICMP Echos to 192.168.99.1 timeout is 1 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (50/50), round-trip min/avg/max = 6/11/52 ms
RP/0/RP0/CPU0:R4#traceroute 192.168.99.1 source 192.168.4.1 probe 3 timeout 1 maxttl 6
Sun Sep 27 12:34:53.105 UTC
Type escape sequence to abort.
Tracing the route to 192.168.99.1
1 10.3.4.3 6 msec 5 msec 4 msec
2 10.1.3.1 10 msec * 10 msec STEP 1: Removing the i Route Makes the ? Route Win
The network statement is removed from R1, which deletes the i route.
RP/0/RP0/CPU0:R1#show configuration commit changes last 1
Sun Sep 27 12:37:03.574 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
router bgp 65001
address-family ipv4 unicast
no network 192.168.99.0/24
!
!
endR2 is left with R3’s Origin incomplete path, and in the neighboring AS 65004 (R6) the end of the line changes from i to ?.
RP/0/RP0/CPU0:R2#show bgp 192.168.99.0/24
Sun Sep 27 12:33:28.055 UTC
BGP routing table entry for 192.168.99.0/24
Versions:
Process bRIB/RIB SendTblVer
Speaker 8 8
Last Modified: Sep 27 12:25:36.023 for 00:07:52
Paths: (2 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local, (received & used)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best, group-best
Received Path ID 0, Local Path ID 1, version 8
Path #2: Received by speaker 0
Not advertised to any peer
Local, (received & used)
10.0.0.1 (metric 2) from 10.0.0.3 (10.0.0.3)
Origin incomplete, metric 0, localpref 100, valid, internal
Received Path ID 0, Local Path ID 0, version 0RP/0/RP0/CPU0:R2#show bgp 192.168.99.0/24
Sun Sep 27 12:39:55.014 UTC
BGP routing table entry for 192.168.99.0/24
Versions:
Process bRIB/RIB SendTblVer
Speaker 12 12
Last Modified: Sep 27 12:37:39.023 for 00:02:16
Paths: (1 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local, (received & used)
10.0.0.1 (metric 2) from 10.0.0.3 (10.0.0.3)
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best
Received Path ID 0, Local Path ID 1, version 12RP/0/RP0/CPU0:R6#show bgp
Sun Sep 27 12:36:27.824 UTC
BGP router identifier 10.0.0.6, local AS number 65004
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000 RD version: 10
BGP main routing table version 10
BGP NSR Initial initsync version 4 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.0/24 10.1.6.1 0 0 65001 i
*> 192.168.2.0/24 10.1.6.1 0 65001 i
*> 192.168.3.0/24 10.1.6.1 0 65001 i
*> 192.168.4.0/24 10.1.6.1 0 65001 65002 i
*> 192.168.5.0/24 10.1.6.1 0 65001 65002 65003 i
*> 192.168.6.0/24 0.0.0.0 0 32768 i
*> 192.168.66.0/24 0.0.0.0 0 32768 ?
*> 192.168.99.0/24 10.1.6.1 0 0 65001 i
Processed 8 prefixes, 8 pathsRP/0/RP0/CPU0:R6#show bgp
Sun Sep 27 12:42:58.136 UTC
BGP router identifier 10.0.0.6, local AS number 65004
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000 RD version: 11
BGP main routing table version 11
BGP NSR Initial initsync version 4 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.0/24 10.1.6.1 0 0 65001 i
*> 192.168.2.0/24 10.1.6.1 0 65001 i
*> 192.168.3.0/24 10.1.6.1 0 65001 i
*> 192.168.4.0/24 10.1.6.1 0 65001 65002 i
*> 192.168.5.0/24 10.1.6.1 0 65001 65002 65003 i
*> 192.168.6.0/24 0.0.0.0 0 32768 i
*> 192.168.66.0/24 0.0.0.0 0 32768 ?
*> 192.168.99.0/24 10.1.6.1 0 65001 ?
Processed 8 prefixes, 8 pathsThe capture on the R1 - R6 link shows ORIGIN as a number. No.4 in STEP 1 is INCOMPLETE (2), and No.3 after network is restored in STEP 2 is IGP (0).
Border Gateway Protocol - UPDATE Message
<snip>
Path Attribute - MP_REACH_NLRI
<snip>
Next hop: 10.1.6.1
<snip>
192.168.99.0/24
<snip>
Path Attribute - ORIGIN: INCOMPLETE
<snip>
Origin: INCOMPLETE (2)
Path Attribute - AS_PATH: 65001
<snip>
AS4: 65001Border Gateway Protocol - UPDATE Message
<snip>
Path Attribute - MP_REACH_NLRI
<snip>
Next hop: 10.1.6.1
<snip>
192.168.99.0/24
<snip>
Path Attribute - ORIGIN: IGP
<snip>
Origin: IGP (0)
Path Attribute - AS_PATH: 65001
<snip>
AS4: 65001
Path Attribute - MULTI_EXIT_DISC: 0 Download the pcap of the packet in the tshark output above (STEP 1 No.4, ORIGIN 2)
Download the pcap of the packet in the tshark output above (STEP 2 No.3, ORIGIN 0)
Restoring network on R1 in STEP 2 brings R2’s best path back to Origin IGP. The remaining STEPs start from that state.
STEP 3: Rewriting ORIGIN for Every Route in an Outbound Policy
A policy that sets IGP on every route is applied to the eBGP session from R3 to R4.
RP/0/RP0/CPU0:R3#show configuration commit changes last 1
Sun Sep 27 12:50:01.577 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
route-policy EBGP-OUT-ALL
set origin igp
pass
end-policy
!
router bgp 65001
neighbor 10.3.4.4
address-family ipv4 unicast
route-policy EBGP-OUT-ALL out
!
!
!
endThe end of each line in what R3 advertises to R4, before (STEP 2), after (STEP 3) and once limited with ^$ (STEP 4).
RP/0/RP0/CPU0:R3#show bgp neighbors 10.3.4.4 advertised-routes
Sun Sep 27 12:47:10.448 UTC
Network Next Hop From AS Path
192.168.1.0/24 10.3.4.3 10.0.0.1 65001i
192.168.2.0/24 10.3.4.3 10.0.0.2 65001i
192.168.3.0/24 10.3.4.3 Local 65001i
192.168.6.0/24 10.3.4.3 10.0.0.1 65001 65004i
192.168.66.0/24 10.3.4.3 10.0.0.1 65001 65004?
192.168.99.0/24 10.3.4.3 Local 65001?
Processed 6 prefixes, 6 pathsRP/0/RP0/CPU0:R3#show bgp neighbors 10.3.4.4 advertised-routes
Sun Sep 27 12:53:39.252 UTC
Network Next Hop From AS Path
192.168.1.0/24 10.3.4.3 10.0.0.1 65001i
192.168.2.0/24 10.3.4.3 10.0.0.2 65001i
192.168.3.0/24 10.3.4.3 Local 65001i
192.168.6.0/24 10.3.4.3 10.0.0.1 65001 65004i
192.168.66.0/24 10.3.4.3 10.0.0.1 65001 65004i
192.168.99.0/24 10.3.4.3 Local 65001i
Processed 6 prefixes, 6 pathsRP/0/RP0/CPU0:R3#show bgp neighbors 10.3.4.4 advertised-routes
Sun Sep 27 13:00:07.773 UTC
Network Next Hop From AS Path
192.168.1.0/24 10.3.4.3 10.0.0.1 65001i
192.168.2.0/24 10.3.4.3 10.0.0.2 65001i
192.168.3.0/24 10.3.4.3 Local 65001i
192.168.6.0/24 10.3.4.3 10.0.0.1 65001 65004i
192.168.66.0/24 10.3.4.3 10.0.0.1 65001 65004?
192.168.99.0/24 10.3.4.3 Local 65001i
Processed 6 prefixes, 6 pathsIn STEP 3 the locally originated 192.168.99.0/24 becomes i as intended, but the transit route 192.168.66.0/24 is rewritten from ? to i as well. It looks the same from AS 65003 (R5) beyond R4.
RP/0/RP0/CPU0:R5#show bgp
Sun Sep 27 12:55:11.954 UTC
BGP router identifier 10.0.0.5, local AS number 65003
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000 RD version: 12
BGP main routing table version 12
BGP NSR Initial initsync version 3 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.0/24 10.4.5.4 0 65002 65001 i
*> 192.168.2.0/24 10.4.5.4 0 65002 65001 i
*> 192.168.3.0/24 10.4.5.4 0 65002 65001 i
*> 192.168.4.0/24 10.4.5.4 0 0 65002 i
*> 192.168.5.0/24 0.0.0.0 0 32768 i
*> 192.168.6.0/24 10.4.5.4 0 65002 65001 65004 i
*> 192.168.66.0/24 10.4.5.4 0 65002 65001 65004 i
*> 192.168.99.0/24 10.4.5.4 0 65002 65001 i
Processed 8 prefixes, 8 pathsThe capture confirms it: in No.3 of STEP 3 the ORIGIN of 192.168.66.0/24 is IGP (0).
Border Gateway Protocol - UPDATE Message
<snip>
Path Attribute - MP_REACH_NLRI
<snip>
Next hop: 10.3.4.3
<snip>
192.168.66.0/24
<snip>
Path Attribute - ORIGIN: IGP
<snip>
Origin: IGP (0)
Path Attribute - AS_PATH: 65001 65004
<snip>
AS4: 65001
AS4: 65004STEP 4: Levelling Only the Locally Originated Routes
Adding ^$ as a condition limits the rewrite to routes originated in this AS.
RP/0/RP0/CPU0:R3#show configuration commit changes last 1
Sun Sep 27 12:56:30.352 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
as-path-set LOCAL-ORIGIN
ios-regex '^$'
end-set
!
no route-policy EBGP-OUT-ALL
route-policy EBGP-OUT-LOCAL
if as-path in LOCAL-ORIGIN then
set origin igp
endif
pass
end-policy
!
router bgp 65001
neighbor 10.3.4.4
address-family ipv4 unicast
route-policy EBGP-OUT-LOCAL out
!
!
!
endThe transit route is back to ?. In the same No.3 UPDATE, only 192.168.66.0/24 carries INCOMPLETE (2).
Border Gateway Protocol - UPDATE Message
<snip>
Path Attribute - MP_REACH_NLRI
<snip>
Next hop: 10.3.4.3
<snip>
192.168.66.0/24
<snip>
Path Attribute - ORIGIN: INCOMPLETE
<snip>
Origin: INCOMPLETE (2)
Path Attribute - AS_PATH: 65001 65004
<snip>
AS4: 65001
AS4: 65004R4’s table shows the split as well: 192.168.99.0/24 is i while 192.168.66.0/24 is ?.
RP/0/RP0/CPU0:R4#show bgp
Sun Sep 27 13:00:53.285 UTC
BGP router identifier 10.0.0.4, local AS number 65002
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000 RD version: 13
BGP main routing table version 13
BGP NSR Initial initsync version 4 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.0/24 10.3.4.3 0 65001 i
*> 192.168.2.0/24 10.3.4.3 0 65001 i
*> 192.168.3.0/24 10.3.4.3 0 0 65001 i
*> 192.168.4.0/24 0.0.0.0 0 32768 i
*> 192.168.5.0/24 10.4.5.5 0 0 65003 i
*> 192.168.6.0/24 10.3.4.3 0 65001 65004 i
*> 192.168.66.0/24 10.3.4.3 0 65001 65004 ?
*> 192.168.99.0/24 10.3.4.3 0 0 65001 i
Processed 8 prefixes, 8 pathsadvertised-routes displays 65001 in the AS path, but that is prepended after the policy runs. The policy sees an empty AS_PATH, which matches ^$, while 192.168.66.0/24 already carried 65004 and does not match.
192.168.1.0/24 and 192.168.2.0/24 match ^$ too, but they were already IGP, so nothing visibly changes.Verification Configs and show Output
Each STEP captures the following files from all six routers, one file per router and kind. The verification config is the ..._run.txt (final state: STEP 4).
| File | Contents |
|---|---|
..._show.txt | show version / show interface description / show route / show bgp / show bgp summary / show route bgp / show bgp for 192.168.99.0/24, 192.168.6.0/24 and 192.168.66.0/24 / show bgp neighbors / per-peer advertised-routes, routes and received routes / show bgp update-group / show bgp process / show rpl route-policy. R1 to R3 also include show ospf neighbor / show route ospf; R1 and R3 include show route 192.168.99.0/24 (R3 also show cef) |
..._log.txt | show logging limited to that STEP |
..._run.txt | show running-config at that STEP (the verification config for that STEP) |
..._ping.txt | 50 pings and a traceroute from R4 and R5 to 192.168.99.1 |
..._trace.txt | show bgp trace neighbor and show bgp trace error |
..._commit.cfg | The configuration actually committed in that STEP (only the routers that were changed) |
STEP 0: initial state (an i route and a ? route)
| Router | show output | syslog | running-config | ping | trace | Committed config |
|---|---|---|---|---|---|---|
| R1 | show | log | run | — | trace | — |
| R2 | show | log | run | — | trace | — |
| R3 | show | log | run | — | trace | — |
| R4 | show | log | run | ping | trace | — |
| R5 | show | log | run | ping | trace | — |
| R6 | show | log | run | — | trace | — |
STEP 1: remove network 192.168.99.0/24 from R1
| Router | show output | syslog | running-config | ping | trace | Committed config |
|---|---|---|---|---|---|---|
| R1 | show | log | run | — | trace | commit |
| R2 | show | log | run | — | trace | — |
| R3 | show | log | run | — | trace | — |
| R4 | show | log | run | ping | trace | — |
| R5 | show | log | run | ping | trace | — |
| R6 | show | log | run | — | trace | — |
STEP 2: restore network on R1
| Router | show output | syslog | running-config | ping | trace | Committed config |
|---|---|---|---|---|---|---|
| R1 | show | log | run | — | trace | commit |
| R2 | show | log | run | — | trace | — |
| R3 | show | log | run | — | trace | — |
| R4 | show | log | run | ping | trace | — |
| R5 | show | log | run | ping | trace | — |
| R6 | show | log | run | — | trace | — |
STEP 3: apply EBGP-OUT-ALL on R3 (level every route to IGP)
| Router | show output | syslog | running-config | ping | trace | Committed config |
|---|---|---|---|---|---|---|
| R1 | show | log | run | — | trace | — |
| R2 | show | log | run | — | trace | — |
| R3 | show | log | run | — | trace | commit |
| R4 | show | log | run | ping | trace | — |
| R5 | show | log | run | ping | trace | — |
| R6 | show | log | run | — | trace | — |
STEP 4: apply EBGP-OUT-LOCAL on R3 (^$ only, final state)
| Router | show output | syslog | running-config | ping | trace | Committed config |
|---|---|---|---|---|---|---|
| R1 | show | log | run | — | trace | — |
| R2 | show | log | run | — | trace | — |
| R3 | show | log | run | — | trace | commit |
| R4 | show | log | run | ping | trace | — |
| R5 | show | log | run | ping | trace | — |
| R6 | show | log | run | — | trace | — |
Packet captures were taken per STEP.
| STEP | R3 - R4 | R4 - R5 | R1 - R6 |
|---|---|---|---|
| 0 | pcap | pcap | pcap |
| 1 | pcap | pcap | pcap |
| 2 | pcap | pcap | pcap |
| 3 | pcap | pcap | pcap |
| 4 | pcap | pcap | pcap |
References
| Source | Title | Summary |
|---|---|---|
| RFC 4271 | A Border Gateway Protocol 4 (BGP-4) | Section 4.3 defines the three ORIGIN values, 5.1.1 how it is generated and that it should not be changed, 9.1.2.2 the comparison in best path selection and 9.2.2.2 the value for aggregates. |
| RFC 904 | Exterior Gateway Protocol Formal Specification | The protocol the EGP value refers to; no longer used. |
| IANA | Border Gateway Protocol (BGP) Parameters | Registry of numbers used in BGP, including path attribute type codes. |
Related Articles
- BGP (Border Gateway Protocol)
- BGP Messages
- BGP Neighbor States
- iBGP vs. eBGP
- BGP next-hop-self
- BGP Route Reflector
- BGP Path Attributes and Best Path Selection
- BGP ORIGIN Attribute
- BGP AS_PATH Attribute
- BGP NEXT_HOP Attribute
- BGP LOCAL_PREF Attribute
- BGP MED Attribute
- BGP WEIGHT Attribute
- BGP COMMUNITY Attribute
- BGP Route Aggregation (aggregate-address)
- MP-BGP (Multiprotocol Extensions)
- BGP Extended Community
- BGP Multipath (maximum-paths)
- BGP Four-Octet AS Numbers (RFC 6793)
- Removing Private AS Numbers in BGP (remove-private-AS)
- BGP ADD-PATH (RFC 7911)
- BGP PIC (Prefix Independent Convergence)
- BGP Best External (advertising a non-best external route)