DONATE


Border Gateway Protocol attributes CCNA FREE LAB

 


Border Gateway Protocol (BGP) advertises, learns, and chooses the best paths inside the wide internet. When two ISPs connect, they typically use BGP to exchange routing information. The ISPs of the worldwide exchange routing information with one or more than one ISPs.

In this blog, we will configure the weight of BGP attributes, local preference, and MED. BGP Peer group let's take a look at BGP attributes. 

An autonomous system is a collection of networks under a single technical administration domain. IGPs like OSPF EIGRP operate within an Autonomous system. We use BGP between the autonomous systems to exchange loop-free routing information read more...

 Peer group By default, BGP updates are sent on a neighbor-to-neighbor basis and the result is more CPU resources being used, also by implementing non-default settings for example performing filtering using prefix lists, route maps, or filter lists to those neighbors, even more, CPU resources are consumed. When many neighbors have similar configuration parameters. Cisco IOS allows us to create a logical group of those similar neighbors into a BGP peer group then you apply your non-default BGP configuration to those parameters to each neighbor individually. Actually, a single router can have multiple peer groups, each representing a separate set of parameters. As a result, fewer CPU resources are required. Remember router still sends out individual BGP updates to each of its neighbors. It does require based on BGP characteristics establishing a TCP session with each neighbor. read more...






BGP Attributes BGP supports a wide variety of path attributes, BGP chooses a route to a network based on the attributes of its path.

Four categories of attributes exist are as follows:-

  • Well-known mandatory
  • Well-known discretionary
  • Optional transitive
  • Optional non-transitive


BGP Weight is a Cisco-proprietary attribute used to influence the selection of the best path to a destination network within a single router. It's a local attribute, meaning it's not exchanged between routers.

 BGP Local preference (Local_Pref) Path attribute gives the router inside a single autonomous system a value that they can set per-route and advertise to all iBGP routers inside the autonomous system so that all routers in the autonomous system agree about which router is the best exit point for packet destined for that prefix.
Path with the highest preference value is more desirable, by default Local_pref value is 100 and the range is 0 through 4,294,967,295. Local preference is a well-known, discretionary attribute. It is advertised only to iBGP neighbors within an autonomous system read more...


Multi Exit Discriminator (MED) also called metric. MED is an optional and nontransitive attribute; MED allows an autonomous system to tell a neighboring autonomous system the best way to forward packets into the first autonomous system. MED is used to advertise one autonomous system into another, propagated inside the autonomous system, but not sent to any other autonomous systems. A smaller MED value means more preferred, by default 0 and the range is 0 through 4,294,967,295. MED originally worked for a dual-homed design. MED is used in the route selection process only if all the paths come from the same Autonomous System. BGP uses the BGP always-compare-med command to force the router to compare the MED even if the paths come from different autonomous systems. If you are enabling this option then enable it entire autonomous system otherwise loops can occur read more...


( so in this blog we are going to configure BGP peer group + BGP weight + BGP local preference + BGP MED and make sure all the routers in all the autonomous systems can ping and have all the routes in their routing table. it's a big lab with lots of IP addresses and lots of routes so we divided this lab into four parts) 

Topology:-






goal: configure BGP peer group (R1+R2+R3)

  • configure the topology as per the diagram 
  • configure IP addresses as per the topology
  • configure IGP EIGRP AS 100
  • advertise directly connected routes and loopbacks
  • make sure all three routers exchange the EIGRP routes
  • configure BGP AS 65111 to advertise directly connected routes
  • configure peer group name (cisco) password internetworks
  • configure EBGP between router 2 and 7.
  • verify the configuration.

PART-1 (PEER GROUP)



R1-65111(config)#interface serial 5/0
R1-65111(config-if)#ip address 12.1.1.1 255.0.0.0
R1-65111(config-if)#no shutdown
R1-65111(config-if)#exit

R1-65111(config)#interface serial 5/2
R1-65111(config-if)#ip address 31.1.1.2 255.0.0.0
R1-65111(config-if)#no shutdown
R1-65111(config-if)#exit

R1-65111(config)#interface fastethernet 0/0
R1-65111(config-if)#ip address 10.1.1.1 255.0.0.0
R1-65111(config-if)#no shutdown
R1-65111(config-if)#no keepalive
R1-65111(config-if)#exit

R1-65111(config)#interface loopback 1
R1-65111(config-if)#ip address 11.1.1.1 255.255.255.0
R1-65111(config-if)#exit

R1-65111(config)#interface loopback 2
R1-65111(config-if)#ip address 11.1.2.1 255.255.255.0
R1-65111(config-if)#exit

R1-65111(config)#interface loopback 3
R1-65111(config-if)#ip address 11.1.3.1 255.255.255.0
R1-65111(config-if)#exit

R1-65111(config)#interface loopback 4
R1-65111(config-if)#ip address 11.1.4.1 255.255.255.0
R1-65111(config-if)#exit
 
R1-65111#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            10.1.1.1        YES manual up                    up
Serial5/0                  12.1.1.1        YES manual up                    up
Serial5/2                  31.1.1.2        YES manual up                    up
Loopback1                  11.1.1.1        YES manual up                    up
Loopback2                  11.1.2.1        YES manual up                    up
Loopback3                  11.1.3.1        YES manual up                    up
Loopback4                  11.1.4.1        YES manual up                    up

 
 
R2-65111(config)#interface serial 5/0
R2-65111(config-if)#ip address 12.1.1.2 255.0.0.0
R2-65111(config-if)#no shutdown
R2-65111(config-if)#exit

R2-65111(config)#interface serial 5/1
R2-65111(config-if)#ip address 23.1.1.1 255.0.0.0
R2-65111(config-if)#no shutdown
R2-65111(config-if)#exit

R2-65111(config)#interface serial 6/0
R2-65111(config-if)#ip address 27.1.1.1 255.0.0.0
R2-65111(config-if)#no shutdown
R2-65111(config-if)#exit

R2-65111(config)#interface fastethernet 0/0
R2-65111(config-if)#ip address 20.1.1.1 255.0.0.0
R2-65111(config-if)#no shutdown
R2-65111(config-if)#no keepalive
R2-65111(config-if)#exit

R2-65111(config)#interface loopback 1
R2-65111(config-if)#ip address 22.1.1.1 255.255.255.0
R2-65111(config-if)#exit

R2-65111(config)#interface loopback 2
R2-65111(config-if)#ip address 22.1.2.1 255.255.255.0
R2-65111(config-if)#exit

R2-65111(config)#interface loopback 3
R2-65111(config-if)#ip address 22.1.3.1 255.255.255.0
R2-65111(config-if)#exit

R2-65111(config)#interface loopback 4
R2-65111(config-if)#ip address 22.1.4.1 255.255.255.0
R2-65111(config-if)#exit
 
R2-65111#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            20.1.1.1        YES manual up                    up
Serial5/0                  12.1.1.2        YES manual up                    up
Serial5/1                  23.1.1.1        YES manual up                    up
Serial6/0                  27.1.1.1        YES manual up                    down
Loopback1                  22.1.1.1        YES manual up                    up
Loopback2                  22.1.2.1        YES manual up                    up
Loopback3                  22.1.3.1        YES manual up                    up
Loopback4                  22.1.4.1        YES manual up                    up

 
 
R3-65111(config)#interface serial 5/2
R3-65111(config-if)#ip address 31.1.1.1 255.0.0.0
R3-65111(config-if)#no shutdown
R3-65111(config-if)#exit

R3-65111(config)#interface serial 5/1
R3-65111(config-if)#ip address 23.1.1.2 255.0.0.0
R3-65111(config-if)#no shutdown
R3-65111(config-if)#exit

R3-65111(config)#interface fastethernet 0/0
R3-65111(config-if)#ip address 30.1.1.1 255.0.0.0
R3-65111(config-if)#no shutdown
R3-65111(config-if)#no keepalive
R3-65111(config-if)#exit

R3-65111(config)#interface loopback 1
R3-65111(config-if)#ip address 33.1.1.1 255.255.255.0
R3-65111(config-if)#exit

R3-65111(config)#interface loopback 2
R3-65111(config-if)#ip address 33.1.2.1 255.255.255.0
R3-65111(config-if)#exit

R3-65111(config)#interface loopback 3
R3-65111(config-if)#ip address 33.1.3.1 255.255.255.0
R3-65111(config-if)#exit

R3-65111(config)#interface loopback 4
R3-65111(config-if)#ip address 33.1.4.1 255.255.255.0
R3-65111(config-if)#exit

R3-65111#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            30.1.1.1        YES manual up                    up
Serial5/1                  23.1.1.2        YES manual up                    up
Serial5/2                  31.1.1.1        YES manual up                    up
Loopback1                  33.1.1.1        YES manual up                    up
Loopback2                  33.1.2.1        YES manual up                    up
Loopback3                  33.1.3.1        YES manual up                    up
Loopback4                  33.1.4.1        YES manual up                    up

 
 

R1-65111(config)#router eigrp 100
R1-65111(config-router)#network 10.0.0.0
R1-65111(config-router)#network 12.0.0.0
R1-65111(config-router)#network 31.0.0.0
R1-65111(config-router)#network 11.1.1.0
R1-65111(config-router)#network 11.1.2.0
R1-65111(config-router)#network 11.1.3.0
R1-65111(config-router)#network 11.1.4.0
R1-65111(config-router)#no auto-summary
R1-65111(config-router)#exit

*Oct 25 09:16:24.171: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 12.1.1.2 (Serial5/0) is up: new adjacency
*Oct 25 09:17:07.495: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 31.1.1.1 (Serial5/2) is up: new adjacency
 
R1-65111#show ip eigrp neighbors
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   31.1.1.1                Se5/2             11 00:01:13   67   402  0  12
0   12.1.1.2                Se5/0             13 00:01:56   63   378  0  11


R1-65111#show 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
 
     33.0.0.0/24 is subnetted, 4 subnets
D       33.1.1.0 [90/2297856] via 31.1.1.1, 00:00:32, Serial5/2
D       33.1.2.0 [90/2297856] via 31.1.1.1, 00:00:32, Serial5/2
D       33.1.3.0 [90/2297856] via 31.1.1.1, 00:00:32, Serial5/2
D       33.1.4.0 [90/2297856] via 31.1.1.1, 00:00:32, Serial5/2
D    20.0.0.0/8 [90/2172416] via 12.1.1.2, 00:00:32, Serial5/0
D    23.0.0.0/8 [90/2681856] via 31.1.1.1, 00:00:32, Serial5/2

                [90/2681856] via 12.1.1.2, 00:00:32, Serial5/0
     22.0.0.0/24 is subnetted, 4 subnets
D       22.1.4.0 [90/2297856] via 12.1.1.2, 00:00:32, Serial5/0
D       22.1.3.0 [90/2297856] via 12.1.1.2, 00:00:32, Serial5/0
D       22.1.2.0 [90/2297856] via 12.1.1.2, 00:00:32, Serial5/0
D       22.1.1.0 [90/2297856] via 12.1.1.2, 00:00:32, Serial5/0

C    10.0.0.0/8 is directly connected, FastEthernet0/0
     11.0.0.0/24 is subnetted, 4 subnets
C       11.1.2.0 is directly connected, Loopback2
C       11.1.3.0 is directly connected, Loopback3
C       11.1.1.0 is directly connected, Loopback1
C       11.1.4.0 is directly connected, Loopback4
C    12.0.0.0/8 is directly connected, Serial5/0
C    31.0.0.0/8 is directly connected, Serial5/2
D    30.0.0.0/8 [90/2172416] via 31.1.1.1, 00:00:33, Serial5/2


R2-65111(config)#router eigrp 100
R2-65111(config-router)#network 20.0.0.0
R2-65111(config-router)#network 23.0.0.0
R2-65111(config-router)#network 22.1.1.0
R2-65111(config-router)#network 22.1.2.0
R2-65111(config-router)#network 22.1.3.0
R2-65111(config-router)#network 22.1.4.0
R2-65111(config-router)#no auto-summary
R2-65111(config-router)#exit

*Oct 25 09:17:24.751: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 23.1.1.2 (Serial5/1) is up: new adjacency
*Oct 25 09:15:57.215: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 12.1.1.1 (Serial5/0) is up: new adjacency


R2-65111#show ip eigrp neighbors
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   23.1.1.2                Se5/1             14 00:00:19   69   414  0  11
0   12.1.1.1                Se5/0             12 00:01:46   86   516  0  15

R2-65111#show ip route eigrp
     33.0.0.0/24 is subnetted, 4 subnets
D       33.1.1.0 [90/2297856] via 23.1.1.2, 00:03:42, Serial5/1
D       33.1.2.0 [90/2297856] via 23.1.1.2, 00:03:42, Serial5/1
D       33.1.3.0 [90/2297856] via 23.1.1.2, 00:03:42, Serial5/1
D       33.1.4.0 [90/2297856] via 23.1.1.2, 00:03:42, Serial5/1
D    10.0.0.0/8 [90/2172416] via 12.1.1.1, 00:03:42, Serial5/0
     11.0.0.0/24 is subnetted, 4 subnets
D       11.1.2.0 [90/2297856] via 12.1.1.1, 00:03:42, Serial5/0
D       11.1.3.0 [90/2297856] via 12.1.1.1, 00:03:42, Serial5/0
D       11.1.1.0 [90/2297856] via 12.1.1.1, 00:03:42, Serial5/0
D       11.1.4.0 [90/2297856] via 12.1.1.1, 00:03:42, Serial5/0
D    31.0.0.0/8 [90/2681856] via 23.1.1.2, 00:03:42, Serial5/1
                [90/2681856] via 12.1.1.1, 00:03:42, Serial5/0
D    30.0.0.0/8 [90/2172416] via 23.1.1.2, 00:03:42, Serial5/1


R3-65111(config)#router eigrp 100
R3-65111(config-router)#network 30.0.0.0
R3-65111(config-router)#network 23.0.0.0
R3-65111(config-router)#network 31.0.0.0
R3-65111(config-router)#network 33.1.1.0
R3-65111(config-router)#network 33.1.2.0
R3-65111(config-router)#network 33.1.3.0
R3-65111(config-router)#network 33.1.4.0
R3-65111(config-router)#no auto-summary
R3-65111(config-router)#exit

*Oct 25 09:11:31.735: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 31.1.1.2 (Serial5/2) is up: new adjacency
*Oct 25 09:12:15.815: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 23.1.1.1 (Serial5/1) is up: new adjacency


R3-65111#show ip eigrp neighbors
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   23.1.1.1                Se5/1             14 00:00:10   82   492  0  13
0   31.1.1.2                Se5/2             12 00:00:54  118   708  0  14

R3-65111#show ip route eigrp
D    20.0.0.0/8 [90/2172416] via 23.1.1.1, 00:07:38, Serial5/1
     22.0.0.0/24 is subnetted, 4 subnets
D       22.1.4.0 [90/2297856] via 23.1.1.1, 00:07:38, Serial5/1
D       22.1.3.0 [90/2297856] via 23.1.1.1, 00:07:38, Serial5/1
D       22.1.2.0 [90/2297856] via 23.1.1.1, 00:07:38, Serial5/1
D       22.1.1.0 [90/2297856] via 23.1.1.1, 00:07:38, Serial5/1
D    10.0.0.0/8 [90/2172416] via 31.1.1.2, 00:07:39, Serial5/2
     11.0.0.0/24 is subnetted, 4 subnets
D       11.1.2.0 [90/2297856] via 31.1.1.2, 00:07:39, Serial5/2
D       11.1.3.0 [90/2297856] via 31.1.1.2, 00:07:39, Serial5/2
D       11.1.1.0 [90/2297856] via 31.1.1.2, 00:07:39, Serial5/2
D       11.1.4.0 [90/2297856] via 31.1.1.2, 00:07:39, Serial5/2
D    12.0.0.0/8 [90/2681856] via 31.1.1.2, 00:07:39, Serial5/2
                [90/2681856] via 23.1.1.1, 00:07:39, Serial5/1

R1-65111(config)#router bgp 65111
R1-65111(config-router)#neighbor cisco peer-group
R1-65111(config-router)#neighbor cisco remote-as 65111
R1-65111(config-router)#neighbor cisco update-source loopback 1
R1-65111(config-router)#neighbor cisco version 4
R1-65111(config-router)#neighbor cisco password internetworks
R1-65111(config-router)#neighbor 22.1.1.1 peer-group cisco
R1-65111(config-router)#neighbor 33.1.1.1 peer-group cisco
R1-65111(config-router)#network 10.0.0.0
R1-65111(config-router)#network 11.1.1.0 mask 255.255.255.0
R1-65111(config-router)#network 11.1.2.0 mask 255.255.255.0
R1-65111(config-router)#network 11.1.3.0 mask 255.255.255.0
R1-65111(config-router)#network 11.1.4.0 mask 255.255.255.0
R1-65111(config-router)#no auto-summary
R1-65111(config-router)#no synchronization
R1-65111(config-router)#end
 
 
*Oct 25 09:33:08.767: %BGP-5-ADJCHANGE: neighbor 22.1.1.1 Up
*Oct 25 09:34:25.323: %BGP-5-ADJCHANGE: neighbor 33.1.1.1 Up

 
R1-65111#show ip bgp
BGP table version is 26, local router ID is 11.1.4.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
*> 10.0.0.0         0.0.0.0                  0         32768 i
*> 11.1.1.0/24      0.0.0.0                  0         32768 i
*> 11.1.2.0/24      0.0.0.0                  0         32768 i
*> 11.1.3.0/24      0.0.0.0                  0         32768 i
*> 11.1.4.0/24      0.0.0.0                  0         32768 i

r>i20.0.0.0         22.1.1.1                 0    100      0 i
r>i22.1.1.0/24      22.1.1.1                 0    100      0 i
r>i22.1.2.0/24      22.1.1.1                 0    100      0 i
r>i22.1.3.0/24      22.1.1.1                 0    100      0 i
r>i22.1.4.0/24      22.1.1.1                 0    100      0 i

r>i30.0.0.0         33.1.1.1                 0    100      0 i
r>i33.1.1.0/24      33.1.1.1                 0    100      0 i
r>i33.1.2.0/24      33.1.1.1                 0    100      0 i
r>i33.1.3.0/24      33.1.1.1                 0    100      0 i
r>i33.1.4.0/24      33.1.1.1                 0    100      0 I

 

(as you can see all the routes are exchange )

R1-65111# show ip bgp summary
BGP router identifier 11.1.4.1, local AS number 65111
BGP table version is 26, main routing table version 26
15 network entries using 1755 bytes of memory
15 path entries using 780 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 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 2907 total bytes of memory
BGP activity 15/0 prefixes, 15/0 paths, scan interval 60 secs
 
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
22.1.1.1        4 65111      17      16       26    0    0 00:08:58        5
33.1.1.1        4 65111      16      16       26    0    0 00:07:42        5

 
R2-65111(config)#router bgp 65111
R2-65111(config-router)#neighbor cisco peer-group
R2-65111(config-router)#neighbor cisco remote-as 65111
R2-65111(config-router)#neighbor cisco update-source loopback 1
R2-65111(config-router)#neighbor cisco version 4
R2-65111(config-router)#neighbor cisco password internetworks
R2-65111(config-router)#neighbor 11.1.1.1 peer-group cisco
R2-65111(config-router)#neighbor 33.1.1.1 peer-group cisco
R2-65111(config-router)#network 20.0.0.0
R2-65111(config-router)#network 22.1.1.0 mask 255.255.255.0
R2-65111(config-router)#network 22.1.2.0 mask 255.255.255.0
R2-65111(config-router)#network 22.1.3.0 mask 255.255.255.0
R2-65111(config-router)#network 22.1.4.0 mask 255.255.255.0
R2-65111(config-router)#no auto-summary
R2-65111(config-router)#no synchronization
R2-65111(config-router)#end
 
*Oct 25 09:32:29.263: %BGP-5-ADJCHANGE: neighbor 11.1.1.1 Up
*Oct 25 09:33:43.111: %BGP-5-ADJCHANGE: neighbor 33.1.1.1 Up



R3-65111(config)#router bgp 65111
R3-65111(config-router)#neighbor cisco peer-group
R3-65111(config-router)#neighbor cisco remote-as 65111
R3-65111(config-router)#neighbor cisco update-source loopback 1
R3-65111(config-router)#neighbor cisco version 4
R3-65111(config-router)#neighbor cisco password internetworks
R3-65111(config-router)#neighbor 11.1.1.1 peer-group cisco
R3-65111(config-router)#neighbor 22.1.1.1 peer-group cisco
R3-65111(config-router)#network 30.0.0.0
R3-65111(config-router)#network 33.1.1.0 mask 255.255.255.0
R3-65111(config-router)#network 33.1.2.0 mask 255.255.255.0
R3-65111(config-router)#network 33.1.3.0 mask 255.255.255.0
R3-65111(config-router)#network 33.1.4.0 mask 255.255.255.0
R3-65111(config-router)#no auto-summary
R3-65111(config-router)#no synchronization
R3-65111(config-router)#end
 
*Oct 25 09:28:23.019: %BGP-5-ADJCHANGE: neighbor 22.1.1.1 Up
*Oct 25 09:28:25.663: %BGP-5-ADJCHANGE: neighbor 11.1.1.1 Up

 

R1-65111#show ip bgp peer-group cisco
BGP peer-group is cisco,  remote AS 65111
  BGP version 4
  Default minimum time between advertisement runs is 0 seconds
 
 For address family: IPv4 Unicast
  BGP neighbor is cisco, peer-group internal, members:
  22.1.1.1 33.1.1.1

  Index 0, Offset 0, Mask 0x0
  Update messages formatted 0, replicated 0
  Number of NLRIs in the update sent: max 0, min 0

 


Topology:  PART TWO WEIGHT ATTRIBUTE 



Goal:- weight attribute- router 7 (AS 6544) wants to reach the network 66.1.1.1 router 6 (AS 65333) and R7 is using the path serial 5/2 67.1.1.1 because the path has less numbers of autonomous systems. but our requirement is router 7 (AS 6544) should use serial 5/3 74.1.1.0/8 to reach 66.1.1.1 via AS 65222. to accomplish this task we use the BGP weight attribute. 


  • configure the topology as per the diagram 
  • configure the IP addresses as per the topology
  • configure BGP in  AS65222 AS65333 AS 65444 advertise directly connected interfaces 
  • configure EBGP between router 2 and router 7/ router 6 and router 8
  • configure BGP next-hop in AS65222
  • configure BGP weight 20000 on router 7 
  • make sure to reach 66.1.1.1 network from router 7 should use 74.1.1.2 via AS 65222
  • make sure all the routers in AS 65222 65333 65444 65111 exchange routes and can ping



R4-65222(config)#interface serial 5/0
R4-65222(config-if)#ip address 45.1.1.1 255.0.0.0
R4-65222(config-if)#no shutdown
R4-65222(config-if)#exit
R4-65222(config)#interface serial 5/3
R4-65222(config-if)#ip address 74.1.1.2 255.0.0.0
R4-65222(config-if)#no shutdown
R4-65222(config-if)#exit

R4-65222(config)#interface fastethernet 0/0
R4-65222(config-if)#ip address 40.1.1.1 255.0.0.0
R4-65222(config-if)#no shutdown
R4-65222(config-if)#no keepalive
R4-65222(config-if)#exit

R4-65222(config)#interface loopback 1
R4-65222(config-if)#ip address 44.1.1.1 255.255.255.0
R4-65222(config-if)#exit
R4-65222(config)#interface loopback 2
R4-65222(config-if)#ip address 44.1.2.1 255.255.255.0
R4-65222(config-if)#exit
R4-65222(config)#interface loopback 3
R4-65222(config-if)#ip address 44.1.3.1 255.255.255.0
R4-65222(config-if)#exit
R4-65222(config)#interface loopback 4
R4-65222(config-if)#ip address 44.1.4.1 255.255.255.0
R4-65222(config-if)#exit

R4-65222#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            40.1.1.1        YES manual up                    up
Serial5/0                  45.1.1.1        YES manual up                    up
Serial5/3                  74.1.1.2        YES manual up                    up
Loopback1                  44.1.1.1        YES manual up                    up
Loopback2                  44.1.2.1        YES manual up                    up
Loopback3                  44.1.3.1        YES manual up                    up
Loopback4                  44.1.4.1        YES manual up                    up

 
 

R5-65222(config)#interface serial 5/0
R5-65222(config-if)#ip address 45.1.1.2 255.0.0.0
R5-65222(config-if)#no shutdown
R5-65222(config-if)#exit
R5-65222(config)#interface serial 5/1
R5-65222(config-if)#ip address 56.1.1.1 255.0.0.0
R5-65222(config-if)#no shutdown
R5-65222(config-if)#exit

R5-65222(config)#interface fastethernet 0/0
R5-65222(config-if)#ip address 50.1.1.1 255.0.0.0
R5-65222(config-if)#no shutdown
R5-65222(config-if)#no keepalive
R5-65222(config-if)#exit

R5-65222(config)#interface loopback 1
R5-65222(config-if)#ip address 55.1.1.1 255.255.255.0
R5-65222(config-if)#exit
R5-65222(config)#interface loopback 2
R5-65222(config-if)#ip address 55.1.2.1 255.255.255.0
R5-65222(config-if)#exit
R5-65222(config)#interface loopback 3
R5-65222(config-if)#ip address 55.1.3.1 255.255.255.0
R5-65222(config-if)#exit
R5-65222(config)#interface loopback 4
R5-65222(config-if)#ip address 55.1.4.1 255.255.255.0
R5-65222(config-if)#exit
 
R5-65222#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            50.1.1.1        YES manual up                    up
Serial5/0                  45.1.1.2        YES manual up                    up
Serial5/1                  56.1.1.1        YES manual up                    up
Loopback1                  55.1.1.1        YES manual up                    up
Loopback2                  55.1.2.1        YES manual up                    up
Loopback3                  55.1.3.1        YES manual up                    up
Loopback4                  55.1.4.1        YES manual up                    up

 
 
R6-65333(config)#interface serial 5/1
R6-65333(config-if)#ip address 56.1.1.2 255.0.0.0
R6-65333(config-if)#no shutdown
R6-65333(config-if)#exit
R6-65333(config)#interface serial 5/2
R6-65333(config-if)#ip address 67.1.1.1 255.0.0.0
R6-65333(config-if)#no shutdown
R6-65333(config-if)#exit

R6-65333(config)#interface fastethernet 0/0
R6-65333(config-if)#ip address 60.1.1.1 255.0.0.0
R6-65333(config-if)#no shutdown
R6-65333(config-if)#no keepalive
R6-65333(config-if)#exit

R6-65333(config)#interface loopback 1
R6-65333(config-if)#ip address 66.1.1.1 255.255.255.0
R6-65333(config-if)#exit
R6-65333(config)#interface loopback 2
R6-65333(config-if)#ip address 66.1.2.1 255.255.255.0
R6-65333(config-if)#exit
R6-65333(config)#interface loopback 3
R6-65333(config-if)#ip address 66.1.3.1 255.255.255.0
R6-65333(config-if)#exit
R6-65333(config)#interface loopback 4
R6-65333(config-if)#ip address 66.1.4.1 255.255.255.0
R6-65333(config-if)#exit
 
R6-65333#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            60.1.1.1        YES manual up                    up
Serial5/1                  56.1.1.2        YES manual up                    up
Serial5/2                  67.1.1.1        YES manual up                    up
Loopback1                  66.1.1.1        YES manual up                    up
Loopback2                  66.1.2.1        YES manual up                    up
Loopback3                  66.1.3.1        YES manual up                    up
Loopback4                  66.1.4.1        YES manual up                    up

 
 
 
R7-65444(config)#interface serial 5/2
R7-65444(config-if)#ip address 67.1.1.2 255.0.0.0
R7-65444(config-if)#no shutdown
R7-65444(config-if)#exit
R7-65444(config)#interface serial 5/3
R7-65444(config-if)#ip address 74.1.1.1 255.0.0.0
R7-65444(config-if)#no shutdown
R7-65444(config-if)#exit
R7-65444(config)#interface serial 6/0
R7-65444(config-if)#ip address 27.1.1.2 255.0.0.0
R7-65444(config-if)#no shutdown
R7-65444(config-if)#exit

R7-65222(config)#interface fastethernet 0/0
R7-65222(config-if)#ip address 70.1.1.1 255.0.0.0
R7-65222(config-if)#no shutdown
R7-65222(config-if)#no keepalive
R7-65222(config-if)#exit

R7-65444(config)#interface loopback 1
R7-65444(config-if)#ip address 77.1.1.1 255.255.255.0
R7-65444(config-if)#exit
R7-65444(config)#interface loopback 2
R7-65444(config-if)#ip address 77.1.2.1 255.255.255.0
R7-65444(config-if)#exit
R7-65444(config)#interface loopback 3
R7-65444(config-if)#ip address 77.1.3.1 255.255.255.0
R7-65444(config-if)#exit
R7-65444(config)#interface loopback 4
R7-65444(config-if)#ip address 77.1.4.1 255.255.255.0
R7-65444(config-if)#exit
R7-65444(config)#
 
R7-65222#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            70.1.1.1        YES manual up                    up
Serial5/2                  67.1.1.2        YES manual up                    up
Serial5/3                  74.1.1.1        YES manual up                    up
Serial6/0                  27.1.1.2        YES manual up                    up
Loopback1                  77.1.1.1        YES manual up                    up
Loopback2                  77.1.2.1        YES manual up                    up
Loopback3                  77.1.3.1        YES manual up                    up
Loopback4                  77.1.4.1        YES manual up                    up



R4-65222(config)#router bgp 65222
R4-65222(config-router)#neighbor 45.1.1.2 remote-as 65222
R4-65222(config-router)#neighbor 74.1.1.1 remote-as 65444
R4-65222(config-router)#neighbor 45.1.1.2 next-hop-self
R4-65222(config-router)#network 40.0.0.0
R4-65222(config-router)#network 45.0.0.0
R4-65222(config-router)#network 74.0.0.0
R4-65222(config-router)#network 44.1.1.0 mask 255.255.255.0
R4-65222(config-router)#network 44.1.2.0 mask 255.255.255.0
R4-65222(config-router)#network 44.1.3.0 mask 255.255.255.0
R4-65222(config-router)#network 44.1.4.0 mask 255.255.255.0
R4-65222(config-router)#no auto-summary
R4-65222(config-router)#no synchronization
R4-65222(config-router)#exit
 
*Oct 25 12:36:31.935: %BGP-5-ADJCHANGE: neighbor 45.1.1.2 Up
*Oct 25 12:44:12.475: %BGP-5-ADJCHANGE: neighbor 74.1.1.1 Up

R5-65222(config)#router bgp 65222
R5-65222(config-router)#neighbor 45.1.1.1 remote-as 65222
R5-65222(config-router)#neighbor 56.1.1.2 remote-as 65333
R5-65222(config-router)#neighbor 45.1.1.1 next-hop-self
R5-65222(config-router)#network 50.0.0.0
R5-65222(config-router)#network 45.0.0.0
R5-65222(config-router)#network 56.0.0.0
R5-65222(config-router)#network 55.1.1.0 mask 255.255.255.0
R5-65222(config-router)#network 55.1.2.0 mask 255.255.255.0
R5-65222(config-router)#network 55.1.3.0 mask 255.255.255.0
R5-65222(config-router)#network 55.1.4.0 mask 255.255.255.0
R5-65222(config-router)#no auto-summary
R5-65222(config-router)#no synchronization
R5-65222(config-router)#exit
 
*Oct 25 12:35:22.059: %BGP-5-ADJCHANGE: neighbor 45.1.1.1 Up
*Oct 25 12:41:08.903: %BGP-5-ADJCHANGE: neighbor 56.1.1.2 Up

R6-65333(config)#router bgp 65333
R6-65333(config-router)#neighbor 67.1.1.2 remote-as 65444
R6-65333(config-router)#neighbor 56.1.1.1 remote-as 65222
R6-65333(config-router)#network 60.0.0.0
R6-65333(config-router)#network 74.0.0.0
R6-65333(config-router)#network 56.0.0.0
R6-65333(config-router)#network 66.1.1.0 mask 255.255.255.0
R6-65333(config-router)#network 66.1.2.0 mask 255.255.255.0
R6-65333(config-router)#network 66.1.3.0 mask 255.255.255.0
R6-65333(config-router)#network 66.1.4.0 mask 255.255.255.0
R6-65333(config-router)#no auto-summary
R6-65333(config-router)#no synchronization
R6-65333(config-router)#exit

*Oct 25 12:40:08.759: %BGP-5-ADJCHANGE: neighbor 56.1.1.1 Up
*Oct 25 12:42:19.959: %BGP-5-ADJCHANGE: neighbor 67.1.1.2 Up

R7-65444(config)#router bgp 65444
R7-65444(config-router)#neighbor 74.1.1.2 remote-as 65222
R7-65444(config-router)#neighbor 67.1.1.1 remote-as 65333
R7-65444(config-router)#neighbor 27.1.1.1 remote-as 65111
R7-65444(config-router)#network 70.0.0.0
R7-65444(config-router)#network 74.0.0.0
R7-65444(config-router)#network 67.0.0.0
R7-65444(config-router)#network 77.1.1.0 mask 255.255.255.0
R7-65444(config-router)#network 77.1.2.0 mask 255.255.255.0
R7-65444(config-router)#network 77.1.3.0 mask 255.255.255.0
R7-65444(config-router)#network 77.1.4.0 mask 255.255.255.0
R7-65444(config-router)#no auto-summary
R7-65444(config-router)#no synchronization
R7-65444(config-router)#exit

*Oct 25 12:42:59.635: %BGP-5-ADJCHANGE: neighbor 27.1.1.1 Up
*Oct 25 12:39:02.319: %BGP-5-ADJCHANGE: neighbor 74.1.1.2 Up
*Oct 25 12:39:19.899: %BGP-5-ADJCHANGE: neighbor 67.1.1.1 Up


R2-65111(config)#router bgp 65111
R2-65111(config-router)#neighbor 27.1.1.2 remote-as 65444
R2-65111(config-router)#exit

*Oct 25 12:56:30.379: %BGP-5-ADJCHANGE: neighbor 27.1.1.2 Up


R4-65222#show ip bgp
BGP table version is 50, local router ID is 44.1.4.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
*> 10.0.0.0         74.1.1.1                               0 65444 65111 i
*> 11.1.1.0/24      74.1.1.1                               0 65444 65111 i
*> 11.1.2.0/24      74.1.1.1                               0 65444 65111 i
*> 11.1.3.0/24      74.1.1.1                               0 65444 65111 i
*> 11.1.4.0/24      74.1.1.1                               0 65444 65111 i
*> 20.0.0.0         74.1.1.1                               0 65444 65111 i
*> 22.1.1.0/24      74.1.1.1                               0 65444 65111 i
*> 22.1.2.0/24      74.1.1.1                               0 65444 65111 i
*> 22.1.3.0/24      74.1.1.1                               0 65444 65111 i
*> 22.1.4.0/24      74.1.1.1                               0 65444 65111 i
*> 30.0.0.0         74.1.1.1                               0 65444 65111 i
*> 33.1.1.0/24      74.1.1.1                               0 65444 65111 i
*> 33.1.2.0/24      74.1.1.1                               0 65444 65111 i
*> 33.1.3.0/24      74.1.1.1                               0 65444 65111 i
*> 33.1.4.0/24      74.1.1.1                               0 65444 65111 i
*> 40.0.0.0         0.0.0.0                  0         32768 i
*> 44.1.1.0/24      0.0.0.0                  0         32768 i
*> 44.1.2.0/24      0.0.0.0                  0         32768 i
*> 44.1.3.0/24      0.0.0.0                  0         32768 i
*> 44.1.4.0/24      0.0.0.0                  0         32768 i
* i45.0.0.0         45.1.1.2                 0    100      0 i
*>i50.0.0.0         45.1.1.2                 0    100      0 i
*>i55.1.1.0/24      45.1.1.2                 0    100      0 i
*>i55.1.2.0/24      45.1.1.2                 0    100      0 i
*>i55.1.3.0/24      45.1.1.2                 0    100      0 i
*>i55.1.4.0/24      45.1.1.2                 0    100      0 i
*>i56.0.0.0         45.1.1.2                 0    100      0 i
*  60.0.0.0         74.1.1.1                               0 65444 65333 i
*>i                 45.1.1.2                 0    100      0 65333 i
*  66.1.1.0/24      74.1.1.1                               0 65444 65333 i
*>i                 45.1.1.2                 0    100      0 65333 i
*  66.1.2.0/24      74.1.1.1                               0 65444 65333 i
*>i                 45.1.1.2                 0    100      0 65333 i
*  66.1.3.0/24      74.1.1.1                               0 65444 65333 i
*>i                 45.1.1.2                 0    100      0 65333 i
*  66.1.4.0/24      74.1.1.1                               0 65444 65333 i
*>i                 45.1.1.2                 0    100      0 65333 i
*> 67.0.0.0         74.1.1.1                 0             0 65444 i
*> 70.0.0.0         74.1.1.1                 0             0 65444 i
*  74.0.0.0         74.1.1.1                 0             0 65444 i
*>                  0.0.0.0                  0         32768 i
*> 77.1.1.0/24      74.1.1.1                 0             0 65444 i
*> 77.1.2.0/24      74.1.1.1                 0             0 65444 i
*> 77.1.3.0/24      74.1.1.1                 0             0 65444 i
*> 77.1.4.0/24      74.1.1.1                 0             0 65444 I

(from the above output you see all routes from AS 65111-65222-6533-6544 are in the R4 routing table)

R7-65444#show ip route 60.1.1.1
Routing entry for 60.0.0.0/8
  Known via "bgp 65444", distance 20, metric 0
  Tag 65333, type external
  Last update from 67.1.1.1 00:37:20 ago
  Routing Descriptor Blocks:
  * 67.1.1.1, from 67.1.1.1, 00:37:20 ago
      Route metric is 0, traffic share count is 1
      AS Hops 1
      Route tag 65333








R7-65444#traceroute 60.1.1.1

Type escape sequence to abort.
Tracing the route to 60.1.1.1

  1 67.1.1.1 56 msec 76 msec 32 msec

(to reach 60.1.1.0 & 66.1.1.0 networks router 7 is going through 67.1.1.1/8 because this route has fewer autonomous systems and by default, BGP uses fewer AS to reach the network but our requirement is to reach 60.1.1.1 and 66.1.0.0 network. router 7 should use the long path meaning AS 6522-65333. with the help of the weight attribute, we do the path manipulation)


R7-65444(config-router)#router bgp 65444
R7-65444(config-router)#neighbor 74.1.1.2 weight 20000
R7-65444(config-router)#exit
R7-65444(config)#exit

R7-65444#clear ip bgp * soft


R7-65444#traceroute 60.1.1.1
Type escape sequence to abort.
Tracing the route to 60.1.1.1

  1 74.1.1.2 56 msec 32 msec 32 msec
  2 45.1.1.2 [AS 65222] 28 msec 64 msec 88 msec
  3 56.1.1.2 [AS 65222] 80 msec 92 msec 92 msec






Topology:- PART THREE LOCAL PREFERENCE



Goal: 

  • configure the topology as per the diagram 
  • configure the IP addresses as per the topology
  • configure BGP and advertise directly connecter networks in AS 65666 6577 6555
  • configure BGP next-hop in AS 6555
  • configure EBGP Between AS 65333 65666 and AS 6577 6516
  • configure access-list + route-map and configure local preference 500 
  • make sure router 8 should use the 89.1.1.1 route to reach any network (via AS 6577)
  • verify that all routes from ASs 65111 65222 65333 65444 6555 6577 exchange and can ping.
(in case routes are not exchanged use the network mask in BGP)

R8-AS65666(config)#interface serial 6/0
R8-AS65666(config-if)#ip address 86.1.1.1 255.0.0.0
R8-AS65666(config-if)#no shutdown
R8-AS65666(config-if)#exit

R8-AS65666(config)#interface serial 5/1
R8-AS65666(config-if)#ip address 89.1.1.1 255.0.0.0
R8-AS65666(config-if)#no shutdown
R8-AS65666(config-if)#exit

R8-AS65666(config)#interface serial 5/0
R8-AS65666(config-if)#ip address 108.1.1.2 255.0.0.0
R8-AS65666(config-if)#no shutdown
R8-AS65666(config-if)#exit

R8-AS65666(config)#interface fastethernet 0/0
R8-AS65666(config-if)#ip address 80.1.1.1 255.0.0.0
R8-AS65666(config-if)#no shutdown
R8-AS65666(config-if)#no keepalive
R8-AS65666(config-if)#exit

R8-AS65666(config)#interface loopback 1
R8-AS65666(config-if)#ip address 88.1.1.1 255.255.255.0
R8-AS65666(config-if)#exit
R8-AS65666(config)#interface loopback 2
R8-AS65666(config-if)#ip address 88.1.2.1 255.255.255.0
R8-AS65666(config-if)#exit
R8-AS65666(config)#interface loopback 3
R8-AS65666(config-if)#ip address 88.1.3.1 255.255.255.0
R8-AS65666(config-if)#exit
R8-AS65666(config)#interface loopback 4
R8-AS65666(config-if)#ip address 88.1.4.1 255.255.255.0
R8-AS65666(config-if)#exit
 
 
R8-AS65666#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            80.1.1.1        YES manual up                    up
Serial5/0                  108.1.1.2       YES manual up                    up
Serial5/1                  89.1.1.1        YES manual up                    up
Serial6/0                  86.1.1.1        YES manual up                    up
Loopback1                  88.1.1.1        YES manual up                    up
Loopback2                  88.1.2.1        YES manual up                    up
Loopback3                  88.1.3.1        YES manual up                    up
Loopback4                  88.1.4.1        YES manual up                    up

 




R9-65777(config)#interface serial 5/1
R9-65777(config-if)#ip address 89.1.1.2 255.0.0.0
R9-65777(config-if)#no shutdown
R9-65777(config-if)#exit

R9-65777(config)#interface serial 5/2
R9-65777(config-if)#ip address 91.1.1.1 255.0.0.0
R9-65777(config-if)#no shutdown
R9-65777(config-if)#exit

R9-65777(config)#interface fastethernet 0/0
R9-65777(config-if)#ip address 90.1.1.1 255.0.0.0
R9-65777(config-if)#no shutdown
R9-65777(config-if)#no keepalive
R9-65777(config-if)#exit

R9-6577(config)# interface serial 6/1
R9-6577(config-if)#ip address 96.1.1.1 255.0.0.0
R9-6577(config-if)#no shutdown
R9-6577(config-if)#exit

R9-65777(config)#interface loopback 1
R9-65777(config-if)#ip address 99.1.1.1 255.255.255.0
R9-65777(config-if)#exit
R9-65777(config)#interface loopback 2
R9-65777(config-if)#ip address 99.1.2.1 255.255.255.0
R9-65777(config-if)#exit
R9-65777(config)#interface loopback 3
R9-65777(config-if)#ip address 99.1.3.1 255.255.255.0
R9-65777(config-if)#exit
R9-65777(config)#interface loopback 4
R9-65777(config-if)#ip address 99.1.4.1 255.255.255.0
R9-65777(config-if)#exit
 
R9-65777#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            90.1.1.1        YES manual up                    up
Serial5/1                  89.1.1.2        YES manual up                    up
Serial5/2                  91.1.1.1        YES manual up                    up
Loopback1                  99.1.1.1        YES manual up                    up
Loopback2                  99.1.2.1        YES manual up                    up
Loopback3                  99.1.3.1        YES manual up                    up
Loopback4                  99.1.4.1        YES manual up                    up

 


R11-65555(config)#interface serial 5/3
R11-65555(config-if)#ip address 110.1.1.1 255.0.0.0
R11-65555(config-if)#no shutdown
R11-65555(config-if)#exit

R11-65555(config)#interface serial 5/2
R11-65555(config-if)#ip address 91.1.1.2 255.0.0.0
R11-65555(config-if)#no shutdown
R11-65555(config-if)#exit

R11-65555(config)#interface loopback 1
R11-65555(config-if)#ip address 111.1.1.1 255.255.255.0
R11-65555(config-if)#exit
R11-65555(config)#interface loopback 2
R11-65555(config-if)#ip address 111.1.2.1 255.255.255.0
R11-65555(config-if)#exit
R11-65555(config)#interface loopback 3
R11-65555(config-if)#ip address 111.1.3.1 255.255.255.0
R11-65555(config-if)#exit
R11-65555(config)#interface loopback 4
R11-65555(config-if)#ip address 111.1.4.1 255.255.255.0
R11-65555(config-if)#exit
 
R11-65555#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
Serial5/2                  91.1.1.2        YES manual up                    up
Serial5/3                  110.1.1.1       YES manual up                    up
Loopback1                  111.1.1.1       YES manual up                    up
Loopback2                  111.1.2.1       YES manual up                    up
Loopback3                  111.1.3.1       YES manual up                    up
Loopback4                  111.1.4.1       YES manual up                    up

 

R10-65555(config)#interface serial 5/3
R10-65555(config-if)#ip address 110.1.1.2 255.0.0.0
R10-65555(config-if)#no shutdown
R10-65555(config-if)#exit

R10-65555(config)#interface fastethernet 0/0
R10-65555(config-if)#ip address 100.1.1.1 255.0.0.0
R10-65555(config-if)#no shutdown
R10-65555(config-if)#no keepalive
R10-65555(config-if)#exit

R10-65555(config)#interface serial 5/0
R10-65555(config-if)#ip address 108.1.1.1 255.0.0.0
R10-65555(config-if)#no shutdown
R10-65555(config-if)#exit

R10-65555(config)#interface loopback 1
R10-65555(config-if)#ip address 101.1.1.1 255.255.255.0
R10-65555(config-if)#exit
R10-65555(config)#interface loopback 2
R10-65555(config-if)#ip address 101.1.2.1 255.255.255.0
R10-65555(config-if)#exit
R10-65555(config)#interface loopback 3
R10-65555(config-if)#ip address 101.1.3.1 255.255.255.0
R10-65555(config-if)#exit
R10-65555(config)#interface loopback 4
R10-65555(config-if)#ip address 101.1.4.1 255.255.255.0
R10-65555(config-if)#exit




R10-65555#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            100.1.1.1       YES manual up                    up
Serial5/0                  108.1.1.1       YES manual up                    up
Serial5/3                  110.1.1.2       YES manual up                    up
Loopback1                  101.1.1.1       YES manual up                    up
Loopback2                  101.1.2.1       YES manual up                    up
Loopback3                  101.1.3.1       YES manual up                    up
Loopback4                  101.1.4.1       YES manual up                    up

 
 
R6-65222(config)#interface serial 6/0
R6-65222(config-if)#ip address 86.1.1.2 255.0.0.0
R6-65222(config-if)#no shutdown
R6-65222(config-if)#exit



R6-65222(config)#router bgp 65333
R6-65222(config-router)#neighbo 86.1.1.1 remote-as 6566
 
 
R8-6566(config)#router bgp 6566
R8-6566(config-router)#neighbor 89.1.1.2 remote-as 6577
R8-6566(config-router)#neighbor 108.1.1.1 remote-as 6555
R8-6566(config-router)#neighbor 86.1.1.2 remote-as 65333
R8-6566(config-router)#network 89.0.0.0
R8-6566(config-router)#network 108.0.0.0
R8-6566(config-router)#network 86.0.0.0
R8-6566(config-router)#network 88.1.1.0 mask 255.255.255.0
R8-6566(config-router)#network 88.1.2.0 mask 255.255.255.0
R8-6566(config-router)#network 88.1.3.0 mask 255.255.255.0
R8-6566(config-router)#network 88.1.4.0 mask 255.255.255.0
R8-6566(config-router)#no synchronization
R8-6566(config-router)#no auto-summary
R8-6566(config-router)#exit


*Oct 25 15:56:31.331: %BGP-5-ADJCHANGE: neighbor 89.1.1.2 Up
*Oct 25 16:05:38.779: %BGP-5-ADJCHANGE: neighbor 108.1.1.1 Up

 
 
R8-6566#show ip bgp summary
BGP router identifier 88.1.4.1, local AS number 6566
BGP table version is 71, main routing table version 71
61 network entries using 7137 bytes of memory
78 path entries using 4056 bytes of memory
11/8 BGP path/bestpath attribute entries using 1364 bytes of memory
8 BGP AS-PATH entries using 192 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 12749 total bytes of memory
BGP activity 61/0 prefixes, 78/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
86.1.1.2        4 65333      15      15       71    0    0 00:03:36       39
89.1.1.2        4  6577      34      36       71    0    0 00:22:15       16
108.1.1.1       4  6555      26      32       71    0    0 00:13:07       16

 
 
 
R9-6577(config)#router bgp 6577
R9-6577(config-router)#neighbor 89.1.1.1 remote-as 6566
R9-6577(config-router)#neighbor 91.1.1.2 remote-as 6555
R9-6577(config-router)#neighbor 96.1.1.2 remote-as 6516
R9-6577(config-router)#network 89.0.0.0
R9-6577(config-router)#network 91.0.0.0
R9-6577(config-router)#network 90.0.0.0
R9-6577(config-router)#network 99.1.1.0 mask 255.255.255.0
R9-6577(config-router)#network 99.1.2.0 mask 255.255.255.0
R9-6577(config-router)#network 99.1.3.0 mask 255.255.255.0
R9-6577(config-router)#network 99.1.4.0 mask 255.255.255.0
R9-6577(config-router)#no synchronization
R9-6577(config-router)#no auto-summary
R9-6577(config-router)#exit
 
*Oct 25 15:54:20.887: %BGP-5-ADJCHANGE: neighbor 89.1.1.1 Up
*Oct 25 15:58:10.275: %BGP-5-ADJCHANGE: neighbor 91.1.1.2 Up

 
R9-6577#show ip bgp summary
BGP router identifier 99.1.4.1, local AS number 6577
BGP table version is 23, main routing table version 23
22 network entries using 2574 bytes of memory
39 path entries using 2028 bytes of memory
7/4 BGP path/bestpath attribute entries using 868 bytes of memory
4 BGP AS-PATH entries using 96 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 5566 total bytes of memory
BGP activity 22/0 prefixes, 39/0 paths, scan interval 60 secs
 
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
89.1.1.1        4  6566      23      22       23    0    0 00:14:00       16
91.1.1.2        4  6555      17      18       23    0    0 00:10:11       16

 
R11-6555(config)#router bgp 6555
R11-6555(config-router)#neighbor 110.1.1.2 remote-as 6555
R11-6555(config-router)#neighbor 91.1.1.1 remote-as 6577
R11-6555(config-router)#neighbor 110.1.1.2 next-hop-self
R11-6555(config-router)#network 110.0.0.0
R11-6555(config-router)#network 91.0.0.0
R11-6555(config-router)#network 111.1.1.0 mask 255.255.255.0
R11-6555(config-router)#network 111.1.2.0 mask 255.255.255.0
R11-6555(config-router)#network 111.1.3.0 mask 255.255.255.0
R11-6555(config-router)#network 111.1.4.0 mask 255.255.255.0
R11-6555(config-router)#no synchronization
R11-6555(config-router)#no auto-summary
R11-6555(config-router)#exit

*Oct 25 16:00:27.055: %BGP-5-ADJCHANGE: neighbor 110.1.1.2 Up
*Oct 25 15:56:57.763: %BGP-5-ADJCHANGE: neighbor 91.1.1.1 Up

 
 
R11-6555#show ip bgp summary
BGP router identifier 111.1.4.1, local AS number 6555
BGP table version is 29, main routing table version 29
22 network entries using 2574 bytes of memory
31 path entries using 1612 bytes of memory
6/4 BGP path/bestpath attribute entries using 744 bytes of memory
3 BGP AS-PATH entries using 72 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 5002 total bytes of memory
BGP activity 22/0 prefixes, 31/0 paths, scan interval 60 secs
 
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
91.1.1.1        4  6577      18      17       29    0    0 00:10:57       13
110.1.1.2       4  6555      13      16       29    0    0 00:07:28       12

 
 
R10-65555(config)# router bgp 6555
R10-65555(config-router)#neighbor 110.1.1.1 remote-as 6555
R10-65555(config-router)#neighbor 108.1.1.2 remote-as 6566
R10-65555(config-router)#neighbor 110.1.1.1 next-hop-self
R10-65555(config-router)#network 110.0.0.0
R10-65555(config-router)#network 108.0.0.0
R10-65555(config-router)#network 101.1.1.0 mask 255.255.255.0
R10-65555(config-router)#network 101.1.2.0 mask 255.255.255.0
R10-65555(config-router)#network 101.1.3.0 mask 255.255.255.0
R10-65555(config-router)#network 101.1.4.0 mask 255.255.255.0
R10-65555(config-router)#no synchronization
R10-65555(config-router)#no auto-summary
R10-65555(config-router)#exit
 
*Oct 25 15:59:18.495: %BGP-5-ADJCHANGE: neighbor 108.1.1.2 Up
*Oct 25 15:57:27.007: %BGP-5-ADJCHANGE: neighbor 110.1.1.1 Up



R10-65555#show ip bgp summary
BGP router identifier 101.1.4.1, local AS number 6555
BGP table version is 29, main routing table version 29
22 network entries using 2574 bytes of memory
31 path entries using 1612 bytes of memory
6/4 BGP path/bestpath attribute entries using 744 bytes of memory
3 BGP AS-PATH entries using 72 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 5002 total bytes of memory
BGP activity 22/0 prefixes, 37/6 paths, scan interval 60 secs
 
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
108.1.1.2       4  6566      22      20       29    0    0 00:07:19       13
110.1.1.1       4  6555      18      15       29    0    0 00:09:10       12

 
R10-65555#show ip bgp
BGP table version is 68, local router ID is 101.1.4.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
*> 10.0.0.0         108.1.1.2                              0 6566 65333 65444 65111 i
*> 11.1.1.0/24      108.1.1.2                              0 6566 65333 65444 65111 i
*> 11.1.2.0/24      108.1.1.2                              0 6566 65333 65444 65111 i
*> 11.1.3.0/24      108.1.1.2                              0 6566 65333 65444 65111 i
*> 11.1.4.0/24      108.1.1.2                              0 6566 65333 65444 65111 i

*> 20.0.0.0         108.1.1.2                              0 6566 65333 65444 65111 i
*> 22.1.1.0/24      108.1.1.2                              0 6566 65333 65444 65111 i
*> 22.1.2.0/24      108.1.1.2                              0 6566 65333 65444 65111 i
*> 22.1.3.0/24      108.1.1.2                              0 6566 65333 65444 65111 i
*> 22.1.4.0/24      108.1.1.2                              0 6566 65333 65444 65111 i

*> 30.0.0.0         108.1.1.2                              0 6566 65333 65444 65111 i
*> 33.1.1.0/24      108.1.1.2                              0 6566 65333 65444 65111 i
*> 33.1.2.0/24      108.1.1.2                              0 6566 65333 65444 65111 i
*> 33.1.3.0/24      108.1.1.2                              0 6566 65333 65444 65111 i
*> 33.1.4.0/24      108.1.1.2                              0 6566 65333 65444 65111 i

*> 40.0.0.0         108.1.1.2                              0 6566 65333 65222 i
*> 44.1.1.0/24      108.1.1.2                              0 6566 65333 65222 i
*> 44.1.2.0/24      108.1.1.2                              0 6566 65333 65222 i
*> 44.1.3.0/24      108.1.1.2                              0 6566 65333 65222 i
*> 44.1.4.0/24      108.1.1.2                              0 6566 65333 65222 i
*> 45.0.0.0         108.1.1.2                              0 6566 65333 65222 i

*> 50.0.0.0         108.1.1.2                              0 6566 65333 65222 i
*> 55.1.1.0/24      108.1.1.2                              0 6566 65333 65222 i
*> 55.1.2.0/24      108.1.1.2                              0 6566 65333 65222 i
*> 55.1.3.0/24      108.1.1.2                              0 6566 65333 65222 i
*> 55.1.4.0/24      108.1.1.2                              0 6566 65333 65222 i

*> 56.0.0.0         108.1.1.2                              0 6566 65333 i
*> 60.0.0.0         108.1.1.2                              0 6566 65333 i
*> 66.1.1.0/24      108.1.1.2                              0 6566 65333 i
*> 66.1.2.0/24      108.1.1.2                              0 6566 65333 i
*> 66.1.3.0/24      108.1.1.2                              0 6566 65333 i
*> 66.1.4.0/24      108.1.1.2                              0 6566 65333 i

*> 67.0.0.0         108.1.1.2                              0 6566 65333 65444 i
*> 70.0.0.0         108.1.1.2                              0 6566 65333 65444 i
*> 74.0.0.0         108.1.1.2                              0 6566 65333 65222 i
*> 77.1.1.0/24      108.1.1.2                              0 6566 65333 65444 i
*> 77.1.2.0/24      108.1.1.2                              0 6566 65333 65444 i
*> 77.1.3.0/24      108.1.1.2                              0 6566 65333 65444 i
*> 77.1.4.0/24      108.1.1.2                              0 6566 65333 65444 i

*> 86.0.0.0         108.1.1.2                0             0 6566 i
*> 88.1.1.0/24      108.1.1.2                0             0 6566 i
*> 88.1.2.0/24      108.1.1.2                0             0 6566 i
*> 88.1.3.0/24      108.1.1.2                0             0 6566 i
*> 88.1.4.0/24      108.1.1.2                0             0 6566 i
*> 89.0.0.0         108.1.1.2                0             0 6566 i

* i                 110.1.1.1                0    100      0 6577 i
*  90.0.0.0         108.1.1.2                              0 6566 6577 i
*>i                 110.1.1.1                0    100      0 6577 i
*  91.0.0.0         108.1.1.2                              0 6566 6577 i
*>i                 110.1.1.1                0    100      0 i
*  99.1.1.0/24      108.1.1.2                              0 6566 6577 i
*>i                 110.1.1.1                0    100      0 6577 i
*  99.1.2.0/24      108.1.1.2                              0 6566 6577 i
*>i                 110.1.1.1                0    100      0 6577 i
*  99.1.3.0/24      108.1.1.2                              0 6566 6577 i
*>i                 110.1.1.1                0    100      0 6577 i
*  99.1.4.0/24      108.1.1.2                              0 6566 6577 i

*>i                 110.1.1.1                0    100      0 6577 i
*> 101.1.1.0/24     0.0.0.0                  0         32768 i
*> 101.1.2.0/24     0.0.0.0                  0         32768 i
*> 101.1.3.0/24     0.0.0.0                  0         32768 i
*> 101.1.4.0/24     0.0.0.0                  0         32768 i

*  108.0.0.0        108.1.1.2                0             0 6566 i
*>                  0.0.0.0                  0         32768 i
* i110.0.0.0        110.1.1.1                0    100      0 i
*>                  0.0.0.0                  0         32768 i
*>i111.1.1.0/24     110.1.1.1                0    100      0 i
*>i111.1.2.0/24     110.1.1.1                0    100      0 i
*>i111.1.3.0/24     110.1.1.1                0    100      0 i
*>i111.1.4.0/24     110.1.1.1                0    100      0 I

(as you can see router-8 is having all the routes from all the ASs)

R8-6566#show ip bgp 111.1.1.1
BGP routing table entry for 111.1.1.0/24, version 27
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  6555
    108.1.1.1 from 108.1.1.1 (101.1.4.1)
      Origin IGP, localpref 100, valid, external, best
  6577 6555
    89.1.1.2 from 89.1.1.2 (99.1.4.1)
      Origin IGP, localpref 100, valid, external


R8-6566#traceroute 111.1.1.1

Type escape sequence to abort.
Tracing the route to 111.1.1.1

  1 108.1.1.1 60 msec 32 msec 32 msec
  2 110.1.1.1 [AS 6555] 64 msec 32 msec 100 msec


(To reach 111.1.1.0/24 network router 8 is using 108.1.1.1 network (AS 6555) path because it has fewer numbers of an autonomous system. but as per our requirement, we need a router to use the 89.1.1.1/24 interface to reach all the networks, to manipulate the path we use local_pref)


R8-6566(config)#access-list 11 permit 111.1.1.0 255.0.0.0
R8-6566(config)#access-list 11 permit 111.1.2.0 255.0.0.0
R8-6566(config)#access-list 11 permit 111.1.3.0 255.0.0.0
R8-6566(config)#access-list 11 permit 111.1.4.0 255.0.0.0
R8-6566(config)#route-map local-pref permit 11
R8-6566(config-route-map)#match ip address 11
R8-6566(config-route-map)#set local-preference 5000
R8-6566(config-route-map)#exit

R8-6566(config)#route-map local-pref permit 12
R8-6566(config-route-map)#exit



R8-6566(config)#router bgp 6566
R8-6566(config-router)#neighbor 89.1.1.2 route-map local-pref in
R8-6566(config-router)#exit

R8-6566(config)#do clear ip bgp * soft
R8-6566(config)#end



R8-6566#show ip bgp 111.1.1.1
BGP routing table entry for 111.1.1.0/24, version 162
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
  Advertised to update-groups:
     1
  6555
    108.1.1.1 from 108.1.1.1 (101.1.4.1)
      Origin IGP, localpref 100, valid, external
  6577 6555
    89.1.1.2 from 89.1.1.2 (99.1.4.1)
      Origin IGP, localpref 5000, valid, external, best


R8-6566#traceroute 111.1.1.1

Type escape sequence to abort.
Tracing the route to 111.1.1.1

  1 89.1.1.2 28 msec 48 msec 16 msec
  2 91.1.1.2 [AS 6555] 64 msec 88 msec 64 msec






Topology: PART FOUR BGP MED + compare MED





Goal: understanding MED or BGP metric. router 13 wants to reach the 122.1.1.1 network and to reach this network router 13 is using serial 5/2 123.1.1.1 because this route has less number of autonomous systems. but our requirement is router 13 should use serial 5/3 135.1.1.2/8 route via AS 6515 6516 6542. so we use MED or metric and we one more requiremt the return traffic from 122.1.1.1 or any also use the same path the way it exits from AS 6513. to do that we ignore AS-PATH and compare MED. 

  • configure the topology as per the diagram 
  • configure the IP addresses as per the topology 
  • configure BGP AS 6513 AS 6515 AS 6516 AS 6542
  • advertise directly connected network 
  • make sure all the routes are exchanged from AS 65111 65222 65333 65444 65666 6555 6577  6513 AS 6515 AS 6516 AS 6542
  • configure weight and configure MED 
  • ignore best-path AS-path
  • make sure the router 13 can reach the network 122.1.1.1 via AS 6515 6516 6542 and return traffic will also use the same path
(if you like this lab please subscribe to our YouTube channel https://www.youtube.com/@internetworkss






R16-6516(config)#interface serial 5/0
R16-6516(config-if)#ip address 164.1.1.1 255.0.0.0
R16-6516(config-if)#no shutdown
R16-6516(config-if)#exit

R16-6516(config)#interface fastethernet 0/0
R16-6516(config-if)#ip address 160.1.1.1 255.0.0.0
R16-6516(config-if)#no shutdown
R16-6516(config-if)#no keepalive
R16-6516(config-if)#exit

R16-6516(config)#interface serial 6/0
R16-6516(config-if)#ip address 165.1.1.2 255.0.0.0
R16-6516(config-if)#no shutdown
R16-6516(config-if)#exit

R16-6516(config)#interface serial 6/1
R16-6516(config-if)#ip address 96.1.1.2 255.0.0.0
R16-6516(config-if)#no shutdown
R16-6516(config-if)#exit

R16-6516(config)#interface loopback 1
R16-6516(config-if)#ip address 166.1.1.1 255.255.255.0
R16-6516(config-if)#exit
R16-6516(config)#interface loopback 2
R16-6516(config-if)#ip address 166.1.2.1 255.255.255.0
R16-6516(config-if)#exit
R16-6516(config)#interface loopback 3
R16-6516(config-if)#ip address 166.1.3.1 255.255.255.0
R16-6516(config-if)#exit
R16-6516(config)#interface loopback 4
R16-6516(config-if)#ip address 166.1.4.1 255.255.255.0
R16-6516(config-if)#exit
 
R16-6516#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            160.1.1.1       YES manual up                    up
Serial5/0                  164.1.1.1       YES manual up                    up
Serial6/0                  165.1.1.2       YES manual up                    up
Serial6/1                  96.1.1.2        YES manual up                    down
Loopback1                  166.1.1.1       YES manual up                    up
Loopback2                  166.1.2.1       YES manual up                    up
Loopback3                  166.1.3.1       YES manual up                    up
Loopback4                  166.1.4.1       YES manual up                    up

 
 
 
 
 
R14-6542(config)#interface serial 5/0
R14-6542(config-if)#ip address 164.1.1.2 255.0.0.0
R14-6542(config-if)#no shutdown
R14-6542(config-if)#exit

R14-6542(config)#interface fastethernet 0/0
R14-6542(config-if)#ip address 140.1.1.1 255.0.0.0
R14-6542(config-if)#no shutdown
R14-6542(config-if)#no keepalive
R14-6542(config-if)#exit

R14-6542(config)#interface serial 5/1
R14-6542(config-if)#ip address 142.1.1.1 255.0.0.0
R14-6542(config-if)#no shutdown
R14-6542(config-if)#exit

R14-6542(config)#interface loopback 1
R14-6542(config-if)#ip address 144.1.1.1 255.255.255.0
R14-6542(config-if)#exit
R14-6542(config)#interface loopback 2
R14-6542(config-if)#ip address 144.1.2.1 255.255.255.0
R14-6542(config-if)#exit
R14-6542(config)#interface loopback 3
R14-6542(config-if)#ip address 144.1.3.1 255.255.255.0
R14-6542(config-if)#exit
R14-6542(config)#interface loopback 4
R14-6542(config-if)#ip address 144.1.4.1 255.255.255.0
R14-6542(config-if)#exit
 
R14-6542#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            140.1.1.1       YES manual up                    up
Serial5/0                  164.1.1.2       YES manual up                    up
Serial5/1                  142.1.1.1       YES manual up                    up
Loopback1                  144.1.1.1       YES manual up                    up
Loopback2                  144.1.2.1       YES manual up                    up
Loopback3                  144.1.3.1       YES manual up                    up
Loopback4                  144.1.4.1       YES manual up                    up

 
 


 
R12-6542(config)#interface serial 5/2
R12-6542(config-if)#ip address 123.1.1.1 255.0.0.0
R12-6542(config-if)#no shutdown
R12-6542(config-if)#exit

R12-6542(config)#interface fastethernet 0/0
R12-6542(config-if)#ip address 120.1.1.1 255.0.0.0
R12-6542(config-if)#no shutdown
R12-6542(config-if)#no keepalive
R12-6542(config-if)#exit

R12-6542(config)#interface serial 5/1
R12-6542(config-if)#ip address 142.1.1.2 255.0.0.0
R12-6542(config-if)#no shutdown
R12-6542(config-if)#exit

R12-6542(config)#interface loopback 1
R12-6542(config-if)#ip address 122.1.1.1 255.255.255.0
R12-6542(config-if)#exit
R12-6542(config)#interface loopback 2
R12-6542(config-if)#ip address 122.1.2.1 255.255.255.0
R12-6542(config-if)#exit
R12-6542(config)#interface loopback 3
R12-6542(config-if)#ip address 122.1.3.1 255.255.255.0
R12-6542(config-if)#exit
R12-6542(config)#interface loopback 4
R12-6542(config-if)#ip address 122.1.4.1 255.255.255.0
R12-6542(config-if)#exit
 
R12-6542#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            120.1.1.1       YES manual up                    up
Serial5/1                  142.1.1.2       YES manual up                    up
Serial5/2                  123.1.1.1       YES manual up                    up
Loopback1                  122.1.1.1       YES manual up                    up
Loopback2                  122.1.2.1       YES manual up                    up
Loopback3                  122.1.3.1       YES manual up                    up
Loopback4                  122.1.4.1       YES manual up                    up

 
 
R13-6513(config)#interface serial 5/2
R13-6513(config-if)#ip address 123.1.1.2 255.0.0.0
R13-6513(config-if)#no shutdown
R13-6513(config-if)#exit

R13-6513(config)#interface fastethernet 0/0
R13-6513(config-if)#ip address 130.1.1.1 255.0.0.0
R13-6513(config-if)#no shutdown
R13-6513(config-if)#no keepalive
R13-6513(config-if)#exit

R13-6513(config)#interface serial 5/3
R13-6513(config-if)#ip address 135.1.1.1 255.0.0.0
R13-6513(config-if)#no shutdown
R13-6513(config-if)#exit

R13-6513(config)#interface loopback 1
R13-6513(config-if)#ip address 133.1.1.1 255.255.255.0
R13-6513(config-if)#exit
R13-6513(config)#interface loopback 2
R13-6513(config-if)#ip address 133.1.2.1 255.255.255.0
R13-6513(config-if)#exit
R13-6513(config)#interface loopback 3
R13-6513(config-if)#ip address 133.1.3.1 255.255.255.0
R13-6513(config-if)#exit
R13-6513(config)#interface loopback 4
R13-6513(config-if)#ip address 133.1.4.1 255.255.255.0
R13-6513(config-if)#exit

R13-6513#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            130.1.1.1       YES manual up                    up
Serial5/2                  123.1.1.2       YES manual up                    up
Serial5/3                  135.1.1.1       YES manual up                    up
Loopback1                  133.1.1.1       YES manual up                    up
Loopback2                  133.1.2.1       YES manual up                    up
Loopback3                  133.1.3.1       YES manual up                    up
Loopback4                  133.1.4.1       YES manual up                    up

 
 
R15-6515(config)#interface serial 6/0
R15-6515(config-if)#ip address 165.1.1.2 255.0.0.0
R15-6515(config-if)#no shutdown
R15-6515(config-if)#exit

R15-6515(config)#interface fastethernet 0/0
R15-6515(config-if)#ip address 150.1.1.1 255.0.0.0
R15-6515(config-if)#no shutdown
R15-6515(config-if)#no keepalive
R15-6515(config-if)#exit

R15-6515(config)#interface serial 5/3
R15-6515(config-if)#ip address 135.1.1.2 255.0.0.0
R15-6515(config-if)#no shutdown
R15-6515(config-if)#exit

R15-6515(config)#interface loopback 1
R15-6515(config-if)#ip address 155.1.1.1 255.255.255.0
R15-6515(config-if)#exit
R15-6515(config)#interface loopback 2
R15-6515(config-if)#ip address 155.1.2.1 255.255.255.0
R15-6515(config-if)#exit
R15-6515(config)#interface loopback 3
R15-6515(config-if)#ip address 155.1.3.1 255.255.255.0
R15-6515(config-if)#exit
R15-6515(config)#interface loopback 4
R15-6515(config-if)#ip address 155.1.4.1 255.255.255.0
R15-6515(config-if)#exit
 
R15-6515#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            150.1.1.1       YES manual up                    up
Serial5/3                  135.1.1.2       YES manual up                    up
Serial6/0                  165.1.1.2       YES manual up                    up
Loopback1                  155.1.1.1       YES manual up                    up
Loopback2                  155.1.2.1       YES manual up                    up
Loopback3                  155.1.3.1       YES manual up                    up
Loopback4                  155.1.4.1       YES manual up                    up




R16-6516(config)#router bgp 6516
R16-6516(config-router)#neighbor 96.1.1.1 remote-as 6577
R16-6516(config-router)#neighbor 165.1.1.1 remote-as 6515
R16-6516(config-router)#neighbor 164.1.1.2 remote-as 6542
R16-6516(config-router)#network 165.0.0.0 mask 255.0.0.0
R16-6516(config-router)#network 164.0.0.0 mask 255.0.0.0
R16-6516(config-router)#network 96.0.0.0 mask 255.0.0.0
R16-6516(config-router)#network 166.1.1.0 mask 255.255.255.0
R16-6516(config-router)#network 166.1.2.0 mask 255.255.255.0
R16-6516(config-router)#network 166.1.3.0 mask 255.255.255.0
R16-6516(config-router)#network 166.1.4.0 mask 255.255.255.0
R16-6516(config-router)#no auto-summary
R16-6516(config-router)#no synchronization
R16-6516(config-router)#exit
 
 
R14-6542(config)#router bgp 6542
R14-6542(config-router)#neighbor 142.1.1.2 remote-as 6542
R14-6542(config-router)#neighbor 164.1.1.1 remote-as 6516
R14-6542(config-router)#neighbor 142.1.1.2 next-hop-self
R14-6542(config-router)#network 140.0.0.0
R14-6542(config-router)#network 164.0.0.0 mask 255.0.0.0
R14-6542(config-router)#network 142.0.0.0 mask 255.0.0.0
R14-6542(config-router)#network 144.1.1.0 mask 255.255.255.0
R14-6542(config-router)#network 144.1.2.0 mask 255.255.255.0
R14-6542(config-router)#network 144.1.3.0 mask 255.255.255.0
R14-6542(config-router)#network 144.1.4.0 mask 255.255.255.0
R14-6542(config-router)#no auto-summary
R14-6542(config-router)#no synchronization
R14-6542(config-router)#exit

*Oct 25 17:36:34.379: %BGP-5-ADJCHANGE: neighbor 164.1.1.1 Up
*Oct 25 17:38:50.119: %BGP-5-ADJCHANGE: neighbor 142.1.1.2 Up

 
 
R12-6542(config)#router bgp 6542
R12-6542(config-router)#neighbor 142.1.1.1 remote-as 6542
R12-6542(config-router)#neighbor 123.1.1.2 remote-as 6513
R12-6542(config-router)#neighbor 142.1.1.1 next-hop-self
R12-6542(config-router)#network 120.0.0.0
R12-6542(config-router)#network 123.0.0.0 mask 255.0.0.0
R12-6542(config-router)#network 142.0.0.0 mask 255.0.0.0
R12-6542(config-router)#network 122.1.1.0 mask 255.255.255.0
R12-6542(config-router)#network 122.1.2.0 mask 255.255.255.0
R12-6542(config-router)#network 122.1.3.0 mask 255.255.255.0
R12-6542(config-router)#network 122.1.4.0 mask 255.255.255.0
R12-6542(config-router)#no auto-summary
R12-6542(config-router)#no synchronization
R12-6542(config-router)#exit

*Oct 25 17:37:09.975: %BGP-5-ADJCHANGE: neighbor 142.1.1.1 Up
*Oct 25 17:38:51.363: %BGP-5-ADJCHANGE: neighbor 123.1.1.2 Up

 
 
 
 
R13-6513(config)#router bgp 6513
R13-6513(config-router)#neighbor 135.1.1.2 remote-as 6515
R13-6513(config-router)#neighbor 123.1.1.1 remote-as 6542
R13-6513(config-router)#network 130.0.0.0
R13-6513(config-router)#network 123.0.0.0 mask 255.0.0.0
R13-6513(config-router)#network 135.0.0.0 mask 255.0.0.0
R13-6513(config-router)#network 133.1.1.0 mask 255.255.255.0
R13-6513(config-router)#network 133.1.2.0 mask 255.255.255.0
R13-6513(config-router)#network 133.1.3.0 mask 255.255.255.0
R13-6513(config-router)#network 133.1.4.0 mask 255.255.255.0
R13-6513(config-router)#no auto-summary
R13-6513(config-router)#no synchronization
R13-6513(config-router)#exit

*Oct 25 17:36:31.203: %BGP-5-ADJCHANGE: neighbor 123.1.1.1 Up
*Oct 25 17:38:07.019: %BGP-5-ADJCHANGE: neighbor 135.1.1.2 Up


R15-6515(config)#router bgp 6515
R15-6515(config-router)#neighbor 165.1.1.2 remote-as 6516
R15-6515(config-router)#neighbor 135.1.1.1 remote-as 6513
R15-6515(config-router)#network 150.0.0.0
R15-6515(config-router)#network 165.0.0.0 mask 255.0.0.0
R15-6515(config-router)#network 135.0.0.0 mask 255.0.0.0
R15-6515(config-router)#network 155.1.1.0 mask 255.255.255.0
R15-6515(config-router)#network 155.1.2.0 mask 255.255.255.0
R15-6515(config-router)#network 155.1.3.0 mask 255.255.255.0
R15-6515(config-router)#network 155.1.4.0 mask 255.255.255.0
R15-6515(config-router)#no auto-summary
R15-6515(config-router)#no synchronization
R15-6515(config-router)#exit

*Oct 26 17:28:13.859: %BGP-5-ADJCHANGE: neighbor 165.1.1.2 Up
*Oct 26 17:45:51.063: %BGP-5-ADJCHANGE: neighbor 135.1.1.1 Up

(now let's try to ping 122.1.1.1/24 from router13 as 6513)

R13-6513#traceroute 122.1.1.1

Type escape sequence to abort.
Tracing the route to 122.1.1.1

  1 123.1.1.1 28 msec 32 msec 16 msec

R13-6513#show ip bgp 122.1.1.1
BGP routing table entry for 122.1.1.0/24, version 94
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
  Advertised to update-groups:
     1
  6515 6516 6542
    135.1.1.2 from 135.1.1.2 (155.1.4.1)
      Origin IGP, localpref 100, valid, external
  6542
    123.1.1.1 from 123.1.1.1 (122.1.4.1)
      Origin IGP, metric 0, localpref 100, valid, external, best









We have two available routes to the 122.1.1.1 network from router 13. the best is via 123.1.1.1 because this path has less autonomous system numbers. but as per our requirement, we to reach the 122.1.1.1 network via 135.1.1.1 (6515-6516-1642) to manipulate the path we are using the weight attribute and for return, traffic use the same path we will use MED. 


R13-6513(config)#router bgp 6513
R13-6513(config-router)#neighbor 135.1.1.2 weight 1000
R13-6513(config-router)#do clear ip bgp * soft
R13-6513(config-router)#end

R13-6513#traceroute 122.1.1.1

Type escape sequence to abort.
Tracing the route to 122.1.1.1

  1 135.1.1.2 108 msec 32 msec 32 msec
  2 165.1.1.2 [AS 6515] 44 msec 92 msec 60 msec
  3 164.1.1.2 [AS 6516] 68 msec 100 msec 80 msec
  4 142.1.1.2 [AS 6542] 72 msec 96 msec 68 msec


(now let's see on router 12. traceroute 133.1.1.1 (router13). we want the return traffic to also use the same path (AS 6515 6516 6542)

R12-6542#traceroute 133.1.1.1

Type escape sequence to abort.
Tracing the route to 133.1.1.1

  1 123.1.1.2 20 msec 36 msec 28 msec


as you can see router 12 is not using the same path. 



R13-6513(config)#route-map internetworks
R13-6513(config-route-map)#set metric 130
R13-6513(config-route-map)#set as-path prepend 600
R13-6513(config-route-map)#exit

R13-6513(config)#router bgp 6513
R13-6513(config-router)#neighbor 123.1.1.1 route-map internetworks out
R13-6513(config-router)#exit



R12-6542(config)#router bgp 6542
R12-6542(config-router)#bgp bestpath as-path ignore
R12-6542(config-router)#bgp always-compare-med
R12-6542(config-router)#exit

R14-6542(config)#router bgp 6542
R14-6542(config-router)#bgp bestpath as-path ignore
R14-6542(config-router)#bgp always-compare-med
R14-6542(config-router)#exit
R14-6542(config)#do clear ip bgp * soft



R12-6542#show ip bgp 133.1.1.1
BGP routing table entry for 133.1.1.0/24, version 3
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  6513 600
    123.1.1.2 from 123.1.1.2 (133.1.4.1)
      Origin IGP, metric 130, localpref 100, valid, external
  6516 6515 6513
    142.1.1.1 from 142.1.1.1 (144.1.4.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best



R12-6542#traceroute 133.1.1.1

Type escape sequence to abort.
Tracing the route to 133.1.1.1

  1 142.1.1.1 44 msec 32 msec 32 msec
  2 164.1.1.1 32 msec 64 msec 132 msec
  3 165.1.1.1 [AS 6516] 112 msec 176 msec 192 msec
  4 135.1.1.1 [AS 6515] 160 msec 128 msec 160 msec


(now after compare med our router 12 and 14 is also using same path and in the end return traffic is also using the same for router 13.

R16-6516#show ip bgp
BGP table version is 145, local router ID is 166.1.4.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
*> 10.0.0.0         96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 11.1.1.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 11.1.2.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 11.1.3.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 11.1.4.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 12.0.0.0         96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 20.0.0.0         96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 22.1.1.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 22.1.2.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 22.1.3.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 22.1.4.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 23.0.0.0         96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 27.0.0.0         96.1.1.1                               0 6577 6566 65333 65444 i
*> 30.0.0.0         96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 31.0.0.0         96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 33.1.1.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 33.1.2.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 33.1.3.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 33.1.4.0/24      96.1.1.1                               0 6577 6566 65333 65444 65111 i
*> 40.0.0.0         96.1.1.1                               0 6577 6566 65333 65222 i
*> 44.1.1.0/24      96.1.1.1                               0 6577 6566 65333 65222 i
*> 44.1.2.0/24      96.1.1.1                               0 6577 6566 65333 65222 i
*> 44.1.3.0/24      96.1.1.1                               0 6577 6566 65333 65222 i
*> 44.1.4.0/24      96.1.1.1                               0 6577 6566 65333 65222 i
*> 45.0.0.0         96.1.1.1                               0 6577 6566 65333 65222 i
*> 50.0.0.0         96.1.1.1                               0 6577 6566 65333 65222 i
*> 55.1.1.0/24      96.1.1.1                               0 6577 6566 65333 65222 i
*> 55.1.2.0/24      96.1.1.1                               0 6577 6566 65333 65222 i
*> 55.1.3.0/24      96.1.1.1                               0 6577 6566 65333 65222 i
*> 55.1.4.0/24      96.1.1.1                               0 6577 6566 65333 65222 i
*> 56.0.0.0         96.1.1.1                               0 6577 6566 65333 i
*> 60.0.0.0         96.1.1.1                               0 6577 6566 65333 i
*> 66.1.1.0/24      96.1.1.1                               0 6577 6566 65333 i
*> 66.1.2.0/24      96.1.1.1                               0 6577 6566 65333 i
*> 66.1.3.0/24      96.1.1.1                               0 6577 6566 65333 i
*> 66.1.4.0/24      96.1.1.1                               0 6577 6566 65333 i
*> 67.0.0.0         96.1.1.1                               0 6577 6566 65333 i
*> 70.0.0.0         96.1.1.1                               0 6577 6566 65333 65444 i
*> 74.0.0.0         96.1.1.1                               0 6577 6566 65333 65222 i
*> 77.1.1.0/24      96.1.1.1                               0 6577 6566 65333 65444 i
*> 77.1.2.0/24      96.1.1.1                               0 6577 6566 65333 65444 i
*> 77.1.3.0/24      96.1.1.1                               0 6577 6566 65333 65444 i
*> 77.1.4.0/24      96.1.1.1                               0 6577 6566 65333 65444 i
*> 86.0.0.0         96.1.1.1                               0 6577 6566 i
*> 88.1.1.0/24      96.1.1.1                               0 6577 6566 i
*> 88.1.2.0/24      96.1.1.1                               0 6577 6566 i
*> 88.1.3.0/24      96.1.1.1                               0 6577 6566 i
*> 88.1.4.0/24      96.1.1.1                               0 6577 6566 i
*> 89.0.0.0         96.1.1.1                 0             0 6577 i
*> 90.0.0.0         96.1.1.1                 0             0 6577 i
*> 91.0.0.0         96.1.1.1                 0             0 6577 i
*  96.0.0.0         96.1.1.1                 0             0 6577 i
*>                  0.0.0.0                  0         32768 i
*> 99.1.1.0/24      96.1.1.1                 0             0 6577 i
*> 99.1.2.0/24      96.1.1.1                 0             0 6577 i
*> 99.1.3.0/24      96.1.1.1                 0             0 6577 i
*> 99.1.4.0/24      96.1.1.1                 0             0 6577 i
*> 101.1.1.0/24     96.1.1.1                               0 6577 6555 i
*> 101.1.2.0/24     96.1.1.1                               0 6577 6555 i
*> 101.1.3.0/24     96.1.1.1                               0 6577 6555 i
*> 101.1.4.0/24     96.1.1.1                               0 6577 6555 i
*> 108.0.0.0        96.1.1.1                               0 6577 6566 i
*> 110.0.0.0        96.1.1.1                               0 6577 6555 i
*> 111.1.1.0/24     96.1.1.1                               0 6577 6555 i
*> 111.1.2.0/24     96.1.1.1                               0 6577 6555 i
*> 111.1.3.0/24     96.1.1.1                               0 6577 6555 i
*> 111.1.4.0/24     96.1.1.1                               0 6577 6555 i
*  120.0.0.0        165.1.1.1                              0 6515 6513 6542 i
*>                  164.1.1.2                              0 6542 i
*  122.1.1.0/24     165.1.1.1                              0 6515 6513 6542 i
*>                  164.1.1.2                              0 6542 i
*  122.1.2.0/24     165.1.1.1                              0 6515 6513 6542 i
*>                  164.1.1.2                              0 6542 i
*  122.1.3.0/24     165.1.1.1                              0 6515 6513 6542 i
*>                  164.1.1.2                              0 6542 i
*  122.1.4.0/24     165.1.1.1                              0 6515 6513 6542 i
*>                  164.1.1.2                              0 6542 i
*> 123.0.0.0        165.1.1.1                              0 6515 6513 i
*> 133.1.1.0/24     165.1.1.1                              0 6515 6513 i
*> 133.1.2.0/24     165.1.1.1                              0 6515 6513 i
*> 133.1.3.0/24     165.1.1.1                              0 6515 6513 i
*> 133.1.4.0/24     165.1.1.1                              0 6515 6513 i
*> 135.0.0.0/8      165.1.1.1                0             0 6515 i
*> 142.0.0.0/8      164.1.1.2                0             0 6542 i
*> 144.1.1.0/24     164.1.1.2                0             0 6542 i
*> 144.1.2.0/24     164.1.1.2                0             0 6542 i
*> 144.1.3.0/24     164.1.1.2                0             0 6542 i
*> 144.1.4.0/24     164.1.1.2                0             0 6542 i
*> 150.0.0.0/8      165.1.1.1                0             0 6515 i
*> 155.1.1.0/24     165.1.1.1                0             0 6515 i
*> 155.1.2.0/24     165.1.1.1                0             0 6515 i
*> 155.1.3.0/24     165.1.1.1                0             0 6515 i
*> 155.1.4.0/24     165.1.1.1                0             0 6515 i
*> 164.0.0.0/8      0.0.0.0                  0         32768 i
*                   164.1.1.2                0             0 6542 i
*  165.0.0.0/8      165.1.1.1                0             0 6515 i
*>                  0.0.0.0                  0         32768 i
*> 166.1.1.0/24     0.0.0.0                  0         32768 i
*> 166.1.2.0/24     0.0.0.0                  0         32768 i
*> 166.1.3.0/24     0.0.0.0                  0         32768 i
*> 166.1.4.0/24     0.0.0.0                  0         32768 I


(now the moment of truth lets ping from router 13 to router )









R13-6513#traceroute 11.1.1.1

Type escape sequence to abort.
Tracing the route to 11.1.1.1

  1 135.1.1.2 40 msec 32 msec 32 msec
  2 165.1.1.2 [AS 6515] 64 msec 36 msec 80 msec
  3 96.1.1.1 [AS 6516] 112 msec 80 msec 96 msec
  4 89.1.1.1 [AS 6577] 176 msec 144 msec 128 msec
  5 86.1.1.2 [AS 6566] 192 msec 148 msec 188 msec
  6 67.1.1.2 [AS 65333] 224 msec 268 msec 336 msec
  7 27.1.1.1 [AS 65444] 284 msec 276 msec 364 msec
  8 12.1.1.1 [AS 65111] 296 msec 296 msec 288 msec

(thanks for visiting and thanks for your time) 















No comments:

Post a Comment

Border Gateway Protocol attributes CCNA FREE LAB

  Border Gateway Protocol (BGP) advertises, learns, and chooses the best paths inside the wide internet. When two ISPs connect, they typical...

INSTAGRAM FEED

@Edger C Francis