Thursday, July 10, 2014

Lab 3 - BGP Route reflectors, clustering, and next-hop processing



Concepts tested:
-Route reflection
-Route reflection clustering
-route advertisement between eBGP peers, iBGP peers, and between route reflectors
-Next-hop processing using next-hop-self

Topology used





Tasks to complete this lab:

-Configure eBGP peering between R1-R2 and R11-R8
-Configure iBGP peering between R2-R3 and R2-R4
-Configure iBGP peering between R5-R6 and R5-R7
-Configure iBGP peering between R8-R9 and R8-R10
-Configure iBGP peering between R2-R5 and R2-R8 and R5-R8
-Configure a route reflector cluster between R2-R3-R4 where R2
  is the route reflector server and R3 and R4 are the clients using
  cluster ID: 10.1.1.1
-Configure a route reflector cluster between R2-R3-R4 where R2 is
  the router reflector server and R6 and R7 are clients using cluster
  ID: 20.2.2.2
-Configure a router reflector cluster between R8-R9-R10 where
  R8 is the router reflector server and R9 and R10 are route reflector
  client using cluster ID: 30.3.3.3
-Advertise the loopbacks of all routers including R1 and R11.
-Ensure reachability to all eBGP and iBGP loopback addresses when
  sourced from other loopbacks
-Constraints:
--Do not use static routes
--Do not modify any IGP configurations or IPs
--Use the least amount of command necessary to accomplish tasks
--Solution should be achieved using only BGP commands

 Link to GNS3 configs: Link


Solution:

Begin by creating the peering with R2 and advertising R1's and R11's loopback addresses

R1(config)#router bgp 100
R1(config-router)#neighbor 192.168.12.3 remote-as 300
R1(config-router)#network 172.16.0.0 mask 255.255.255.0
R1(config-router)#network 172.16.1.0 mask 255.255.255.0
R1(config-router)#network 172.16.2.0 mask 255.255.255.0
R1(config-router)#network 172.16.3.0 mask 255.255.255.0

R11(config)#router bgp 100
R11(config-router)#neighbor 192.168.118.9 remote-as 300
R11(config-router)#network 172.16.4.0 mask 255.255.255.0
R11(config-router)#network 172.16.5.0 mask 255.255.255.0
R11(config-router)#network 172.16.6.0 mask 255.255.255.0
R11(config-router)#network 172.16.7.0 mask 255.255.255.0

Next configure the neighbor configuration on R2 defining R3 and R4 as route
reflector clients of R2. This ensures  any routes learned by a client is reflected by R2 to its other client and non-client  peers. In this case R4, R5, and R8 will learn BGP  learn routes from R3 via R2.  Don't forget to configure the peering with R5 and R8 as well.

R2(config)#router bgp 300
R2(config-router)#neighbor 192.168.23.3 remote-as 300
R2(config-router)#neighbor 192.168.23.3 route-reflector-client
R2(config-router)#neighbor 192.168.24.4 remote-as 300
R2(config-router)#neighbor 192.168.24.4 route-reflector-client
R2(config-router)#neighbor 192.168.28.8 remote-as 300
R2(config-router)#neighbor 192.168.25.5 remote-as 300

Continue by configuring R3 to peer with R1 and R2 and R4 with R2.

R3(config)#router bgp 300
R3(config-router)#neighbor 192.168.23.2 remote-as 300
R3(config-router)#neighbor 192.168.12.1 remote-as 100

R4(config)#router bgp 300
R4(config-router)#neighbor 192.168.24.2 remote-as 300

Continue this process of neighbor configuration across the remaining devices

R5(config)#router bgp 300
R5(config-router)#neighbor 192.168.25.2 remote-as 300
R5(config-router)#neighbor 192.168.58.8 remote-as 300
R5(config-router)#neighbor 192.168.56.6 remote-as 300
R5(config-router)#neighbor 192.168.56.6 route-reflector-client
R5(config-router)#neighbor 192.168.57.7 remote-as 300
R5(config-router)#neighbor 192.168.57.7 route-reflector-client

R6(config)#router bgp 300
R6(config-router)#neighbor 192.168.56.5 remote-as 300

R7(config)#router bgp 300
R7(config-router)#neighbor 192.168.57.5 remote-as 300

R8(config)#router bgp 300
R8(config-router)#neighbor 192.168.28.2 remote-as 300
R8(config-router)#neighbor 192.168.58.5 remote-as 300
R8(config-router)#neighbor 192.168.89.9 remote-as 300
R8(config-router)#neighbor 192.168.81.1 remote-as 300

R9(config)#router bgp 300
R9(config-router)#neighbor 192.168.89.2 remote-as 300
R9(config-router)#neighbor 192.168.118.1 remote-as 200

R10(config)#router bgp 300
R10(config-router)#neighbor 192.168.81.2 remote-as 300

The next step is to define our route reflector clusters. To do this we define our cluster IDs on each of our route reflector clients.

R2(config)#router bgp 300
R2(config-router)#bgp cluster-id 10.1.1.1

R5(config)#router bgp 300
R5(config-router)#bgp cluster-id 20.1.1.1

R8(config)#router bgp 300
R8(config-router)#bgp cluster-id 30.1.1.1

Now advertise the loopback 0 networks of each AS 300 device

R2(config)#router bgp 300
R2(config)#network 2.2.2.2 mask 255.255.255.255

R3(config)#router bgp 300
R3(config)#network 3.3.3.3 mask 255.255.255.255

R4(config)#router bgp 300
R4(config)#network 4.4.4.4 mask 255.255.255.255

R5(config)#router bgp 300
R5(config)#network 5.5.5.5 mask 255.255.255.255

R6(config)#router bgp 300
R6(config)#network 6.6.6.6 mask 255.255.255.255

R7(config)#router bgp 300
R7(config)#network 7.7.7.7 mask 255.255.255.255

R8(config)#router bgp 300
R8(config)#network 8.8.8.8 mask 255.255.255.255

R9(config)#router bgp 300
R9(config)#network 9.9.9.9 mask 255.255.255.255

R10(config)#router bgp 300
R10(config)#network  10.10.10.10 mask 255.255.255.255

At this point we should confirm proper peering between devices and advertisement of our prefixes

R2#sh ip bgp sum
<snip>
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.23.3    4          300       8      17       36    0    0 00:03:10        5
192.168.24.4    4          300      19      29       36    0    0 00:13:06        1
192.168.25.5    4          300      20      22       36    0    0 00:13:05        3
192.168.28.8    4          300      21      21       36    0    0 00:12:57        2

R3#sh ip bg
<snip>
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.1    4          100       9      12       24    0    0 00:04:00        4
192.168.23.2    4          300      19       9       24    0    0 00:04:00        8

R4#sh ip bgp sum
<snip>
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.24.2    4          300      31      20      118    0    0 00:14:18        8

R6#sh ip bgp sum
<snip>
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.56.5    4          300      31      21      124    0    0 00:15:27        8

R7#sh ip bgp sum
<snip>
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.57.5    4          300      32      22      126    0    0 00:15:45        8

R8#sh ip bgp sum
<snip>
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.28.2    4          300      24      25       30    0    0 00:15:48        3
192.168.58.5    4          300      23      24       30    0    0 00:15:49        3
192.168.81.10   4          300      22      34       30    0    0 00:15:49        1
192.168.89.9    4          300       8      15       30    0    0 00:03:08        5
192.168.118.11  4          200       0       0        1    0    0 never    Idle

R9#sh ip b
<snip>
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.89.8    4          300      15       8       14    0    0 00:03:32        8
192.168.118.11  4          200       8       8       14    0    0 00:03:32        4

R10#sh ip bgp sum
<snip>
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.81.8    4          300      35      23      111    0    0 00:16:48        8

R11#sh ip bgp sum
<snip>
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.118.9   4          300      10      10       77    0    0 00:04:37        8

Everything looks good as far as our neighbors go. Let's look at our BGP RIB table

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

   Network          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
*>i3.3.3.3/32       192.168.23.3             0    100      0 i
*>i4.4.4.4/32       192.168.24.4             0    100      0 i
*>i5.5.5.5/32       192.168.25.5             0    100      0 i
*>i6.6.6.6/32       192.168.56.6             0    100      0 i
*>i7.7.7.7/32       192.168.57.7             0    100      0 i
*>i8.8.8.8/32       192.168.28.8             0    100      0 i
*>i9.9.9.9/32       192.168.89.9             0    100      0 i
*>i10.10.10.10/32   192.168.81.10            0    100      0 i
* i172.16.0.0/24    192.168.12.1             0    100      0 100 i
* i172.16.1.0/24    192.168.12.1             0    100      0 100 i
* i172.16.2.0/24    192.168.12.1             0    100      0 100 i
* i172.16.3.0/24    192.168.12.1             0    100      0 100 i

As you can see from the output above there is a problem. R11's prefixes are not in R2s RIB table and R1's prefixes are not being installed in the global RIB table (its missing the > symbol).

So why would this be? Let's look at R2. There are a couple of reasons why a route will not get installed from the BGP RIB table and placed into the global RIB. One reason is If the path is marked as not synchronized it will not get installed. But we have this turned off by default. Another reason is if the NEXT_HOP attribute is inaccessible. Let's check that out:

R2#sh ip bgp 172.16.0.0/24
BGP routing table entry for 172.16.0.0/24, version 0
Paths: (1 available, no best path)
  Not advertised to any peer
  100, (Received from a RR-client)
    192.168.12.1 (inaccessible) from 192.168.23.3 (3.3.3.3)
      Origin IGP, metric 0, localpref 100, valid, internal

That looks like that is our problem. So the 192.168.12.0/24 network is unreachable by R2. We can fix that by advertising that network into our IGP or creating a static route but that violates our LAB constraints. So another option is to change the next hop to a prefix that is reachable. We can do that with the next-hop-self command on R3.

R3(config)#router bgp 300
R3(config-router)#neighbor 192.168.23.2 next-hop-self

The result of this is after clearing the BGP session to speed things up

R2#sh ip bgp
<snip>
   Network          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
*>i3.3.3.3/32       192.168.23.3             0    100      0 i
*>i4.4.4.4/32       192.168.24.4             0    100      0 i
*>i5.5.5.5/32       192.168.25.5             0    100      0 i
*>i6.6.6.6/32       192.168.56.6             0    100      0 i
*>i7.7.7.7/32       192.168.57.7             0    100      0 i
*>i8.8.8.8/32       192.168.28.8             0    100      0 i
*>i9.9.9.9/32       192.168.89.9             0    100      0 i
*>i10.10.10.10/32   192.168.81.10            0    100      0 i
*>i172.16.0.0/24    192.168.23.3             0    100      0 100 i
*>i172.16.1.0/24    192.168.23.3             0    100      0 100 i
*>i172.16.2.0/24    192.168.23.3             0    100      0 100 i
*>i172.16.3.0/24    192.168.23.3             0    100      0 100 i

R2#sh ip route
<snip>
      172.16.0.0/24 is subnetted, 4 subnets
B        172.16.0.0 [200/0] via 192.168.23.3, 00:00:45
B        172.16.1.0 [200/0] via 192.168.23.3, 00:00:45
B        172.16.2.0 [200/0] via 192.168.23.3, 00:00:45
B        172.16.3.0 [200/0] via 192.168.23.3, 00:00:45

That is much better. Now let's look at why R11's prefixes are missing.

R8#sh ip bgp
<snip>
   Network          Next Hop            Metric LocPrf Weight Path
<snip>
*>i172.16.0.0/24    192.168.23.3             0    100      0 100 i
*>i172.16.1.0/24    192.168.23.3             0    100      0 100 i
*>i172.16.2.0/24    192.168.23.3             0    100      0 100 i
*>i172.16.3.0/24    192.168.23.3             0    100      0 100 i
* i172.16.4.0/24    192.168.118.11           0    100      0 200 i
* i172.16.5.0/24    192.168.118.11           0    100      0 200 i
* i172.16.6.0/24    192.168.118.11           0    100      0 200 i
* i172.16.7.0/24    192.168.118.11           0    100      0 200 i

It looks like the same issue as R2, lets confirm that.

R8#sh ip bgp 172.16.4.0/24
BGP routing table entry for 172.16.4.0/24, version 0
Paths: (1 available, no best path)
  Not advertised to any peer
  200, (Received from a RR-client)
    192.168.118.11 (inaccessible) from 192.168.89.9 (9.9.9.9)
      Origin IGP, metric 0, localpref 100, valid, internal

Sure enough, it’s the same problem so our solution be the same, modify the NEXT_HOP attribute on the advertising device to a prefix that is reachable by R8.

R8(config)#router bgp 300
R8(config-router)#neighbor 192.168.89.8 next-hop-self

The result is below

R8#sh ip bgp
<snip>
   Network          Next Hop            Metric LocPrf Weight Path
<snip>
*>i172.16.4.0/24    192.168.89.9             0    100      0 200 i
*>i172.16.5.0/24    192.168.89.9             0    100      0 200 i
*>i172.16.6.0/24    192.168.89.9             0    100      0 200 i
*>i172.16.7.0/24    192.168.89.9             0    100      0 200 i

Problem solved.

So if we check the rest of our devices we should see that both our BGP and global RIB tables are populated correctly and that we can ping all the prefixes when we source from the local device's loopback address:

R6#
R6#sh ip bgp
BGP table version is 144, local router ID is 6.6.6.6
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
*>i2.2.2.2/32       192.168.25.2             0    100      0 i
*>i3.3.3.3/32       192.168.23.3             0    100      0 i
*>i4.4.4.4/32       192.168.24.4             0    100      0 i
*>i5.5.5.5/32       192.168.56.5             0    100      0 i
*> 6.6.6.6/32       0.0.0.0                  0         32768 i
*>i7.7.7.7/32       192.168.57.7             0    100      0 i
*>i8.8.8.8/32       192.168.58.8             0    100      0 i
*>i9.9.9.9/32       192.168.89.9             0    100      0 i
*>i10.10.10.10/32   192.168.81.10            0    100      0 i
*>i172.16.0.0/24    192.168.23.3             0    100      0 100 i
*>i172.16.1.0/24    192.168.23.3             0    100      0 100 i
*>i172.16.2.0/24    192.168.23.3             0    100      0 100 i
*>i172.16.3.0/24    192.168.23.3             0    100      0 100 i
*>i172.16.4.0/24    192.168.89.9             0    100      0 200 i
*>i172.16.5.0/24    192.168.89.9             0    100      0 200 i
*>i172.16.6.0/24    192.168.89.9             0    100      0 200 i
*>i172.16.7.0/24    192.168.89.9             0    100      0 200 i

R6#ping 172.16.1.1 source lo 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/85/104 ms


That concludes this lab, I hope you enjoyed it. Please feel free to comment or ask questions and I'll do my best to answer them.

References:



Sunday, July 6, 2014

Lab 2 – BGP aggregate addressing

This lab focuses on BGP aggregate addressing techniques and general use of the aggregate-address command.

Concepts tested: 
  • Use of aggregate-address, as-set, summary-only, attribute-map
  • Preventing AS path loops with aggregate addressing
  • Aggregate address attribute property inheritance


Topology Used




Tasks:

Using the aggregate-address command to complete the following tasks:
  •  Configure eBGP on all routers per the diagram
  • Advertise all loopback addresses on R3 and R4 into BGP
  • Summarize the loopbacks of R3 and R4 on R2
  • Modify the prefix 172.16.1.0/24 to include the no-export community when advertised to AS 200
  • R3 and R4 should only see their own BGP prefixes in their local BGP RIB table
  • R3 and R4 should not see the summary address in its local BGP RIB table
  • R1 should only be able to see the summary network in its local BG RIB table
  • Do not use prefix filtering to accomplish this
  • Any summarization should only contain R3 and R4 prefixes with no overlap with any other prefixes

GNS3 Topology link (requires IOS 15 for 7200 router): Link

Solution

1.       Advertise loopbacks:

R3(config)#router bgp 300
R3(config-router)#network 172.16.0.0 mask 255.255.255.0
R3(config-router)#network 172.16.1.0 mask 255.255.255.0
R3(config-router)#network 172.16.2.0 mask 255.255.255.0
R3(config-router)#network 172.16.3.0 mask 255.255.255.0

R3(config)#router bgp 400
R3(config-router)#network 172.16.4.0 mask 255.255.255.0
R3(config-router)#network 172.16.5.0 mask 255.255.255.0
R3(config-router)#network 172.16.6.0 mask 255.255.255.0
R3(config-router)#network 172.16.7.0 mask 255.255.255.0

Verify:

R1#sh ip bgp
BGP table version is 9, local router ID is 192.168.12.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
*> 172.16.0.0/24    192.168.12.2                           0 200 300 i
*> 172.16.1.0/24    192.168.12.2                           0 200 300 i
*> 172.16.2.0/24    192.168.12.2                           0 200 300 i
*> 172.16.3.0/24    192.168.12.2                           0 200 300 i
*> 172.16.4.0/24    192.168.12.2                           0 200 400 i
*> 172.16.5.0/24    192.168.12.2                           0 200 400 i
*> 172.16.6.0/24    192.168.12.2                           0 200 400 i
*> 172.16.7.0/24    192.168.12.2                           0 200 400 i

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

   Network          Next Hop            Metric LocPrf Weight Path
*> 172.16.0.0/24    192.168.23.3             0             0 300 i
*> 172.16.1.0/24    192.168.23.3             0             0 300 i
*> 172.16.2.0/24    192.168.23.3             0             0 300 i
*> 172.16.3.0/24    192.168.23.3             0             0 300 i
*> 172.16.4.0/24    192.168.24.4             0             0 400 i
*> 172.16.5.0/24    192.168.24.4             0             0 400 i
*> 172.16.6.0/24    192.168.24.4             0             0 400 i
*> 172.16.7.0/24    192.168.24.4             0             0 400 i

R3#sh ip bgp
*Jul  1 06:18:30.223: %SYS-5-CONFIG_I: Configured from console by console

R3#sh ip bgp
BGP table version is 9, local router ID is 172.16.3.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
*> 172.16.0.0/24    0.0.0.0                  0         32768 i
*> 172.16.1.0/24    0.0.0.0                  0         32768 i
*> 172.16.2.0/24    0.0.0.0                  0         32768 i
*> 172.16.3.0/24    0.0.0.0                  0         32768 i
*> 172.16.4.0/24    192.168.23.2                           0 200 400 i
*> 172.16.5.0/24    192.168.23.2                           0 200 400 i
*> 172.16.6.0/24    192.168.23.2                           0 200 400 i
*> 172.16.7.0/24    192.168.23.2                           0 200 400 i


R4#sh ip bgp
BGP table version is 9, local router ID is 172.16.7.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
*> 172.16.0.0/24    192.168.24.2                           0 200 300 i
*> 172.16.1.0/24    192.168.24.2                           0 200 300 i
*> 172.16.2.0/24    192.168.24.2                           0 200 300 i
*> 172.16.3.0/24    192.168.24.2                           0 200 300 i
*> 172.16.4.0/24    0.0.0.0                  0         32768 i
*> 172.16.5.0/24    0.0.0.0                  0         32768 i
*> 172.16.6.0/24    0.0.0.0                  0         32768 i
*> 172.16.7.0/24    0.0.0.0                  0         32768 i

2.       Create aggregate so only the summary is only seen on R1 and R3 and R4 only see each other's prefixes:


R2(config)#router bgp 200
R2(config-router)#aggregate-address 172.16.0.0 255.255.248.0 as-set summary-only

Verify:

R1#sh ip bgp
BGP table version is 18, local router ID is 192.168.12.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
*> 172.16.0.0/21    192.168.12.2             0             0 200 {300,400} i

R3(config-router)#do sh ip bgp
BGP table version is 13, local router ID is 172.16.3.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
*> 172.16.0.0/24    0.0.0.0                  0         32768 i
*> 172.16.1.0/24    0.0.0.0                  0         32768 i
*> 172.16.2.0/24    0.0.0.0                  0         32768 i
*> 172.16.3.0/24    0.0.0.0                  0         32768 i

R3#debug ip bgp updates
<snip>
*Jul  1 06:23:23.223: BGP(0): 192.168.23.2 rcv UPDATE about 172.16.0.0/21 -- DENIED due to: AS-PATH contains our own AS;


R4#sh ip bgp
BGP table version is 13, local router ID is 172.16.7.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
*> 172.16.4.0/24    0.0.0.0                  0         32768 i
*> 172.16.5.0/24    0.0.0.0                  0         32768 i
*> 172.16.6.0/24    0.0.0.0                  0         32768 i
*> 172.16.7.0/24    0.0.0.0                  0         32768 i

R4#debug ip bgp updates

*Jul  1 06:24:51.203: BGP(0): 192.168.24.2 rcv UPDATE about 172.16.0.0/21 -- DENIED due to: AS-PATH contains our own AS;

3.       Modify prefix 172.16.1.0/24 to send no-export community and ensure R1 can still see aggregate address:

R3:
route-map SET_NO_EXPORT permit 10
 match ip address 1
 set community no-export
!
route-map SET_NO_EXPORT permit 999

router bgp 300
 neighbor 192.168.23.2 send-community
 neighbor 192.168.23.2 route-map SET_NO_EXPORT out

R2:

access-list 1 permit 172.16.1.0 0.0.0.255
!
route-map ATTRIBUTE_MAP permit 10
 set community none

router bgp 200
 aggregate-address 172.16.0.0 255.255.248.0 as-set summary-only attribute-map ATTRIBUTE_MAP
 neighbor 192.168.12.1 send-community


Verify:

R2#sh ip bgp 172.16.1.0/24
BGP routing table entry for 172.16.1.0/24, version 19
Paths: (1 available, best #1, table default, not advertised to EBGP peer, Advertisements suppressed by an aggregate.)
  Not advertised to any peer
  300
    192.168.23.3 from 192.168.23.3 (172.16.3.1)
      Origin IGP, metric 0, localpref 100, valid, external, best
      Community: no-export

R2#sh ip bgp 172.16.0.0/21
BGP routing table entry for 172.16.0.0/21, version 20
Paths: (1 available, best #1, table default, not advertised to EBGP peer)
  Not advertised to any peer
  {300,400}, (aggregated by 200 192.168.24.2)
    0.0.0.0 from 0.0.0.0 (192.168.24.2)
      Origin IGP, localpref 100, weight 32768, valid, aggregated, local, best
      Community: no-export

R1#sh ip bgp 172.16.0.0/21
BGP routing table entry for 172.16.0.0/21, version 20
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  200 {300,400}, (aggregated by 200 192.168.24.2)
    192.168.12.2 from 192.168.12.2 (192.168.24.2)
      Origin IGP, metric 0, localpref 100, valid, external, best


Saturday, July 5, 2014

Lab 1 - BGP Peering

Teaching is the best form of learning, so I will be using this blog and other venues to post my thoughts on topics related to the CCIE R & S lab exam to help me, and hopefully others, through the long journey of studying and learning to prepare for the lab exam. So to begin I'm starting with a core technology BGP and from the beginning.

I hope to create a series of real labs that teach specific topics for the lab based on the version 5 blueprint. So to begin I've started with a basic concept in BGP, establishing neighbors.

Concepts tested
  • Establishing iBGP Peerings
  • Establishing EBGP Peerings
  • BGP Update Source Modification
  • Multihop EBGP Peerings
  • Neighbor Disable-Connected-Check
  • Authenticating BGP Peerings

Complete the following tasks:
  • Establish an iBGP peering between R2 and R3 using their loopback 0 interfaces
  • Advertise R2 and R3's loopback 10-13 into BGP
  • Establish an eBGP peering between R1 and R2 and R1 and R3. Ensure that even if the serial1/0 link on R2 goes down the peering between R1 and R2 stays up. You cannot modify the TTL settings (no ebgp-multihop command) for the peering between R1 and R2 to accomplish this but you can between R1 and R3.
  • Establish an eBGP secure peering between R3 and R4 using the password CISCO1

Topology used
Lab 1

GNS3 configuration file, requires IOS v15 for the 7200 router: Link


Solution Below:

1.       Establish an iBGP peering between R2 and R3 using their loopback 0 interfaces

R2(config)#router bgp 200
R2(config-router)#neighbor 3.3.3.3 remote-as 200
R2(config-router)#neighbor 3.3.3.3 update-source loopback 0

R3(config)#router bgp 200
R3(config-router)#neighbor 2.2.2.2 remote-as 200
R3(config-router)#neighbor 2.2.2.2 update-source loopback 0

Verify:

R2#sh ip bgp summary
<snip>
Neighbor        V           AS        MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down    State/PfxRcd
3.3.3.3             4          200       4               4                1            0     0          00:00:14      0

R3#sh ip bgp summary
<snip>
Neighbor        V           AS        MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2             4          200      11              8                9            0     0         00:03:44        0

2.       Advertise R2 and R3's loopback 10-13 into BGP

R2(config)#router bgp 200
R2(config-router)#network 172.16.0.0 mask 255.255.255.0
R2(config-router)#network 172.16.1.0 mask 255.255.255.0
R2(config-router)#network 172.16.2.0 mask 255.255.255.0
R2(config-router)#network 172.16.3.0 mask 255.255.255.0

R3(config)#router bgp 200
R3(config-router)#network 172.16.4.0 mask 255.255.255.0
R3(config-router)#network 172.16.5.0 mask 255.255.255.0
R3(config-router)#network 172.16.6.0 mask 255.255.255.0
R3(config-router)#network 172.16.7.0 mask 255.255.255.0

Verify:

R2#sh ip bgp
<snip>
   Network          Next Hop            Metric LocPrf Weight Path
*> 172.16.0.0/24    0.0.0.0                  0         32768 i
*> 172.16.1.0/24    0.0.0.0                  0         32768 i
*> 172.16.2.0/24    0.0.0.0                  0         32768 i
*> 172.16.3.0/24    0.0.0.0                  0         32768 I

R3#sh ip bgp
<snip>
   Network          Next Hop            Metric LocPrf Weight Path
*>i172.16.0.0/24    2.2.2.2                  0    100      0 i
*>i172.16.1.0/24    2.2.2.2                  0    100      0 i
*>i172.16.2.0/24    2.2.2.2                  0    100      0 i
*>i172.16.3.0/24    2.2.2.2                  0    100      0 i

3.       Establish an eBGP peering between R1 and R2 and R1 and R3. Ensure that even if the serial1/0 link on R2 goes down the peering between R1 and R2 stays up. You cannot modify the TTL settings (no ebgp-multihop command) for the peering between R1 and R2 to accomplish this but you can between R1 and R3.

R2(config-router)#neighbor 1.1.1.1 remote-as 100
R2(config-router)#neighbor 1.1.1.1 update-source loopback 0
R2(config-router)#neighbor 1.1.1.1 disable-connected-check

R1(config-router)#neighbor 2.2.2.2 remote-as 200
R1(config-router)#neighbor 2.2.2.2 update-source loopback 0
R1(config-router)#neighbor 2.2.2.2 disable-connected-check

The disabled-connected-check command disables the code in IOS BGP that verifies if two eBGP peers are directly connected. Technically this check is what prevents eBGP peering with loopback connections between directly connected hosts not the TTL.


Verify R1 to R2:

R2#sh ip bgp sum
<snip>
Neighbor        V           AS       MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1         4              100      24            26               9           0       0       00:18:46        0


R1#sh ip bgp sum
<snip>
Neighbor        V           AS      MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4              200      37            34              41         0      0        00:28:29          8


Verify R1 to R3:

R1#sh ip bgp sum
<snip>
Neighbor        V           AS      MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
3.3.3.3           4            200       8             7                 41         0     0         00:02:37        8

R3#sh ip bgp sum
<snip>
Neighbor        V           AS      MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1             4          100      10            12               9          0       0        00:05:35        0

4.       Establish an eBGP secure peering between R3 and R4 using the password CISCO1

R3(config)#router bgp 200
R3(config-router)#neighbor 4.4.4.4 remote-as 200
R3(config-router)#neighbor 4.4.4.4 update-source loopback 0
R3(config-router)#neighbor 4.4.4.4 ebgp-multihop 255
R3(config-router)#neighbor 4.4.4.4 password CISCO1

R4:
R4(config)#router bgp 400
R4(config-router)#neighbor 3.3.3.3 remote-as 200
R4(config-router)#neighbor 3.3.3.3 update-source loopback 0
R4(config-router)#neighbor 3.3.3.3 ebgp-multihop 255
R4(config-router)#neighbor 3.3.3.3 password CISCO1

Verify:

R3#sh ip bgp sum
<snip>
Neighbor        V         AS        MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down  State/PfxRcd
4.4.4.4            4         400       7                8                 9          0       0        00:03:36        0


R4#sh ip bgp sum
<snip>
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
3.3.3.3         4          200       8       6        9    0    0 00:03:03        8





Monday, April 11, 2011

VMWare - Changing the Management IP of your ESX host

It may become necessary at some point to change the management IP of your VMware /  ESX server which  is refered to as the service console. To do this it requires two basic commands from the ESX console.

First you must delete the existing vswif0 with the following command:

esxcfg-vswif -d vswif0

ignore the message "nothing to flush"

Then enter the following command to configure the new IP address, using your own IP.

esxcfg-vswif -a vswif0 -p Service\ Console -i 172.16.1.1 255.255.255.0 -b 172.16.1.255

Thats it!