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

No comments:

Post a Comment