Day 17 — BGP ORIGIN: IGP, EGP and Incomplete Without the Common Misconceptions

Learning objective

Interpret the ORIGIN attribute correctly, explain the preference order IGP < EGP < incomplete in Cisco best-path selection, and troubleshoot a policy that changes ORIGIN without confusing it with route ownership or the IGP protocol running in the network.


BGP ORIGIN: IGP, EGP and Incomplete Without the Common Misconceptions
BGP ORIGIN: IGP, EGP and Incomplete Without the Common Misconceptions



1. Opening — the word “origin” causes more confusion than the attribute

BGP's ORIGIN attribute has three values:

  • IGP
  • EGP
  • INCOMPLETE

Cisco commonly displays them as:

  • i
  • e
  • ?

The names are historical. They do not mean “this prefix is currently carried by OSPF,” “this prefix belongs to the AS shown here,” or “BGP does not know the AS that owns it.”

ORIGIN indicates how the route information was introduced into BGP according to the attribute semantics. In Cisco configurations, a prefix originated with a BGP network statement commonly appears with ORIGIN IGP, while redistribution commonly creates ORIGIN incomplete unless policy changes it.


2. ORIGIN classification

RFC 4271 defines ORIGIN as a well-known mandatory attribute with three values.

IGP

Indicates the NLRI was learned through an interior routing mechanism in the original BGP semantics. In modern Cisco operations, network-originated routes are typically displayed with i.

EGP

Represents the historical Exterior Gateway Protocol origin value. The old EGP protocol is obsolete in modern networks, but the ORIGIN value remains defined.

INCOMPLETE

Indicates the origin cannot be represented as IGP or EGP under the attribute semantics. Redistributed routes commonly appear as ? on Cisco.


3. Best-path preference

After earlier Cisco selection criteria such as Weight, LOCAL_PREF, local origination and AS_PATH length, Cisco prefers the route with the lowest ORIGIN type in this order:

IGP (i)  preferred over  EGP (e)  preferred over  incomplete (?)

Do not translate that into “IGP routes are always preferred over redistributed routes.” The comparison applies at this stage only if all higher-priority criteria have tied and the routes are eligible.


4. ORIGIN is not the same as ORIGINATOR_ID

These are completely different attributes.

  • ORIGIN is the base BGP attribute described here.
  • ORIGINATOR_ID is a route-reflection attribute used to prevent reflection loops.

The route-reflector module will treat ORIGINATOR_ID separately.


5. Scenario — Delta Origin-Code Tie Break

Illustrative lab — not a real incident.

Topology

           Service S AS65100
              /          \
             /            \
       P1 AS65010      P2 AS65020
             \            /
              \          /
             Enterprise E
                AS65050

S originates 192.0.2.128/25 and both providers carry it to E.

P1 advertises the path without changing ORIGIN, so E sees an IGP-origin code.

P2 uses an outbound route map toward E:

set origin incomplete

The AS_PATH lengths are intentionally equal:

  • P1: 65010 65100 i
  • P2: 65020 65100 ?

If earlier attributes tie, E should prefer the IGP-origin path via P1.


6. Prerequisites

  • Four-router topology similar to Day 16.
  • Equal Weight and LOCAL_PREF at E.
  • Equal AS_PATH length.
  • Reachable next hops.
  • No MED difference used to decide earlier/later unexpectedly.

The lab isolates ORIGIN by controlling other variables.


7. Topic-specific configuration excerpt

P2 policy toward E

route-map MARK-INCOMPLETE permit 10
 set origin incomplete
!
router bgp 65020
 address-family ipv4 unicast
  neighbor 203.0.113.6 route-map MARK-INCOMPLETE out

P1 has no ORIGIN-changing policy toward E.

The full topology configuration is stored in the companion lab directory.


8. Verification before modification

At E:

show ip bgp 192.0.2.128
show ip route 192.0.2.128 255.255.255.128

Identify the Path field and origin code at the end of each path.

Expected conceptual view:

65010 65100 i
65020 65100 ?

The exact formatting depends on the IOS XE image; do not fabricate a full command output.


9. Controlled modification

Change P2's route map from incomplete to IGP for the lab comparison:

route-map MARK-INCOMPLETE permit 10
 set origin igp

After a safe outbound refresh, both paths should have equal ORIGIN. E then proceeds to later best-path criteria.

This demonstrates that ORIGIN is one comparison step, not an absolute winner independent of the rest of the algorithm.


10. Fault injection

Illustrative lab — not a real incident.

Lab name

Delta Origin Rewrite

Fault

A broad outbound route map on P1 accidentally marks all advertisements as incomplete:

route-map BROAD-ORIGIN permit 10
 set origin incomplete

If P2 continues advertising IGP origin and earlier attributes tie, E can switch to P2.

Why this is subtle

The prefix, AS_PATH and next hop all look legitimate. The only policy difference is the one-character origin code at the end of the path display.


11. Troubleshooting sequence

  1. Confirm the candidate paths and best path.
  2. Check Weight and LOCAL_PREF.
  3. Compare AS_PATH length.
  4. Read the ORIGIN code at the end of each path.
  5. Determine whether the value is natural from route origination or modified by policy.
  6. Inspect set origin route-map clauses.
  7. Confirm the route-map direction and scope.
  8. Do not confuse ORIGIN with route ownership or ORIGINATOR_ID.
  9. Correct the smallest unintended rewrite.
  10. Refresh safely and confirm the path-selection result.

12. Root cause and correction

Root cause

An outbound policy rewrote ORIGIN to incomplete on the path that was intended to remain preferred.

Correction

Remove the unnecessary set origin statement or constrain it to the prefixes that genuinely require that policy.

Why it works

With the artificial ORIGIN disadvantage removed, the route can tie or win according to the remaining best-path criteria.


13. Post-fix verification

show ip bgp 192.0.2.128
show route-map
show running-config | section route-map

If the best path changes, verify the RIB and data plane as well:

show ip route 192.0.2.128 255.255.255.128

14. Rollback

Remove the route-map from the neighbor or restore the previous set origin value, depending on the intended policy.

Example:

router bgp 65010
 address-family ipv4 unicast
  no neighbor <E-peer> route-map BROAD-ORIGIN out

Preserve the original route display so the origin-code difference remains documented.


15. Production lessons

Terminology lesson

ORIGIN is historical BGP metadata; it is not a statement of legal prefix ownership or current IGP reachability.

Selection lesson

IGP origin is preferred over EGP, which is preferred over incomplete—but only after earlier criteria tie.

Troubleshooting lesson

The tiny i, e or ? at the end of a path can explain a best-path decision when more obvious attributes are equal.

Policy lesson

Avoid rewriting ORIGIN without a clear, documented reason. LOCAL_PREF and communities are often clearer tools for policy expression.

Documentation lesson

Never confuse ORIGIN with ORIGINATOR_ID; their names overlap but their purposes do not.


15A. Four common ORIGIN misconceptions

Misconception 1 — i means OSPF or IS-IS

It does not. The ORIGIN code is BGP metadata. A route can display i even when no OSPF adjacency exists anywhere near the originating router.

Misconception 2 — ? means the prefix owner is unknown

It does not. ? represents ORIGIN incomplete. Ownership and authorization are separate questions handled through routing policy, registry data and mechanisms such as RPKI—not the ORIGIN code.

Misconception 3 — ORIGIN tells you where the route entered your AS

It does not. For that operational question, inspect the BGP peer, next hop, AS_PATH, communities and route-policy evidence.

Misconception 4 — ORIGIN should be rewritten to make a path primary

It can influence best-path selection, but it is usually a poor first choice for expressing enterprise policy because LOCAL_PREF is clearer and evaluated earlier. Rewriting ORIGIN can also make troubleshooting harder by obscuring how the route was originally introduced.


15B. When set origin is useful in a lab

set origin is valuable for education because it isolates the ORIGIN comparison without requiring multiple route-injection mechanisms. In production, use it only when a documented interconnection or migration design calls for it.

Before deploying a route map that changes ORIGIN, record:

  • which prefixes match;
  • whether the route map is inbound or outbound;
  • whether other route-map clauses continue processing;
  • the intended best-path effect;
  • which routers can observe the rewritten value;
  • how the change will be rolled back.

That discipline prevents a one-line policy change from becoming an invisible tie-breaker across a large prefix set.


15C. Observability: how to prove ORIGIN actually caused the decision

When investigating a production path-selection question, do not stop at seeing i on the best path and ? on an alternate path. Prove that all earlier criteria tied.

A defensible evidence chain is:

1. Both paths valid and next hops reachable
2. Weight equal
3. LOCAL_PREF equal
4. Neither path wins on local origination
5. AS_PATH length equal
6. ORIGIN differs
7. Selected path matches the documented ORIGIN preference

If any earlier item differs, ORIGIN may be visible but not causative.

This distinction matters for incident reports. Saying “the route won because of ORIGIN” is a technical claim that should be supported by the full comparison, not merely by noticing different origin codes after the fact.

For automated validation, collect structured path attributes before and after the change and compare only the fields relevant to the intended experiment. That approach will be developed further in the automation module.


15D. Why the EGP origin code still exists

The e value is easy to misread because modern engineers rarely operate the historical Exterior Gateway Protocol that gave the value its name. BGP retained the three-value ORIGIN field for protocol compatibility and path semantics even as EGP itself disappeared from ordinary production use.

That means a modern route displaying e should trigger a policy investigation rather than an assumption that an ancient EGP session is running somewhere. It may have been created by explicit policy, migrated configuration, imported routing information or a lab exercise.

The operational response is the same evidence-based method used throughout this series: identify the neighbor that supplied the path, inspect the full set of attributes, trace any route map that can rewrite ORIGIN, and compare the observed value against the intended policy. Historical names are not substitutes for current-state evidence.


16. Knowledge check

Q1

Does ORIGIN i mean the route is currently learned through OSPF?

Answer: No. It is the BGP ORIGIN attribute value. On Cisco, routes introduced with a BGP network statement commonly display i, regardless of which IGP may exist elsewhere.

Q2

Which ORIGIN value is preferred if all earlier criteria tie?

Answer: IGP is preferred over EGP, and EGP is preferred over incomplete.

Q3

Is ORIGIN the same as ORIGINATOR_ID?

Answer: No. ORIGIN is a base path attribute; ORIGINATOR_ID is a route-reflection loop-prevention attribute.


17. Sources

  1. RFC 4271 — *A Border Gateway Protocol 4 (BGP-4)* — ORIGIN attribute values and Decision Process.
  2. Cisco — *IP Routing Configuration Guide, Cisco IOS XE 17.18.x: Configuring BGP* — origin type in the Cisco best-path sequence.
  3. Cisco — *Connecting to a Service Provider Using External BGP, IOS XE 17.x* — route-map policy and BGP output origin codes.
  4. Cisco — route-map command references for set origin.

Accessed: 2026-08-11.


Day 15 — Locally Originated BGP Paths: The Best-Path Step Hidden Behind Weight

Learning objective

Explain the Cisco best-path preference for a locally originated path, distinguish that decision step from the commonly observed Weight 32768 on local routes, and diagnose an accidental local origin that creates a blackhole.


Locally Originated BGP Paths: The Best-Path Step Hidden Behind Weight
Locally Originated BGP Paths: The Best-Path Step Hidden Behind Weight



1. Opening — “local wins” is more nuanced than it looks

Cisco's best-path documentation includes a step that prefers a path originated by BGP on the local router. Engineers often learn this as a simple rule: “local routes win.”

But Cisco also commonly assigns Weight 32768 to locally originated routes, while ordinary received paths have Weight 0. Because Weight is evaluated earlier, many labs never actually reach the explicit “locally originated” comparison step—the local route has already won on Weight.

Day 15 removes that ambiguity.

We deliberately equalize Weight so we can see why local origination is a distinct selection concept. Then we turn the same behavior into a troubleshooting scenario: an accidental network statement backed by a Null0 route causes the router to prefer a local path when the engineering intent was to use an external route.


2. What Cisco means by locally originated

Cisco best-path guidance identifies paths sourced by local BGP configuration such as network or redistribution as locally originated. Cisco also documents nuance around locally generated aggregates.

The key design point is not that local origination is “more truthful.” It simply reflects the local router's policy assertion that it originates the NLRI into BGP.

That assertion can be correct—or dangerously wrong.

A network statement does not verify business ownership, reachability of an application, or whether advertising the prefix is safe. It requires the configured route condition to be satisfied in the local routing table, as covered on Day 10.


3. Why Weight can hide this step

A typical local BGP route on Cisco appears with Weight 32768. A received route normally starts at Weight 0.

Therefore a table may look like this conceptually:

Local path      Weight 32768
Received path   Weight     0

The local path wins at the Weight step, before the algorithm reaches the separate local-origination comparison.

To isolate the next step, our lab assigns Weight 32768 to the received path too. LOCAL_PREF remains equal. Now the router must continue to the local-origination comparison.

This is a teaching technique, not a recommended production policy.


4. Scenario — Quarry Accidental Origin

Illustrative lab — not a real incident.

Topology

Service / upstream R1               Edge R2
      AS65010                       AS65020
203.0.113.0/24 ---- eBGP ---- 192.0.2.2
                                  |
                           local static Null0
                           203.0.113.0/24
                                  +
                           BGP network statement

R2 receives 203.0.113.0/24 from R1. R2 also has a local static route to Null0 and a matching BGP network statement.

For the experiment, the received route is assigned Weight 32768 so Weight ties.

Objective

  • Prove both BGP paths exist.
  • Equalize Weight.
  • Observe that the locally originated path remains preferred.
  • Treat the local origin as an injected fault.
  • Remove the unintended local origination and verify the eBGP path becomes usable.

5. Prerequisites

  • Two IOS XE-capable nodes.
  • Direct eBGP.
  • 203.0.113.0/24 originated by R1 for the lab.
  • Console access to R2.
  • Understanding that Null0 provides control-plane reachability for origination but discards packets sent to it.

6. Baseline configuration

R1 — AS65010

hostname R1
interface GigabitEthernet0/0
 ip address 192.0.2.1 255.255.255.252
 no shutdown
!
ip route 203.0.113.0 255.255.255.0 Null0
!
router bgp 65010
 bgp router-id 10.10.10.1
 neighbor 192.0.2.2 remote-as 65020
 address-family ipv4 unicast
  network 203.0.113.0 mask 255.255.255.0
  neighbor 192.0.2.2 activate
 exit-address-family

R2 — AS65020

hostname R2
interface GigabitEthernet0/0
 ip address 192.0.2.2 255.255.255.252
 no shutdown
!
ip route 203.0.113.0 255.255.255.0 Null0
!
route-map EQUALIZE-WEIGHT permit 10
 set weight 32768
!
router bgp 65020
 bgp router-id 10.20.20.2
 neighbor 192.0.2.1 remote-as 65010
 address-family ipv4 unicast
  network 203.0.113.0 mask 255.255.255.0
  neighbor 192.0.2.1 activate
  neighbor 192.0.2.1 route-map EQUALIZE-WEIGHT in
 exit-address-family

This configuration is intentionally unsafe for the prefix: it creates an alternate local origin to Null0.


7. Verification before modification

On R2:

show ip bgp 203.0.113.0
show ip route 203.0.113.0
show route-map EQUALIZE-WEIGHT
show running-config | section router bgp

Evidence to capture:

  • one path is locally originated;
  • one path is learned from 192.0.2.1;
  • both are assigned equal Weight for this controlled experiment;
  • LOCAL_PREF does not create a difference;
  • the local path remains preferred.

Do not fabricate exact output flags. Record them from the selected IOS XE image if the lab is executed.


8. Why the locally originated path matters operationally

A local origin is a policy statement: “this router/AS can originate this NLRI.”

If that statement is backed only by a discard route and no valid forwarding path to the real service, traffic can be attracted and discarded.

This is why Day 10 treated route origination as an export boundary rather than a mere syntax exercise.

Best-path selection magnifies the risk: once a local origin exists, it can outrank an otherwise healthy external path.


9. Fault injection

Illustrative lab — not a real incident.

Lab name

Quarry Accidental Origin

Fault

The network 203.0.113.0 mask 255.255.255.0 statement and supporting Null0 route are present on R2 even though R2 is not supposed to originate the service prefix.

Symptoms

  • eBGP to R1 is Established;
  • R2 receives a valid external path;
  • R2 still selects the local path;
  • forwarding toward the prefix follows the local RIB entry to Null0 and fails.

Misdiagnosis to avoid

“BGP is ignoring the provider route.”

BGP is not ignoring it. It is selecting another eligible path according to policy and implementation rules.


10. Troubleshooting sequence

  1. Confirm the service prefix.
  2. Verify R1 advertises the prefix.
  3. Verify R2 receives the eBGP path.
  4. Inspect all BGP paths, not only the best path.
  5. Check Weight and LOCAL_PREF.
  6. Identify the locally originated path and its source.
  7. Inspect network, redistribution and aggregate configuration.
  8. Inspect the RIB entry satisfying the local origin.
  9. Determine whether the local route represents real service reachability or only Null0.
  10. Remove the smallest incorrect origin source and verify selection again.

11. Controlled correction

If R2 should not originate the prefix:

configure terminal
router bgp 65020
 address-family ipv4 unicast
  no network 203.0.113.0 mask 255.255.255.0
 exit-address-family
no ip route 203.0.113.0 255.255.255.0 Null0
end

If the static route is required for another valid purpose, do not remove it blindly; remove only the BGP origination statement or redesign the route source.

Expected result

The local BGP path disappears. The received eBGP path remains and can become best if it is otherwise eligible.


12. Root cause and correction

Root cause

R2 was configured to originate the same prefix that it was supposed to learn externally. The local origin was supported by a discard route, creating a blackhole.

Correction

Remove the unintended BGP origin and, where appropriate, the discard route that existed only to satisfy it.

Why it works

Once the local path no longer exists, the received path can proceed through best-path selection without competing against a local origin.


13. Post-fix verification

show ip bgp 203.0.113.0
show ip route 203.0.113.0
show ip bgp neighbors 192.0.2.1 routes

Confirm:

  • only the intended external path remains;
  • next hop is reachable;
  • the route is installed according to normal RIB rules;
  • no local advertisement of the prefix remains unless explicitly intended.

14. Rollback

Only rollback if R2 is genuinely supposed to originate the service prefix:

ip route 203.0.113.0 255.255.255.0 Null0
router bgp 65020
 address-family ipv4 unicast
  network 203.0.113.0 mask 255.255.255.0

Before restoring, verify that the discard route is an intentional aggregate/origination safety mechanism rather than the original cause of service loss.


15. Production lessons

Selection lesson

Do not assume the observed “local wins” behavior is only the explicit local-origination step; default Cisco Weight often decides first.

Origination lesson

A BGP origin is a policy assertion, not proof that the application exists.

Troubleshooting lesson

When a received route looks healthy but is not selected, inspect all local route-generation mechanisms before manipulating external attributes.

Change-management lesson

network, redistribution and aggregate changes can affect path selection as well as advertisement scope.

Safety lesson

Null0 routes are useful in controlled aggregation/origination designs but become dangerous when they outlive the policy that justified them.


15A. Local network, redistribution and aggregate nuance

Cisco's best-path documentation distinguishes among forms of local origination. Routes generated by network or redistribution are locally sourced, while aggregate routes have their own local-generation behavior. Cisco support guidance further notes that local paths sourced by network or redistribution can be preferred over a locally generated aggregate when the comparison reaches that local-path logic.

This matters when a router has multiple local representations of the same destination or overlapping aggregate/specific policy. The correct troubleshooting question is not only “is the route local?” but also “how was this local BGP path created?”

Useful evidence includes:

show running-config | section router bgp
show ip bgp <prefix>
show ip route <prefix>
show route-map

Then trace the path source to one of these mechanisms:

  • exact network origination;
  • redistribution;
  • aggregate generation;
  • policy-driven conditional origination.

Later posts will treat aggregation and conditional advertisement at greater scale. For this day, the lesson is that local generation is not a single undifferentiated state.


15B. Why accidental local origination is a change-control problem

An accidental local origin can survive long after the engineer who created it has forgotten why the supporting static route exists. That is especially common with Null0 routes used to satisfy aggregate or advertisement requirements.

A production change review should therefore pair every local BGP origin with:

  • an owner;
  • a business reason;
  • the exact route that satisfies origination;
  • the expected forwarding behavior;
  • a monitoring signal for loss of the real service behind the prefix;
  • a rollback condition.

The route should never be treated as self-justifying merely because BGP accepts it.


16. Knowledge check

Q1

Why did the lab set the received route's Weight to 32768?

Answer: To tie the normal local-route Weight and expose the separate locally originated best-path comparison instead of letting Weight decide first.

Q2

Does a network statement prove that hosts inside the prefix are reachable?

Answer: No. It originates the NLRI when the required local routing condition is satisfied; it does not validate application reachability or prefix ownership.

Q3

What is the smallest correction if the static route is still needed but BGP must not originate the prefix?

Answer: Remove the BGP network statement while preserving the static route if that static route has a separate valid purpose.


17. Sources

  1. RFC 4271 — *A Border Gateway Protocol 4 (BGP-4)* — Decision Process framework.
  2. Cisco — *IP Routing Configuration Guide, Cisco IOS XE 17.18.x: Configuring BGP* — Cisco best-path ordering and local-path preference.
  3. Cisco — *Select BGP Best-path Algorithm* — locally originated path behavior and Cisco selection details.
  4. Cisco — *Connecting to a Service Provider Using External BGP, IOS XE 17.x* — local route examples showing Weight 32768 and path display fields.

Accessed: 2026-08-11.


Featured Post

Day 41 — BGP Confederations: Sub-AS Design, External View and Migration

1. Opening Confederations are another way to scale BGP inside a large administrative domain. They divide the domain into member autonomous systems while presenting a single confederation identifier to external peers. They are powerful, but their operational model is more complex than simply 'using private ASNs inside.' The engineering goal is not to memorize another BGP command. It is to understand what information each speaker is allowed to propagate, what path information can be hidden, and what failure domain is created by the chosen control-plane architecture . 2. Concept and standards behavior RFC 5065 defines AS_CONFED_SEQUENCE and AS_CONFED_SET and how member-AS relationships are represented. Confederation external sessions have eBGP-like properties inside the confederation, while the confederation is presented externally as one AS. Modern guidance must also account for the fact that RFC 9774 prohibits new origination of AS_SET/AS_CONFED_SET in ordinary aggregation c...