BGP Attribute Weight


Scenario:

You wake up in what seems to be a server room…trapped in a chair and tied up by what seems to be networking cabling. In front of you is a LED screen showing you a lady in uniform. There are some problems with the BGP network and she asks you urgently if you can fix the problems. The network is running BGP but there is no load sharing at all. You need to configure AS12 and AS 34 by using the weight attribute to manipulate traffic patterns. You get 8 minutes before the network is overloaded and crashes…

Goal:

  • All IP addresses have been preconfigured for you as specified in the topology picture.
  • Configure IBGP within AS12 and AS34.
  • Configure EBGP between router Stevens and Rutledge.
  • Configure EBGP between router Warren and Goodwin.
  • Advertise all physical interfaces in BGP.
  • Advertise the loopback0 and loopback1 interfaces in BGP on all routers.
  • Ensure you have full reachability, all physical interfaces and loopback interfaces should be reachable from any router.
  • You are only allowed to use the weight attribute for the upcoming tasks.
  • Configure router Stevens so traffic to 3.3.3.0 /24 is sent to router Warren.
  • Configure router Stevens to ensure traffic to 44.44.44.0 /24 keeps the same next hop even when someone would change another BGP attribute like local preference or origin.
  • Configure router Rutledge so traffic to 2.2.2.0 /24 is sent to router Goodwin.
  • Configure router Goodwin so traffic to 11.11.11.0 /24 is sent to router Rutledge.

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:

BGP Attribute Weight

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,

    For this item -> “Configure router Stevens so traffic to 3.3.3.0 /24 is sent to router Rutledge” the network 3.3.3.0/24 already belongs to the router RUTLEDGE.

    ####################################
    !
    hostname STEVENS
    !
    router bgp 12
    network 1.1.1.0 mask 255.255.255.0
    network 11.11.11.0 mask 255.255.255.0
    network 192.168.12.0
    network 192.168.13.0
    neighbor 2.2.2.2 remote-as 12
    neighbor 2.2.2.2 update-source Loopback0
    neighbor 2.2.2.2 next-hop-self
    neighbor 3.3.3.3 remote-as 34
    neighbor 3.3.3.3 ebgp-multihop 2
    neighbor 3.3.3.3 update-source Loopback0
    neighbor 3.3.3.3 route-map WEIGHT in
    !
    access-list 1 permit 44.44.44.0 0.0.0.255
    !
    route-map WEIGHT permit 10
    match ip address 1
    set weight 65535
    !
    route-map WEIGHT permit 20
    !
    ####################################
    !
    hostname RUTLEDGE
    !
    router bgp 34
    network 3.3.3.0 mask 255.255.255.0
    network 33.33.33.0 mask 255.255.255.0
    network 192.168.13.0
    network 192.168.34.0
    neighbor 1.1.1.1 remote-as 12
    neighbor 1.1.1.1 ebgp-multihop 2
    neighbor 1.1.1.1 update-source Loopback0
    neighbor 4.4.4.4 remote-as 34
    neighbor 4.4.4.4 update-source Loopback0
    neighbor 4.4.4.4 next-hop-self
    neighbor 4.4.4.4 route-map WEIGHT in
    !
    access-list 1 permit 2.2.2.0 0.0.0.255
    !
    route-map WEIGHT permit 10
    match ip address 1
    set weight 65535
    !
    route-map WEIGHT permit 20
    !
    ####################################
    !
    router bgp 34
    network 4.4.4.0 mask 255.255.255.0
    network 44.44.44.0 mask 255.255.255.0
    network 192.168.24.0
    network 192.168.34.0
    neighbor 2.2.2.2 remote-as 12
    neighbor 2.2.2.2 ebgp-multihop 2
    neighbor 2.2.2.2 update-source Loopback0
    neighbor 3.3.3.3 remote-as 34
    neighbor 3.3.3.3 update-source Loopback0
    neighbor 3.3.3.3 next-hop-self
    neighbor 3.3.3.3 route-map WEIGHT in
    !
    access-list 1 permit 11.11.11.0 0.0.0.255
    !
    route-map WEIGHT permit 10
    match ip address 1
    set weight 65535
    !
    route-map WEIGHT permit 20
    !
    ####################################

    I hope it can be useful.

  2. This is such a beautiful lab but I do have a question. When I advertised the 192.168.13.0/24 and 192.168.12.0/24 subnets I did this ONLY on Router Stevens. I did not advertise them onWarren or Rutledge. I used ONLY Goodwin to advertise the 192.168.24.0/24 and 192.168.34/0. Is this OK? is what I have done ok or should I have advertised every connected network on each router like Rene did?

    I also didn’t use loopbacks to form the adjacencies but instead used physical interfaces. I did set a next hop self command on Warren and Rutledge. The end result appears to meet the goals but perhaps I didn’t need a next hop self as Rene did not ask for this to be configured?

    My config for STEVENS is:

    router bgp 12
    no synchronization
    bgp log-neighbor-changes
    network 1.1.1.0 mask 255.255.255.0
    network 11.11.11.0 mask 255.255.255.0
    network 192.168.12.0
    network 192.168.13.0
    neighbor 192.168.12.2 remote-as 12
    neighbor 192.168.12.2 route-map WEIGHT>WARREN in
    neighbor 192.168.13.3 remote-as 34
    neighbor 192.168.13.3 route-map WEIGHT>RUTLEDGE in
    no auto-summary
    !
    no ip http server
    no ip http secure-server
    !
    !
    !
    !
    ip access-list standard NETWORK-3
    permit 3.3.3.0 0.0.0.255
    ip access-list standard NETWORK-44
    permit 44.44.44.0 0.0.0.255
    !
    route-map WEIGHT>RUTLEDGE permit 10
    match ip address NETWORK-44
    set weight 65535
    !
    route-map WEIGHT>RUTLEDGE permit 20
    !
    route-map WEIGHT>WARREN permit 10
    match ip address NETWORK-3
    set weight 199
    !
    route-map WEIGHT>WARREN permit 20

    WARREN:
    router bgp 12
    no synchronization
    bgp log-neighbor-changes
    network 2.2.2.0 mask 255.255.255.0
    network 2.2.2.2 mask 255.255.255.255
    network 22.22.22.0 mask 255.255.255.0
    neighbor 192.168.12.1 remote-as 12
    neighbor 192.168.12.1 next-hop-self
    neighbor 192.168.24.4 remote-as 34
    no auto-summary

    RUTLEDGE:
    router bgp 34
    no synchronization
    bgp log-neighbor-changes
    network 3.3.3.0 mask 255.255.255.0
    network 33.33.33.0 mask 255.255.255.0
    neighbor 192.168.13.1 remote-as 12
    neighbor 192.168.34.4 remote-as 34
    neighbor 192.168.34.4 next-hop-self
    neighbor 192.168.34.4 route-map WEIGHT>GOODWIN in
    no auto-summary
    !
    no ip http server
    no ip http secure-server
    !
    !
    !
    !
    ip prefix-list NETWORK-2 seq 5 permit 2.2.2.0/24
    ip prefix-list NETWORK-2 seq 10 deny 0.0.0.0/0 le 32
    !
    route-map WEIGHT>GOODWIN permit 10
    match ip address prefix-list NETWORK-2
    set weight 500
    !
    route-map WEIGHT>GOODWIN permit 20

    GOODWIN:

    router bgp 34
    no synchronization
    bgp log-neighbor-changes
    network 4.4.4.0 mask 255.255.255.0
    network 44.44.44.0 mask 255.255.255.0
    network 192.168.24.0
    network 192.168.34.0
    neighbor 192.168.24.2 remote-as 12
    neighbor 192.168.34.3 remote-as 34
    neighbor 192.168.34.3 route-map WEIGHT>RUTLEDGE in
    no auto-summary
    !
    no ip http server
    no ip http secure-server
    !
    !
    !
    !
    ip access-list standard NETWORK-11
    permit 11.11.11.0 0.0.0.255
    !
    route-map WEIGHT>RUTLEDGE permit 10
    match ip address NETWORK-13
    set weight 65535
    !
    route-map WEIGHT>RUTLEDGE permit 20

  3. where is the topology file? i cant see it here. whare the loopback addresses please. thanks

  4. hello, i did this, but had a query..

    Stevens#traceroute 3.3.3.3

    Type escape sequence to abort.
    Tracing the route to 3.3.3.3

    1 192.168.12.2 100 msec 76 msec 0 msec
    2 192.168.24.4 188 msec 72 msec 76 msec
    3 192.168.34.3 [AS 34] 144 msec * 204 msec

    how do i hide the AS number there?

    1. Hmm good question, not sure if you can.

      The AS number can be found anyway for any prefix that is used on the Internet so disabling it doesn’t add any value I think.

  5. Lol…I like your story line..is this one of those Swordfish type scenario if you don’t finish in time, you …..if you saw the movie you know the outcome 🙂

  6. I am having an issue with the actual route to the 3.3.3.0/24 network vs what is being displayed. It appears to have the best route marked as 192.168.24.4 and also displays this in the routing table, but traceroute proves that this is not the case…

    What am I missing?
    =============================================
    Stevens#sh ip bgp
    BGP table version is 13, local router ID is 11.11.11.11
    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
    *>i3.3.3.0/24 192.168.24.4 0 100 500 34 i
    * 192.168.13.3 0 0 34 i
    *> 4.4.4.0/24 192.168.13.3 0 34 i
    *> 11.11.11.0/24 0.0.0.0 0 32768 i
    *> 33.33.33.0/24 192.168.13.3 0 0 34 i
    *> 44.44.44.0/24 192.168.13.3 0 34 i
    *> 192.168.12.0 0.0.0.0 0 32768 i
    *> 192.168.13.0 0.0.0.0 0 32768 i
    * 192.168.13.3 0 0 34 i
    *> 192.168.24.0 192.168.13.3 0 34 i
    *> 192.168.34.0 192.168.13.3 0 0 34 i
    =============================================
    Stevens#sh ip route
    Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
    D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
    N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
    E1 – OSPF external type 1, E2 – OSPF external type 2
    i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
    ia – IS-IS inter area, * – candidate default, U – per-user static route
    o – ODR, P – periodic downloaded static route

    Gateway of last resort is not set

    C 192.168.12.0/24 is directly connected, FastEthernet0/0
    1.0.0.0/24 is subnetted, 1 subnets
    C 1.1.1.0 is directly connected, Loopback0
    C 192.168.13.0/24 is directly connected, FastEthernet1/0
    33.0.0.0/24 is subnetted, 1 subnets
    B 33.33.33.0 [20/0] via 192.168.13.3, 01:37:18
    3.0.0.0/24 is subnetted, 1 subnets
    B 3.3.3.0 [200/0] via 192.168.24.4, 01:37:18
    4.0.0.0/24 is subnetted, 1 subnets
    B 4.4.4.0 [20/0] via 192.168.13.3, 01:37:18
    B 192.168.24.0/24 [20/0] via 192.168.13.3, 01:37:19
    11.0.0.0/24 is subnetted, 1 subnets
    C 11.11.11.0 is directly connected, Loopback1
    B 192.168.34.0/24 [20/0] via 192.168.13.3, 01:37:20
    44.0.0.0/24 is subnetted, 1 subnets
    B 44.44.44.0 [20/0] via 192.168.13.3, 01:37:20
    =============================================
    Stevens#traceroute 3.3.3.3

    Type escape sequence to abort.
    Tracing the route to 3.3.3.3

    1 192.168.13.3 68 msec * 52 msec
    Stevens#
    =============================================

    Thank you
    EIGHTSIXSTUD

    1. @EIGHTSIXSTUD:

      Take a look at these outputs:

      i3.3.3.0/24 192.168.24.4 0 100 500 34 i — next-hop for 3.3.3.0/24 is 192.168.24.4

      also

      *> 192.168.24.0 192.168.13.3 0 34 i — 192.168.24.0/24 is not directly connected

      &

      192.168.24.0/24 [20/0] via 192.168.13.3, 01:37:19 — 192.16813.3 is the next-hop for 192.168.24.0/24

      Simply this means to reach network 3.3.3.0/24 use 192.168.24.4 as your next-hop router but since 192.168.24.4 resides in the 192.168.24.0/24 network which is accessible from the router with 192.168.13.3 IP address as the next-hop for it, so any traffic destined to 3.3.3.0/24 will be forwarded firstly to 192.168.13.3 because its the next-hop for 192.168.24.0/24 which is your currently your next-hop.
      When the packet received at the 192.168.13.3 interface, the router will examine the destination IP address and find that the network 3.3.3.0/24 belongs to. In this case our goal is missed because our traffic will not be routed to Stevens > Warren > Goodwin > Rutledge instead it will take its normal path of Stevens > Rutledge.

      To solve this issue use the command of next-hop-self at your iBGP neighbors and re-traceroute 3.3.3.3.

      Cheers,

      Ahmad Rateb.

  7. there is a file in the attachment.. but it is not the topology file when i click on it..it showed invalid file.. 🙁

  8. just recreate the topology and copy paste the configs from the router in the zip and you have your startup config. nothing special 😉

Comments are closed.