Master CCNA

How to Master CCNA Ebook

 

 

My book will help you Master CCNA

Master CCNP SWITCH

How to master CCNP SWITCH ebook

 

 

My book will help you Master CCNP SWITCH

Master CCNP ROUTE

How to master CCNP ROUTE Ebook

 

 

My book will help you Master CCNP ROUTE

Print

BGP IBGP/EBGP Local Preference MED

Written by Rene Molenaar on . Posted in BGP

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.

IOS:

c3640-jk9s-mz.124-16.bin

Topology:

BGP Local Preference MED

Video Solution:

You need to a flashplayer enabled browser to view this YouTube video

You need to register to download the GNS3 Topology File. (Registration is Free!)

Related Articles
Only registered users can write comments!

Comments (28)

  • avatar
    lynxbat

    I don't see a download link on this one???

  • avatar
    ReneMolenaar

    Just fixed it :) thanks for the letting me know!

  • avatar
    sarmak

    I like to check my answer against the correct answer. Are the answers posted here?

  • avatar
    eggenburg
    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)"

    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.

  • avatar
    talaltk

    ummm where is the solution????

  • avatar
    ReneMolenaar

    I don't have the solutions for this lab right now, i'll be adding them later...takes time.

  • avatar
    mikathlon

    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

  • avatar
    galen_kwan

    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).

  • avatar
    ReneMolenaar

    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!

  • avatar
    ZSasha

    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 00:21:59.903: G;P-5-ADJCHANGE: neighbor 192.168.23.2 Down User reset
    R3#
    *Mar 1 00:22:01.191: G;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#
  • avatar
    ReneMolenaar

    This lab has some errors, i'll have to fix it :)

  • avatar
    ozidunga

    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.

  • avatar
    mr.kd

    Dear a||

    Can any one share the full lab config.

    thanx
    KD

  • avatar
    Kaage

    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."

  • avatar
    xytek

    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.

  • avatar
    ReneMolenaar

    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

  • avatar
    Muhammed

    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.

  • avatar
    ReneMolenaar

    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.

  • avatar
    Muhammed

    :)

    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?

  • avatar
    Muhammed

    I got the problem at last.
    thanks for your considerations.

  • avatar
    ReneMolenaar

    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

  • avatar
    mdasif

    thanks for these labs. they are extremely helpful to reinforce the concepts.

  • avatar
    Ameen Shaik

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

  • avatar
    ReneMolenaar

    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".

  • avatar
    sibaram

    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.

  • avatar
    sibaram

    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)

  • avatar
    sibaram

    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#