Saturday, March 24, 2012

Task 3: Configuring BGP Aggregation

Your ISP has requested that you provide only summarized prefixes for your address range 197.1.0.0. However, because of diagnostics needs, you still need to announce the network 197.1.8.0.

Procedure:
Complete these steps:
Step 1  Log in to the router Good; verify that the ISP sees all your individual loopback networks.

Good#show ip bgp
BGP table version is 39, local router ID is 199.199.199.199
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
*> 197.1.1.0        192.168.20.1             0             0 1 i
*> 197.1.2.1/32     192.168.20.1            65             0 1 i
*> 197.1.3.1/32     192.168.20.1            65             0 1 i
   Network          Next Hop            Metric LocPrf Weight Path
*> 197.1.4.1/32     192.168.20.1           129             0 1 i
*> 197.1.5.1/32     192.168.20.1           129             0 1 i
*> 197.1.6.1/32     192.168.20.1           193             0 1 i
*> 197.1.7.1/32     192.168.20.1           193             0 1 i
*> 197.1.8.0        192.168.20.1             0                0 1 i


Step 2 Use the aggregate command in your BGP process to aggregate the 197.1.1.0 network as requested  by your ISP.


WG1R1(config)#router bgp 1
WG1R1(config-router)#aggregate-address 197.1.0.0 255.255.0.0 summary-only
WG1R1(config-router)#aggregate-address 197.1.8.0 255.255.248.0 summary-only
WG1R1(config-router)#end


Verification
  •  all the loopback addresses should be suppressed.
 WG1R1#show ip bgp
BGP table version is 47, local router ID is 197.1.8.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

s> 197.1.1.0        0.0.0.0                  0         32768 i
s> 197.1.2.1/32     192.168.1.2             65         32768 i
s> 197.1.3.1/32     192.168.1.2             65         32768 i
s> 197.1.4.1/32     192.168.1.2            129         32768 i
s> 197.1.5.1/32     192.168.1.2            129         32768 i
s> 197.1.6.1/32     192.168.1.2            193         32768 i
s> 197.1.7.1/32     192.168.1.2            193         32768 i
s> 197.1.8.0        0.0.0.0                  0         32768 i

  • on router Good suppressed networks should not be visible.
*> 197.1.0.0/16     192.168.20.1             0             0 1 i
*> 197.1.8.0/21     192.168.20.1             0             0 1 i


  •  View the detailed information of the aggregated ip prefixes.

Good>show ip bgp 197.1.0.0
BGP routing table entry for 197.1.0.0/16, version 40
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  1, (aggregated by 1 197.1.8.1)
    192.168.20.1 from 192.168.20.1 (197.1.8.1)
      Origin IGP, metric 0, localpref 100, valid, external, atomic-aggregate, best
Good>show ip bgp 197.1.8.0
BGP routing table entry for 197.1.8.0/21, version 49
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  1, (aggregated by 1 197.1.8.1)
    192.168.20.1 from 192.168.20.1 (197.1.8.1)
      Origin IGP, metric 0, localpref 100, valid, external, atomic-aggregate, best


Task 2: Configuring Route Redistribution in BGP

On this lab you will use redistribution to announce a large number of networks into the BGP routing process. You will also use route-maps to set the origin of BGP routes to "IGP" instead of "incomplete".
In this task,  you will remove all networks from your BGP defenitions (from task 1) and announce them by using redistribution from IGP into BGP with a route-map, which sets the origin code to "IGP". Make sure that 102.168.20.0/24 and 192.168.21.0/24 is not announce into BGP.

Step 1. Remove all BGP networks statements from previous activity.

WG1R1#config t
Enter configuration commands, one per line.  End with CNTL/Z.
WG1R1(config)#router bgp 1
WG1R1(config-router)#no network 192.168.1.0
WG1R1(config-router)#no network 197.1.0.0 mask 255.255.0.0
WG1R1(config-router)#^Z


Step 2. Telnet to router Good and verify that it no longer receives your network.

Step 3. Configure an access-list that permits all your networks except those that are shared among workgroups.

WG1R1(config)#access-list 1 deny 192.168.1.0
WG1R1(config)#access-list 1 deny 192.168.21.0
WG1R1(config)#access-list 1 permit any


Step 4. Configure a route-map. Use the access-list with a match comand in the route-map. Use the set command in the route-map to set the origin to "IGP". 

WG1R1(config)#route-map SetOrigin permit 10
WG1R1(config-route-map)#match ip address 1
WG1R1(config-route-map)#set origin igp
WG1R1(config-route-map)#^Z


Step 5. Configure redistribution from IGP into BGP by using the previously configure route-map.


WG1R1(config)#router bgp 1
WG1R1(config-router)#redistribute ospf 1 route-map SetOrigin
 

Verification:
Login to router Good and verify that it receives proper networks from you.


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


  Network          Next Hop            Metric LocPrf Weight Path
 *> 192.168.1.0/30   192.168.20.1             0             0 1 i
*> 192.168.1.4/30   192.168.20.1           128             0 1 i
*> 192.168.1.8/30   192.168.20.1           192             0 1 i

*> 197.1.1.0        192.168.20.1             0             0 1 i
*> 197.1.2.1/32     192.168.20.1            65             0 1 i
*> 197.1.3.1/32     192.168.20.1            65             0 1 i
   Network          Next Hop            Metric LocPrf Weight Path
*> 197.1.4.1/32     192.168.20.1           129             0 1 i
*> 197.1.5.1/32     192.168.20.1           129             0 1 i
*> 197.1.6.1/32     192.168.20.1           193             0 1 i
*> 197.1.7.1/32     192.168.20.1           193             0 1 i
*> 197.1.8.0        192.168.20.1             0             0 1 i



Monday, March 19, 2012

Lab 1-2 Configuring Basic BGP



Visual Objective for Lab 1-2

Note: The current topology is a portion from the main topology in my first blog. (BGP Initial Setup)

Task 1: Configuring BGP
Procedure:
  1. Start the process on WG1R1, use AS 1, peering with router Good in AS 20
  2. Announce the IP prefixes 197.1.0.0 /16 (classless), 192.168.1.0 /24 (classful)
  3. Ensure that WG1R1 is the exit point for your pod and is originating a default route for your IGP (OSPF)
 Activity and Task Verification:
 Procedures 1 - 3
from WG1R1: 
router bgp 1   ---------- WG1R1 will be peering with Good using AS 1
 no synchronization
 bgp log-neighbor-changes
 network 192.168.1.0 -----------------------------
Step 2  (classful) no mask needed

 network 197.1.0.0 mask 255.255.0.0 --------- Step 2 (classless)
 neighbor 192.168.20.20 remote-as 20 --------
Good
 no auto-summary


 ip route 197.1.0.0 255.255.0.0 Null0 250 - this static route will provide the exact route and allow BGP to advertise our classless network.

Note:
The WG1R1 router loopback 0 and 1 is configured with ip address 197.1.1.0 /24 and 197.1.8.0 /24. Configuring the command  network 197.1.0.0 mask 255.255.0.0  is still not sufficient for our router to advertise the 2 networks. There will be no exact route for 197.1.0.0 /16 in the routing table. Configuring a static route will fix the issue. You can find more explanation here:
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800945ff.shtml

 router ospf 1
 default-information originate always ------
this command will allow OSPF to generate the default route. You can find more explanation here:  
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094a74.shtml

Verify that you have established a BGP session. 


WG1R1# show ip bgp summary
BGP router identifier 197.1.8.1, local AS number 1
BGP table version is 25, main routing table version 25
24 network entries using 2808 bytes of memory
24 path entries using 1248 bytes of memory
10/9 BGP path/bestpath attribute entries using 1240 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 5488 total bytes of memory
BGP activity 24/0 prefixes, 24/0 paths, scan interval 60 secs


Neighbor             V    AS MsgRcvd MsgSent   TblVer  InQ  OutQ  Up/Down  State/PfxRcd
192.168.20.20   4    20     618             367       25           0       0          00:10:06       23

WG1R1#show ip bgp neighbor 192.168.20.20
BGP neighbor is 192.168.20.20,  remote AS 20, external link
  BGP version 4, remote router ID 199.199.199.199
  BGP state = Established, up for 00:57:11
  Last read 00:00:01, last write 00:00:01, hold time is 5, keepalive interval is 1 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0

                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                1         10
    Keepalives:          2061       3432
    Route Refresh:          0          0
    Total:               2063       3443
  Default minimum time between advertisement runs is 30 seconds

 For address family: IPv4 Unicast
  BGP table version 25, neighbor version 25/0
 Output queue size : 0
  Index 1, Offset 0, Mask 0x2
  1 update-group member
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               1         23 (Consumes 1196 bytes)
    Prefixes Total:                 1         23
    Implicit Withdraw:              0          0
    Explicit Withdraw:              0          0
    Used as bestpath:             n/a         23
    Used as multipath:            n/a          0

                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    AS_PATH loop:                       n/a          1
    Bestpath from this peer:             23        n/a
    Total:                               23          1
  Number of NLRIs in the update sent: max 1, min 1

  Connections established 1; dropped 0
  Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 1
Local host: 192.168.20.1, Local port: 179
Foreign host: 192.168.20.20, Foreign port: 27458


Telnet router Good to verify if it is receiving the networks advertised by WG1R1

 WG1R1#telnet good
Trying good (192.168.20.20)... Open

Good>en
Password:
Good#show ip bgp
BGP table version is 27, local router ID is 199.199.199.199
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

 *> 197.1.0.0/16     192.168.20.1             0             0 1 i  -------------------- this is the WG1R1 loobpack addresses
*> 200.20.0.0/16    0.0.0.0                  0         32768 i
*> 200.22.0.0/16    192.168.20.22            0             0 22 i

BGP Lab Initial Setup

LAB Topology
Initial Lab Setup:
  1. Perform initial configuration of your routers.
  2. Configure looopback addresses on each workgroup routers WG1R1-WG1R4
  3. Configure LAN IP addresses on router Good, Cheap, Client.
  4. Configure point-to-point Frame-Relay subinterfaces on the Frame Relay links.
  5. Configure IP host mappings to ease Telnet hopping between routers.
  6. Configure any IGP between your routers. (I used OSPF)
Verification:
You have completed this task when you attain these results:
  • All route interfaces are active (line up, line protocol up).
  • You can telnet and ping between all core routers.

WG1R1#show ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0     192.168.20.1    YES NVRAM  up                    up
Serial1/0                  unassigned      YES NVRAM  up                    up
Serial1/0.1                192.168.1.1     YES NVRAM  up                    up
Loopback0                  197.1.1.1       YES NVRAM  up                    up
Loopback1                  197.1.8.1       YES NVRAM  up                    up



WG1R2#show ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
Serial1/0                  unassigned      YES NVRAM  up                    up
Serial1/0.1                192.168.1.2     YES NVRAM  up                    up
Serial1/0.2                192.168.1.5     YES NVRAM  up                    up
Loopback0                  197.1.2.1       YES NVRAM  up                    up
Loopback1                  197.1.3.1       YES NVRAM  up                    up



WG1R3#show ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
Serial1/0                  unassigned      YES NVRAM  up                    up
Serial1/0.1                192.168.1.6     YES NVRAM  up                    up
Serial1/0.2                192.168.1.9     YES NVRAM  up                    up
Loopback0                  197.1.4.1       YES NVRAM  up                    up
Loopback1                  197.1.5.1       YES NVRAM  up                    up


WG1R4#show ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            192.168.21.1    YES NVRAM  up              up
Serial1/0                  unassigned      YES NVRAM  up                      up
Serial1/0.1                192.168.1.10    YES NVRAM  up                    up
Loopback0                  197.1.6.1       YES NVRAM  up                    up
Loopback1                  197.1.7.1       YES NVRAM  up                    up



WG1R1#show frame-relay map
Serial1/0.1 (up): point-to-point dlci, dlci 100(0x64,0x1840), broadcast
          status defined, active

WG1R2#show frame-relay map
Serial1/0.1 (up): point-to-point dlci, dlci 100(0x64,0x1840), broadcast
          status defined, active
Serial1/0.2 (up): point-to-point dlci, dlci 101(0x65,0x1850), broadcast
          status defined, active

WG1R3#show frame-relay map
Serial1/0.1 (up): point-to-point dlci, dlci 101(0x65,0x1850), broadcast
          status defined, active
Serial1/0.2 (up): point-to-point dlci, dlci 102(0x66,0x1860), broadcast
          status defined, active

WG1R4#show frame-relay map
Serial1/0.1 (up): point-to-point dlci, dlci 102(0x66,0x1860), broadcast
          status defined, active



WG1R1#ping wg1r2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 197.1.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/40/72 ms
WG1R1#ping wg1r3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 197.1.4.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/71/104 ms
WG1R1#ping wg1r4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 197.1.6.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 92/100/108 ms