• In the previous lesson, locally originated routes and the shortest settled the choice. When those tie too, reads the Origin code.

    After , , locally originated routes, and length, evaluates the next attribute:

    Lowest Origin code wins.

    The Origin attribute tells how a prefix entered the table in the first place. When all higher attributes are equal, Origin becomes the tiebreaker.

    What is Origin?

    Origin is a well-known mandatory attribute carried in every update.
    It can take only three values:

    BGP Origin types IGP EGP Incomplete preference order best to worst

    Figure 1 – Origin Types

    • IGP (i) — The prefix was injected into using a network statement.

    • EGP (e) — The prefix came from the legacy EGP protocol. You will almost never see this in production.

    • Incomplete (?) — The prefix was injected through redistribution from another protocol (, , static, connected).

    When compares two paths with the same , , Originate, and , it picks the one with the lowest Origin code:

    R1# show bgp ipv4 unicast
    BGP table version is 5, local router ID is 10.0.23.1
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
                  x best-external, a additional-path, c RIB-compressed,
                  t secondary path,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found
    
         Network          Next Hop            Metric LocPrf Weight Path
     *>  10.0.34.0/30     10.0.23.2                0             0 300 i
     * i 10.0.34.0/30     10.0.24.2                0    100      0 300 ?

    IGP (i) is preferred over EGP (e), which is preferred over Incomplete (?).
    You read the Origin in the last column of the table, right after the .

    Answer the question below

    A prefix injected into BGP with the redistribute command has which Origin code?

    The Scenario

    The topology below reuses the same setup as the lesson, with one critical difference in how each side advertises the prefix 10.0.34.0/30.

    BGP Origin comparison network statement Origin i versus redistribute connected Origin question mark

    Figure 2 – Two paths with different Origin types

    R3 advertises the prefix toward R1 using a network statement, so the prefix arrives with Origin i.
    R4 advertises the same prefix toward R2 using redistribute connected, so the prefix arrives with Origin ?.

    From R1's point of view, both paths share:

    • Equal (0)

    • Equal (100)

    • Equal (300, length 1)

    The only attribute that differs is the Origin.

    Verifying the Result

    Check the table on R1:

    R1# show bgp ipv4 unicast
    BGP table version is 5, local router ID is 10.0.23.1
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
                  x best-external, a additional-path, c RIB-compressed,
                  t secondary path,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found
    
         Network          Next Hop            Metric LocPrf Weight Path
     *>  10.0.34.0/30     10.0.23.2                0             0 300 i
     * i 10.0.34.0/30     10.0.24.2                0    100      0 300 ?

    Two paths exist for 10.0.34.0/30:

    • The path via R3 carries Origin i (IGP)

    • The path via R2 carries Origin ? (Incomplete)

    The best-path marker *> is on the path with Origin i, because IGP is preferred over Incomplete when every higher attribute is equal.

    BGP lowest Origin wins traffic flow through Link 1 with Origin i path selection

    Figure 3 – Lowest Origin wins

    R1 forwards traffic for 10.0.34.0/30 through Link 1.

    In real-world networks, the Origin tiebreaker rarely fires on its own.
    By the time reaches Origin, , , and have usually already picked a winner.
    But on the CCNP ENCOR exam, you must know the order of preference.

    Answer the question below

    Which Origin value is preferred: i, e, or ?