BGP Attribute Origin


Scenario:

You are a gunslinger living in Arizona and also a network engineer for the town network. To make sure your town has connectivity with other towns you have configured the town router with BGP. Another town is using AS 1 and they are advertising a network to you. Unfortunately they have misconfigured their network so you are sending traffic to the wrong router. Your own router is an old model from 1873 and doesn’t allow many changes…let’s see if you can configure AS 1 to solve your problem.

Goal:

  • All IP addresses have been preconfigured for you as specified in the topology picture.
  • Configure EBGP between router Lonergan and Colorado.
  • Configure EBGP between router Claiborne and Colorado.
  • Advertise the 13.13.13.0 /24 network on router Lonergan and Claiborne.
  • Make sure router Colorado sends traffic to 13.13.13.0 /24 to router Claiborne, you are only allowed to use the origin attribute.

It took me 1000s of hours reading books and doing labs, making mistakes over and over again until I mastered all the routing protocols for CCNP.

Would you like to be a master of routing too? In a short time without having to read 900 page books or google the answers to your questions and browsing through forums?

I collected all my knowledge and created a single ebook for you that has everything you need to know to become a master of routing.

You will learn all the secrets about BGP attributes and more.

Does this sound interesting to you? Take a look here and let me show you how to Master CCNP ROUTE

IOS:

c3640-jk9o3s-mz.124-16.bin

Topology:

alt

Video Solution:

Configuration Files

You need to register to download the GNS3 topology file. (Registration is free!)

Once you are logged in you will find the configuration files right here.

Opt In Image
Do you want your CCNA or CCNP Certificate?

The How to Master series helps you to understand complex topics like spanning-tree, VLANs, trunks, OSPF, EIGRP, BGP and more.

Written by René Molenaar - CCIE #41726

You May Also Like

About the Author: Rene Molenaar

René - CCIE #41726 is the creator of GNS3Vault.com where he shares CCNA, CCNP and CCIE R&S labs. He also blogs about networking on http://networklessons.com

14 Comments

  1. Done,

    * Lonergan advertises the network 13.13.13.0/24 using the command “redistribute” so the attribute ORIGIN is INCOMPLETE.

    * Claiborne advertises the network 13.13.13.0/24 using the command “network” so the attribute ORIGIN is IGP.

    * As we know about ORIGIN, IGP is prefered over INCOMPLETE; pleae check the next BGP tables:

    COLORADO#show ip bgp
    BGP table version is 8, local router ID is 192.168.23.1
    Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
    r RIB-failure, S Stale
    Origin codes: i – IGP, e – EGP, ? – incomplete

    Network Next Hop Metric LocPrf Weight Path
    *> 13.13.13.0/24 192.168.23.2 0 0 1 i
    * 192.168.12.2 0 0 1 ?

    COLORADO#show ip bgp 13.13.13.0/24
    BGP routing table entry for 13.13.13.0/24, version 8
    Paths: (2 available, best #1, table Default-IP-Routing-Table)
    Flag: 0x820
    Advertised to update-groups:
    1
    1
    192.168.23.2 from 192.168.23.2 (13.13.13.1)
    Origin IGP, metric 0, localpref 100, valid, external, best
    1
    192.168.12.2 from 192.168.12.2 (13.13.13.1)
    Origin incomplete, metric 0, localpref 100, valid, external

  2. I am sorry Jaris your way works but the lab does not tell to redistribute the network into BGP.

    The Key to this lab is to use the origin command.

    router bgp 2
    no synchronization
    bgp log-neighbor-changes
    neighbor 192.168.12.1 remote-as 1
    neighbor 192.168.12.1 route-map pass in
    neighbor 192.168.23.3 remote-as 1
    neighbor 192.168.23.3 route-map test in
    no auto-summary

    ip forward-protocol nd
    access-list 1 permit 13.13.13.0 0.0.0.255

    route-map pass permit 10
    match ip address 1
    set origin egp 1

    route-map pass permit 20

    route-map test permit 10
    match ip address 1
    set origin igp

    route-map test permit 20

    Yes the “test” was over board.
    Jarvis was correct “As we know about ORIGIN, IGP is prefered over INCOMPLETE; pleae check the next BGP tables:”

    Again the concept to this lab was to use the “origin”

  3. Colorado#sh ip bgp
    BGP table version is 2, local router ID is 192.168.23.2
    Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
    r RIB-failure, S Stale
    Origin codes: i – IGP, e – EGP, ? – incomplete

    Network Next Hop Metric LocPrf Weight Path
    * 13.13.13.0/24 192.168.12.1 0 0 1 e
    *> 192.168.23.3 0 0 1 i

  4. Hi Angelo, your way also works, but in the goals list there’s any rule about using ORIGIN/REDISTRIBUTE/NETWORK commands, so each person can solve this lab using different ways; you have yours, I have mine and the others will have theirs.

    Anyway why did you choose the parameter EGP instead of INCOMPLETE??? You should know that BGP replaced to EGP many years ago therefore the EGP parameter into the ORIGIN attribute is deprecated.

    The author is the only person whose should choose the best solution because he already has the answer.

    Regards my friend!!!

  5. Hello Jarvis
    “Anyway why did you choose the parameter EGP instead of INCOMPLETE??? You should know that BGP replaced to EGP many years ago therefore the EGP parameter into the ORIGIN attribute is deprecated.”

    Your correct with EGP that it is no longer used. I just wanted to apply it to a route-map but it always chose 192.169.12.0 network. I did understand why. So I used ‘set orgin egp’ and it then the best path moved to 192.168.23.0 network. Next time I am going to do it your way.

    I wonder if I did this on the exam if I was wrong?

    Anyways thanks.
    Angelo

  6. Hello Angelo & Jaris,

    You are both correct with your solution. BGP will prefer IGP over incomplete routes so that’s how you can influence which next-hop the router will choose.

    The redistribute command will make a network show up as incomplete, the network command will make it show up as IGP.

    [b]Origin Code (IGP < EGP < Incomplete)[/b] There is more than one way that leads to rome ;D good job though guys! Rene

    1. I solved the lab same way as Angelo did. The only comment i wanna make is we don’t need two route-maps one is good enough because by default both routers Lonergan and claiborne advertising a 13 network with origin of igp so we just need to set ORIGIN incomplete for route coming from LONERGAN router.

      Colorado#sh ip bgp
      BGP table version is 4, local router ID is 192.168.23.2
      Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
      r RIB-failure, S Stale
      Origin codes: i – IGP, e – EGP, ? – incomplete

      Network Next Hop Metric LocPrf Weight Path
      *> 13.13.13.0/24 192.168.23.3 0 0 1 i
      * 192.168.12.1 0 0 1 ?

  7. And what about this one?
    I think that is the easiest but not completely sure if it’s ok.

    Can somebody help me? Thanks

    ROUTER LONERGAN

    router bgp 1
    no synchronization
    bgp log-neighbor-changes
    network 13.13.13.0 mask 255.255.255.0 route-map bgp
    neighbor 192.168.12.2 remote-as 2
    no auto-summary
    !
    no ip http server
    no ip http secure-server
    !
    !
    !
    !
    route-map bgp permit 10
    set origin incomplete

  8. Network Next Hop Metric LocPrf Weight Path
    *> 13.13.13.0/24 192.168.23.2 0 0 1 i
    * 192.168.12.1 0 0 1 ?
    r> 192.168.12.0 192.168.12.1 0 0 1 ?

    please why the router adds 192.168.12.0 as a rib failure route?

Comments are closed.