BGP IBGP/EBGP Local Preference MED


Scenario:

You are working for a company specialized in selling vegetables and fruit and responsible for the whole network. To reduce the risk of losing the connection to the Internet you decided to get another link to your ISP. The first link between Cherry and ISP is an expensive link where you have to pay for every megabyte that is transfered, this link should only be used for backup. The second link between Berry and ISP is cheap and up 24/7. All traffic should be sent using this link.

Goal:

  • All IP addresses are preconfigured as specified in the topology picture.
  • Every router has a loopback interface:
    Kerry: Loopback0: 1.1.1.1 /24
    Cherry: Loopback0: 2.2.2.2 /24
    Berry: Loopback0: 3.3.3.3 /24
  • ISP: Loopback0: 4.4.4.4 /24
  • Configure EIGRP in AS 100.
  • Do not advertise the links between AS100 and AS200 in EIGRP.
  • Configure IBGP within AS100, the source of BGP updates has to be the loopback interface.
  • Configure EBGP between router Cherry and ISP.
  • Configure EBGP between router Berry and ISP.
  • Advertise the loopback interfaces into BGP, do this on all routers.
  • Ensure you have full reachability to all networks.
  • Do a traceroute from router ISP to the 1.1.1.0 network. Which path does it take? Do you know why this path was preferred over the other?
  • You need to make sure that all traffic for AS100 is being sent using the link between router Berry and ISP. You are only allowed to make changes on router Berry or Cherry. (hint: use MED)
  • To conform to the company policy, you need to make sure that all outgoing traffic will be sent using the link between router Berry and ISP. (hint: use Local Preference)
  • Optional: change the BGP setup between Cherry and ISP so the BGP updates are sourced from the loopback interfaces.

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, IBGP, EBGP and more.

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

IOS:

c3640-jk9s-mz.124-16.bin

Topology:

BGP Local Preference MED

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

54 Comments

  1. [quote]”You need to make sure that all traffic for AS100 is being sent using the link between router Berry and ISP. You are only allowed to make changes on router Berry. (hint: use MED)”[/quote]

    It is not possible to only achieve this goal only via Berry. With MED, smaller is better. So configuring a MED on Berry (>0) will only have as result that the ISP will still prefer his route over Cherry. (Since on Cherry the MED is still 0). You need Cherry to acomplish this goal.

  2. Thanks for taking the time to create these labs. They are excellent and not having the answers available just means we have to try a bit harder!

    Cheers
    Michael

  3. i just tried this lab today, and managed to finish it. like the previous poster said, it is not possible to only modify Berry to take the Berry-ISP path for all traffic toward AS100, because the default metric is already 0. I tried to decrease the metric to -1, but it is not possible.

    this is my partial config for Berry.
    router eigrp 10
    network 2.0.0.0
    network 192.168.12.0
    no auto-summary
    !
    router bgp 100
    no synchronization
    bgp log-neighbor-changes
    network 2.2.2.0 mask 255.255.255.0
    network 192.168.12.0
    neighbor 1.1.1.1 remote-as 100
    neighbor 1.1.1.1 update-source Loopback0
    neighbor 192.168.23.3 remote-as 200
    neighbor 192.168.23.3 route-map policy1 in
    neighbor 192.168.23.3 route-map policy2 out
    no auto-summary
    !
    route-map policy1 permit 10
    set local-preference 300
    !
    route-map policy2 permit 10
    set metric -1

    config for Cherry is very similar but for local preference I made it lower (say 150) so that traffic going outbound to AS200 will prefer Berry-ISP path because Berry’s local preference (in AS100) is 300 (can be any value, it’s up to you).

  4. you are right about this. I’m going to change the lab a bit πŸ™‚ But i guess you get the idea…play with the MED will influence the path that it’ll take 8)

    Thanks for the comment!

  5. in my opinion these two routes (from ISP perspective) are pretty equal.

    the comparison process goes below step #8 (N WLLA OMNI) and actually ISP router selects the route which exist longer than another – it means who comes up first wins the competition (for the first time).

    you can reset “the best” route and the another one becomes “the best” because now it exists longer.

    so ISP could select route over Berry as well.

    [quote]
    R3#sh ip bgp 192.168.12.0/24 lo
    BGP table version is 14, local router ID is 3.3.3.3
    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
    * 192.168.12.0 192.168.13.1 0 0 100 i
    *> 192.168.23.2 0 0 100 i
    R3#
    R3#
    R3#clear ip bgp 192.168.23.2
    R3#
    *Mar 1 [b]00:21:59.903[/b]: &#xBG;P-5-ADJCHANGE: neighbor 192.168.23.2 Down User reset
    R3#
    *Mar 1 [b]00:22:01.191[/b]: &#xBG;P-5-ADJCHANGE: neighbor 192.168.23.2 Up
    R3#
    R3#
    R3#sh ip bgp 192.168.12.0/24 lo
    BGP table version is 19, local router ID is 3.3.3.3
    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
    * 192.168.12.0 192.168.23.2 0 0 100 i
    *> 192.168.13.1 0 0 100 i
    R3#[/quote]

  6. lab is awesome, the only error was instead of changing the MED on Berry, change it on Cherry to some high value and leave the MED on Berry alone. By default its 0, and changing the MED on Cherry to any value above 0 will cause the ISP to take the route via Berry now as its the lower MED (0).

    Thanks for the lab.

  7. Hi, I’m not able to open the .net file with GNS3 v0.7.3 it says:
    “*** Error: errors during loading of the topology file, please correct them.”

  8. task #2 “Do not advertise the links between AS100 and AS200 in EIGRP”

    This line gives me the impression that i should also configure eigrp on the ISP with AS200.. is that true? It’s not clear where AS200 is or what i’m supposed to do with it at this point.

  9. Hi Terelle,

    I should have added AS 100 and AS 200 in the picture…The yellow circle is AS 100, the ISP is AS 200.

    When you are connecting to an ISP you are not going to run an IGP with them (think on an Internet scale). That’s what BGP is for.

    You shouldn’t advertise the links in between AS 100 and AS 200 in EIGRP nor send EIGRP updates on them. Configure BGP between the different ASes and exchange routing information with BGP.

    Rene

  10. hi

    I have a question about reachablity of the 4.4.4.4 network from kerry. Why we couldn t reach the network before we advertised the connections in the
    AS 100 via BGP. We have got the necessary routes in the routing table learned via EIGRP before advertised them.
    If it is not enough via learning EIGRP we have just enable it to learn loopbacks?

    I really confused about that.

  11. Hi w2ccip,

    I’m not entirely sure what you mean πŸ™‚

    Within AS 100 we use loopbacks for the IBGP peering. We do this because otherwise a link failure could result in a BGP neighbor going down because the IP address of the physical interface is no longer reachable. We use EIGRP to advertise the loopbacks so we can use those for the BGP peering.

    Network 4.4.4.0/24 is advertised through EBGP from the ISP router to AS 100 and since we run IBGP on every router in AS 100 we have reachability.

  12. πŸ™‚

    i want to say that why we have advertised the 192.168.12.0 and 192.168.13.0 networks. they have already in the routing table via EIGRP. Isnt it enough to advertised with EIGRP?

  13. Hi Muhammed,

    Glad to hear you got it. In short this is what we do:

    – Use an IGP to advertise the loopback interfaces within the AS.
    – Configure IBGP using the loopback interfaces.
    – Configure EBGP between the autonomous systems.

    Good luck with your studying!

    Rene

  14. Hi Rene,
    Can you please enable the option to download the labs in the pdf format.

    1. I think I will, downside is that it will add additional code to the site which makes it slower.

      For the moment I would recommend to use a PDF printer like "cute pdf writer".

  15. Hi,

    I have done the following configurations in four routers tried to do the things in simple way as I am trying to grab these valuable things.

    Please find the configurations of the routers one by one:-

    Kerry Router :-

    interface Loopback0
    ip address 1.1.1.1 255.255.255.0
    !
    interface FastEthernet0/0
    description connected to BERRY
    ip address 192.168.13.1 255.255.255.0
    duplex auto
    speed auto
    !
    interface FastEthernet0/1
    description connected to CHERRY
    ip address 192.168.12.1 255.255.255.0
    duplex auto
    speed auto
    !
    interface Serial1/0
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/1
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/2
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/3
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/4
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/5
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/6
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/7
    no ip address
    shutdown
    serial restart-delay 0
    !
    router eigrp 100
    network 1.0.0.0
    network 192.168.12.0
    network 192.168.13.0
    distance 220 0.0.0.0 255.255.255.255
    no auto-summary
    !
    router bgp 100
    no synchronization
    bgp log-neighbor-changes
    network 1.1.1.0 mask 255.255.255.0
    neighbor 2.2.2.2 remote-as 100
    neighbor 2.2.2.2 update-source Loopback0
    neighbor 3.3.3.3 remote-as 100
    neighbor 3.3.3.3 update-source Loopback0
    no auto-summary
    !
    =============================================
    I changed the AD of EIGRP to 220 as I wanted to show the BGP related paths as AD of IBGP is 200 & that’s why it was showing rib-failure previously. I changed these AD settings with all other routers i.e. Cherry & Berry
    ============================================
    Cherry

    interface Loopback0
    ip address 2.2.2.2 255.255.255.0
    !
    interface FastEthernet0/0
    description connected to BERRY
    ip address 192.168.23.2 255.255.255.0
    duplex auto
    speed auto
    !
    interface FastEthernet0/1
    description connected to KERRY
    ip address 192.168.12.2 255.255.255.0
    duplex auto
    speed auto
    !
    interface Serial1/0
    description connected to ISP
    ip address 192.168.24.2 255.255.255.0
    serial restart-delay 0
    !
    interface Serial1/1
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/2
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/3
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/4
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/5
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/6
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/7
    no ip address
    shutdown
    serial restart-delay 0
    !
    router eigrp 100
    network 2.0.0.0
    network 192.168.12.0
    network 192.168.23.0
    distance 220 0.0.0.0 255.255.255.255
    no auto-summary
    !
    router bgp 100
    no synchronization
    bgp log-neighbor-changes
    network 2.2.2.0 mask 255.255.255.0
    network 192.168.12.0
    network 192.168.23.0
    neighbor 1.1.1.1 remote-as 100
    neighbor 1.1.1.1 update-source Loopback0
    neighbor 1.1.1.1 next-hop-self
    neighbor 3.3.3.3 remote-as 100
    neighbor 3.3.3.3 update-source Loopback0
    neighbor 4.4.4.4 remote-as 200
    neighbor 4.4.4.4 ebgp-multihop 2
    neighbor 4.4.4.4 update-source Loopback0
    neighbor 4.4.4.4 route-map MED out
    no auto-summary
    !
    ip classless
    ip route 4.4.4.4 255.255.255.255 192.168.24.4
    no ip http server
    no ip http secure-server
    !
    !
    !
    route-map MED permit 1
    set metric 150

    ===============================================
    Berry

    interface Loopback0
    ip address 3.3.3.3 255.255.255.0
    !
    interface FastEthernet0/0
    description connected to CHERRY
    ip address 192.168.23.3 255.255.255.0
    duplex auto
    speed auto
    !
    interface FastEthernet0/1
    description connected to KERRY
    ip address 192.168.13.3 255.255.255.0
    duplex auto
    speed auto
    !
    interface Serial1/0
    description connected to ISP
    ip address 192.168.34.3 255.255.255.0
    serial restart-delay 0
    !
    interface Serial1/1
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/2
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/3
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/4
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/5
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/6
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/7
    no ip address
    shutdown
    serial restart-delay 0
    !
    router eigrp 100
    network 3.0.0.0
    network 192.168.13.0
    network 192.168.23.0
    distance 220 0.0.0.0 255.255.255.255
    no auto-summary
    !
    router bgp 100
    no synchronization
    bgp log-neighbor-changes
    network 3.3.3.0 mask 255.255.255.0
    network 192.168.13.0
    network 192.168.23.0
    neighbor 1.1.1.1 remote-as 100
    neighbor 1.1.1.1 update-source Loopback0
    neighbor 1.1.1.1 next-hop-self
    neighbor 2.2.2.2 remote-as 100
    neighbor 2.2.2.2 update-source Loopback0
    neighbor 4.4.4.4 remote-as 200
    neighbor 4.4.4.4 ebgp-multihop 2
    neighbor 4.4.4.4 update-source Loopback0
    neighbor 4.4.4.4 route-map MED out
    no auto-summary
    !
    ip classless
    ip route 4.4.4.4 255.255.255.255 192.168.34.4
    no ip http server
    no ip http secure-server
    !
    !
    !
    route-map MED permit 1
    set metric 50
    ==============================================

    ISP

    interface Loopback0
    ip address 4.4.4.4 255.255.255.0
    !
    interface FastEthernet0/0
    no ip address
    shutdown
    duplex auto
    speed auto
    !
    interface FastEthernet0/1
    no ip address
    shutdown
    duplex auto
    speed auto
    !
    interface Serial1/0
    description connected to CHERRY
    ip address 192.168.24.4 255.255.255.0
    serial restart-delay 0
    !
    interface Serial1/1
    description connected to BERRY
    ip address 192.168.34.4 255.255.255.0
    serial restart-delay 0
    !
    interface Serial1/2
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/3
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/4
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/5
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/6
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial1/7
    no ip address
    shutdown
    serial restart-delay 0
    !
    router bgp 200
    no synchronization
    bgp log-neighbor-changes
    network 4.4.4.0 mask 255.255.255.0
    neighbor 2.2.2.2 remote-as 100
    neighbor 2.2.2.2 ebgp-multihop 2
    neighbor 2.2.2.2 update-source Loopback0
    neighbor 3.3.3.3 remote-as 100
    neighbor 3.3.3.3 ebgp-multihop 2
    neighbor 3.3.3.3 update-source Loopback0
    no auto-summary
    !
    ip classless
    ip route 2.2.2.2 255.255.255.255 192.168.24.2
    ip route 3.3.3.3 255.255.255.255 192.168.34.3

    ==============================================

    Here I just wanted to explore the MED & wanted that all the traffic should reach AS 200 via berry that’s why I set the metric 50 in Berry.

    Now how could I check that the traffic is moving to ISP via Berry?

    May be I have done so many silly things but I need to clear the ideas about the BGP activities.

    1. It’s also showing some abnormal behaviour in Kerry Router:-

      KERRY#sh ip bgp s
      BGP router identifier 1.1.1.1, local AS number 100
      BGP table version is 1, main routing table version 1
      6 network entries using 606 bytes of memory
      8 path entries using 384 bytes of memory
      2 BGP path attribute entries using 180 bytes of memory
      1 BGP AS-PATH entries using 24 bytes of memory
      0 BGP route-map cache entries using 0 bytes of memory
      0 BGP filter-list cache entries using 0 bytes of memory
      BGP using 1194 total bytes of memory
      BGP activity 28/22 prefixes, 52/44 paths, scan interval 60 secs

      Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
      2.2.2.2 4 100 544 538 1 0 0 00:00:26 4
      3.3.3.3 4 100 555 547 1 0 0 00:00:25 4
      KERRY#ping 2.2.2.2

      Type escape sequence to abort.
      Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
      …..
      Success rate is 0 percent (0/5)
      KERRY#ping 3.3.3.3

      Type escape sequence to abort.
      Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
      …..
      Success rate is 0 percent (0/5)

      1. See if it’s not just in the BGP table but also in the routing table. If it’s in the BGP table but NOT in the routing table then you need to check your next hop IP addresses and see if those are reachable.

    2. If you play with the BGP attributes you can see the next-hop IP address in the BGP table or your routing table. A traceroute will also work.

      Be very careful with changing the administrative distance. If you set EIGRP to 200 something funny might happen…you use EIGRP to advertise the loopback interface so you can configure BGP between the loopback interfaces. Once that’s done your routers will learn about the loopback interfaces through BGP and removes the EIGRP information…that’s a chicken & egg problem. Use an IGP to advertise loopback interfaces and make sure that’s what you have in the routing table.

  16. Now again it’s pinging. I donno why this is happening? strange.
    Let me also tell you that I added these networks in BGP As 100 in Kerry.
    i.e.

    network 192.168.12.0
    network 192.168.13.0

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 20/31/56 ms
    KERRY#ping 3.3.3.3

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 12/40/60 ms
    KERRY#

  17. Hi Rene,

    Can your use access lists for you route maps? When would it be necessary to do so?

    This was my config for setting MED on cherry and berry.

    Router BGP 100
    neighbor 192.168.24.4 route-map setMED out

    access-list 10 permit 192.168.24.0 0.0.0.255
    access-list 20 permit 192.168.34.0 0.0.0.255
    access-list 30 permit any

    route-map setMED permit 10
    match ip address 10
    set metric 100
    route-map setMED permit 20
    match ip address 20
    set metric 200
    route-map setMED permit 30
    match ip address 30

    I achieve the same goal however it looks like I just wasted my time with all the extra config. I did the opposite for update the local preference. I just issued this command under berry:

    bgp default local-preference 200

    How do you decide which one option to use or am I just doing it wrong?

    Thanks,

    Wesley

    1. Route-maps are very flexible, you can match on access-lists, prefix-lists, AS numbers and other things.

      The reason you want to use route-maps is because you can [b]match[/b] on certain things and then [b]SET[/b] some stuff. You could set the local-preference to 200 like you did but this will be applied to everything.

      Using a route-map you could set the local preference to 200 for prefixes that match a certain access-list or something else…that’s way more flexible. Route-maps can be attached to different neighbors.

  18. Hi Rene,

    You say :

    "Advertise the loopback interfaces into BGP, do this on all routers."

    This is fine except for AS 100, the Loopbacks will be advertised to the iBGP peers but wont be placed into the Routing table because you already advertised the loopbacks with en IGP "EIGRP" and because we all know that internal BGP routes have an AD of 200 and "EIGRP" has an AD of 90 will the EIGRP routes be placed into the routing table.

    This results in a RIB failiure and is indicated as "r" in the BGP table.

    Now the thing what i want to know, is it really necessary to advertise the loopback with BGP aswell, cause they are already advertised with EIGRP. ?

    Or am i missing something here ?

    Thanks in advandce

    Peter

    1. Hi,

      I think i missed something here, you probably need to advertise those loopbacks, else ISP wont know them.
      Is there a way to fix the RIB failure or to supress this ?

      Peter

      1. Hello Peter,

        The reason that we need to advertise the loopbacks into BGP is because otherwise the ISP will not learn about them. Another option would have been to redistribute EIGRP into BGP on Cherry and Berry so it can be advertised to the ISP.

        The RIB failure probably occurs because the next hop IP address is not reachable. You can fix this by making sure the next hop is reachable.

  19. just wanted to say thank you!

    Just finished the lab … quite straight-forward but I though it is excellent to illustrate the concept of MED and LOCAL_PREF.

    The local_pref bit is quite easy; with MED, i only increased the metric to all updates going to ISP using the following:

    router bgp 100
    no synchronization
    bgp router-id 2.2.2.2
    bgp log-neighbor-changes
    […]
    neighbor 192.168.24.4 remote-as 200
    neighbor 192.168.24.4 route-map RM-IN in
    neighbor 192.168.24.4 route-map RM-OUT out
    […]
    !
    route-map RM-OUT permit 10
    set metric +50000

    Problem with this is that MED is always only going to be a "hint" to the ISP so the ISP could always choose to ignore the metric.

    1. Glad you liked it. In the read world you probably see more often that ISPs will use "AS Path prepending". They’ll add their own AS number multiple times to tell other ISPs not to use them as a transit AS.

  20. After having full reachability to all networks.. I saw ISP prefering Berry path to reach 3.3.3.3 (Berry Loopback) and as per your video Initially it should prefer via Cherry path …

    ISP#sh ip bg
    BGP table version is 13, local router ID is 4.4.4.4
    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
    * 1.1.1.0/24 192.168.34.2 0 100 i
    *> 192.168.24.2 0 100 i
    * 2.2.2.0/24 192.168.34.2 0 100 i
    *> 192.168.24.2 0 0 100 i
    * 3.3.3.0/24 192.168.24.2 0 100 i
    *> 192.168.34.2 0 0 100 i
    *> 4.4.4.0/24 0.0.0.0 0 32768 i
    * 192.168.12.0 192.168.34.2 0 100 i
    *> 192.168.24.2 0 0 100 i
    * 192.168.13.0 192.168.34.2 0 0 100 i
    *> 192.168.24.2 0 100 i
    *> 192.168.23.0 192.168.24.2 0 0 100 i
    * 192.168.34.2 0 0 100 i
    *> 192.168.24.0 0.0.0.0 0 32768 i
    *> 192.168.34.0 0.0.0.0 0 32768 i

    Any idea why is that????

  21. Hi Rene
    Great LAB!

    I verified your final configuration with my.

    To complete this task:
    -To conform to the company policy, you need to make sure that all outgoing traffic will be sent using the link between router Berry and ISP. (hint: use Local Preference)

    I think the additional (except Local Preference) configuration is necessary.

    With your final configuration I found that from Cherry and Berry perspective only direct routes to the ISP are used( no matter of Local Preference setting), because a route over second link to ISP is inaccessible.
    For ex:

    Berry#sh ip bgp 4.4.4.4
    BGP routing table entry for 4.4.4.0/24, version 11
    Paths: (2 available, best #2, table Default-IP-Routing-Table)
    Advertised to update-groups:
    1 3
    200
    192.168.24.4 (inaccessible) from 2.2.2.2 (2.2.2.2)
    Origin IGP, metric 0, localpref 100, valid, internal
    200
    192.168.34.4 from 192.168.34.4 (4.4.4.4)
    Origin IGP, metric 0, localpref 200, valid, external, best

    I think it is normal in this configuration because Barry doesn’t know a path to the 192.168.24.0/24 network. (same from Cherry perspective).

    So there are two solution for this:
    1. add a static routes to this networks.
    2. set next-hop-self on ibgp configuration between Cherry and Berry.

    What do you think about that?

    br

  22. I don’t see where I can download this lab anywhere… Am I missing something? It is asking me to register but obviously that is already done….

  23. enter your message here…[quote=mrdoro]Hi Rene
    Great LAB!

    I verified your final configuration with my.

    To complete this task:
    -To conform to the company policy, you need to make sure that all outgoing traffic will be sent using the link between router Berry and ISP. (hint: use Local Preference)

    I think the additional (except Local Preference) configuration is necessary.

    With your final configuration I found that from Cherry and Berry perspective only direct routes to the ISP are used( no matter of Local Preference setting), because a route over second link to ISP is inaccessible.
    For ex:

    Berry#sh ip bgp 4.4.4.4
    BGP routing table entry for 4.4.4.0/24, version 11
    Paths: (2 available, best #2, table Default-IP-Routing-Table)
    Advertised to update-groups:
    1 3
    200
    192.168.24.4 (inaccessible) from 2.2.2.2 (2.2.2.2)
    Origin IGP, metric 0, localpref 100, valid, internal
    200
    192.168.34.4 from 192.168.34.4 (4.4.4.4)
    Origin IGP, metric 0, localpref 200, valid, external, best

    I think it is normal in this configuration because Barry doesn’t know a path to the 192.168.24.0/24 network. (same from Cherry perspective).

    So there are two solution for this:
    1. add a static routes to this networks.
    2. set next-hop-self on ibgp configuration between Cherry and Berry.

    What do you think about that?

    br[/quote]

    After applying solution 2 router Cherry stops advertising 4.4.4.0/24 to Berry

    Cherry#sh ip bgp neighbors 3.3.3.3 advertised-routes
    BGP table version is 23, local router ID is 2.2.2.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
    *> 2.2.2.0/24 0.0.0.0 0 32768 i
    *> 192.168.12.0 0.0.0.0 0 32768 i
    *> 192.168.23.0 0.0.0.0 0 32768 i

    Total number of prefixes 3

  24. enter your message here…[quote=NorthPaladin]enter your message here…[quote=mrdoro]Hi Rene
    Great LAB!

    I verified your final configuration with my.

    To complete this task:
    -To conform to the company policy, you need to make sure that all outgoing traffic will be sent using the link between router Berry and ISP. (hint: use Local Preference)

    I think the additional (except Local Preference) configuration is necessary.

    With your final configuration I found that from Cherry and Berry perspective only direct routes to the ISP are used( no matter of Local Preference setting), because a route over second link to ISP is inaccessible.
    For ex:

    Berry#sh ip bgp 4.4.4.4
    BGP routing table entry for 4.4.4.0/24, version 11
    Paths: (2 available, best #2, table Default-IP-Routing-Table)
    Advertised to update-groups:
    1 3
    200
    192.168.24.4 (inaccessible) from 2.2.2.2 (2.2.2.2)
    Origin IGP, metric 0, localpref 100, valid, internal
    200
    192.168.34.4 from 192.168.34.4 (4.4.4.4)
    Origin IGP, metric 0, localpref 200, valid, external, best

    I think it is normal in this configuration because Barry doesn’t know a path to the 192.168.24.0/24 network. (same from Cherry perspective).

    So there are two solution for this:
    1. add a static routes to this networks.
    2. set next-hop-self on ibgp configuration between Cherry and Berry.

    What do you think about that?

    br[/quote]

    After applying solution 2 router Cherry stops advertising 4.4.4.0/24 to Berry

    Cherry#sh ip bgp neighbors 3.3.3.3 advertised-routes
    BGP table version is 23, local router ID is 2.2.2.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
    *> 2.2.2.0/24 0.0.0.0 0 32768 i
    *> 192.168.12.0 0.0.0.0 0 32768 i
    *> 192.168.23.0 0.0.0.0 0 32768 i

    Total number of prefixes 3[/quote]

    IT is possible. Because a Cherry received this prefix from Berry. And one of the rules of BGP is that routers doesn’t advertise a prefix on interface on which they received this prefix.

    So if Cherry heard about this prefix form berry and additionally with better local preference, it doesn’t advertise back it to the berry

  25. Question related to the optional:
    Change the BGP setup between Cherry and ISP so the BGP updates are sourced from the loopback interfaces.

    When I use the loopbacks to create the bpg adjacency between ISP and Cherry | Berry, the ISP can only ping 1.1.1.1 from the loopback 4.4.4.4. I know if I create default routes on Cherry and Berry and redistribute them in eigrp. The ping is successful from the ISP no matter what source I use. However, is that the correct way to do it? Or I should do it using a different way? Because this behavior is due to the lack of ISP-Cherry | ISP-Berry link in the Kerry routing table
    πŸ™‚

  26. —— Router Kerry——-

    interface Loopback0
    ip address 1.1.1.1 255.255.255.0
    !
    interface FastEthernet0/0
    ip address 192.168.12.1 255.255.255.0
    duplex auto
    speed auto
    !
    interface FastEthernet1/0
    ip address 192.168.13.1 255.255.255.0
    duplex auto
    speed auto
    !
    router eigrp 100
    network 1.1.1.0 0.0.0.255
    network 192.168.12.0
    network 192.168.13.0
    no auto-summary
    !
    router bgp 100
    no synchronization
    bgp log-neighbor-changes
    network 1.1.1.0 mask 255.255.255.0
    network 192.168.12.0
    network 192.168.13.0
    neighbor 2.2.2.2 remote-as 100
    neighbor 2.2.2.2 update-source Loopback0
    neighbor 3.3.3.3 remote-as 100
    neighbor 3.3.3.3 update-source Loopback0
    no auto-summary

    —–router cherry ——

    interface Loopback0
    ip address 2.2.2.2 255.255.255.0
    !
    interface FastEthernet0/0
    ip address 192.168.12.2 255.255.255.0
    duplex auto
    speed auto
    !
    interface FastEthernet1/0
    ip address 192.168.23.2 255.255.255.0
    duplex auto
    speed auto
    !
    interface Serial2/0
    ip address 192.168.24.2 255.255.255.0
    serial restart-delay 0
    !
    interface Serial2/1
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial2/2
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial2/3
    no ip address
    shutdown
    serial restart-delay 0
    !
    router eigrp 100
    network 2.2.2.0 0.0.0.255
    network 192.168.12.0
    network 192.168.23.0
    no auto-summary
    !
    router bgp 100
    no synchronization
    bgp log-neighbor-changes
    network 2.2.2.0 mask 255.255.255.0
    network 192.168.12.0
    network 192.168.23.0
    neighbor 1.1.1.1 remote-as 100
    neighbor 1.1.1.1 update-source Loopback0
    neighbor 1.1.1.1 next-hop-self
    neighbor 3.3.3.3 remote-as 100
    neighbor 3.3.3.3 update-source Loopback0
    neighbor 4.4.4.4 remote-as 200
    neighbor 4.4.4.4 ebgp-multihop 2
    neighbor 4.4.4.4 update-source Loopback0
    no auto-summary
    !
    ip http server
    no ip http secure-server
    !
    ip forward-protocol nd
    ip route 4.4.4.0 255.255.255.0 192.168.24.4
    !

    ——– Router Berry ——-

    interface Loopback0
    ip address 3.3.3.3 255.255.255.0
    !
    interface FastEthernet0/0
    ip address 192.168.13.3 255.255.255.0
    duplex auto
    speed auto
    !
    interface FastEthernet1/0
    ip address 192.168.23.3 255.255.255.0
    duplex auto
    speed auto
    !
    interface Serial2/0
    ip address 192.168.34.3 255.255.255.0
    serial restart-delay 0
    !
    interface Serial2/1
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial2/2
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial2/3
    no ip address
    shutdown
    serial restart-delay 0
    !
    router eigrp 100
    network 3.3.3.0 0.0.0.255
    network 192.168.13.0
    network 192.168.23.0
    no auto-summary
    !
    router bgp 100
    no synchronization
    bgp log-neighbor-changes
    network 3.3.3.0 mask 255.255.255.0
    network 192.168.13.0
    network 192.168.23.0
    neighbor 1.1.1.1 remote-as 100
    neighbor 1.1.1.1 update-source Loopback0
    neighbor 1.1.1.1 next-hop-self
    neighbor 2.2.2.2 remote-as 100
    neighbor 2.2.2.2 update-source Loopback0
    neighbor 4.4.4.4 remote-as 200
    neighbor 4.4.4.4 ebgp-multihop 2
    neighbor 4.4.4.4 update-source Loopback0
    no auto-summary
    !
    ip http server
    no ip http secure-server
    !
    ip forward-protocol nd
    ip route 4.4.4.0 255.255.255.0 192.168.34.4
    !

    ——–Router ISP ——-

    interface Loopback0
    ip address 4.4.4.4 255.255.255.0
    !
    interface Serial0/0
    ip address 192.168.24.4 255.255.255.0
    serial restart-delay 0
    !
    interface Serial0/1
    ip address 192.168.34.4 255.255.255.0
    serial restart-delay 0
    !
    interface Serial0/2
    no ip address
    shutdown
    serial restart-delay 0
    !
    interface Serial0/3
    no ip address
    shutdown
    serial restart-delay 0
    !
    router bgp 200
    no synchronization
    bgp log-neighbor-changes
    network 4.4.4.0 mask 255.255.255.0
    neighbor 2.2.2.2 remote-as 100
    neighbor 2.2.2.2 ebgp-multihop 2
    neighbor 2.2.2.2 update-source Loopback0
    neighbor 3.3.3.3 remote-as 100
    neighbor 3.3.3.3 ebgp-multihop 2
    neighbor 3.3.3.3 update-source Loopback0
    no auto-summary
    !
    ip http server
    no ip http secure-server
    !
    ip forward-protocol nd
    ip route 2.2.2.0 255.255.255.0 192.168.24.2
    ip route 3.3.3.0 255.255.255.0 192.168.34.3
    !
    !

    Here I am not able ping Router Kerry lo0 from Router ISP ,any advise where I had made mistake.

  27. Hey Rene did u notice that after applying MED and LOCAL PREFERENCE Kerry router is pinging to ISP this way…

    Kerry#ping 4.4.4.4

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 40/47/68 ms
    Kerry#traceroute 4.4.4.4

    Type escape sequence to abort.
    Tracing the route to 4.4.4.4

    1 192.168.12.2 40 msec
    192.168.13.3 44 msec
    192.168.12.2 40 msec
    2 192.168.24.4 84 msec 76 msec
    192.168.34.4 32 msec
    Kerry#traceroute 4.4.4.4

    Type escape sequence to abort.
    Tracing the route to 4.4.4.4

    1 192.168.12.2 12 msec
    192.168.13.3 52 msec
    192.168.12.2 52 msec
    2 192.168.24.4 48 msec 60 msec *
    Kerry#traceroute 4.4.4.4

    Type escape sequence to abort.
    Tracing the route to 4.4.4.4

    1 192.168.12.2 56 msec 40 msec 12 msec
    2 192.168.24.4 36 msec
    192.168.34.4 56 msec
    192.168.24.4 72 msec
    Kerry#traceroute 4.4.4.4

    Type escape sequence to abort.
    Tracing the route to 4.4.4.4

    1 192.168.13.3 44 msec
    192.168.12.2 32 msec 36 msec
    2 192.168.24.4 48 msec 32 msec *
    Kerry#traceroute 4.4.4.4

    Type escape sequence to abort.
    Tracing the route to 4.4.4.4

    1 192.168.12.2 52 msec 8 msec 56 msec
    2 192.168.24.4 60 msec 72 msec *

  28. could somebody explain why the route-map is INBOUND?

    “To conform to the company policy, you need to make sure that all outgoing traffic will be sent using the link between router Berry and ISP. (hint: use Local Preference)”

    1. Local-preference is an optional non-transitive BGP attribute as best I can recall. It is only valid to be set on incoming routes and is confined to a single AS or confederation. When routes are received from the ISP, Berry is effectively announcing to the AS “I have the best path to these routes” and other BGP speakers will consider that in their bestpath selections.

  29. Thanks Rene, as always

    As a work around, instead of using the MED you could also configure WEIGHT on the ISP router on the link to Berry. I believe it achieves the same result

    !
    router bgp 200
    no synchronization
    bgp log-neighbor-changes
    network 4.4.4.0 mask 255.255.255.0
    neighbor 192.168.24.2 remote-as 100
    neighbor 192.168.34.3 remote-as 100
    neighbor 192.168.34.3 weight 120
    no auto-summary
    !

  30. HI I DID ALL THE SAME CONFIG BUT ON ROUTER KERRY I HAVE PROBLEMS WITH (RIB FAILURE COMMAND) PLEASE HELP

    Router#sh ip bgp
    BGP table version is 23, local router ID is 1.1.1.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
    *> 1.1.1.0/24 0.0.0.0 0 32768 i
    r>i2.2.2.0/24 2.2.2.1 0 100 0 i
    r>i3.3.3.0/24 3.3.3.1 0 100 0 i
    *>i4.4.4.0/24 2.2.2.1 0 100 0 200 i
    * i 3.3.3.1 0 100 0 200 i
    r>i192.168.12.0 2.2.2.1 0 100 0 i
    r>i192.168.13.0 3.3.3.1 0 100 0 i
    r>i192.168.23.0 2.2.2.1 0 100 0 i
    r i 3.3.3.1 0 100 0 i

Comments are closed.