Sunday, February 6, 2011

BGP (ebgp-multihop) using static routes

This lab mainly for emulation in using "ebgp-multihop" and "static route " to reach to external network while one of the physical serial interface down.

As I am a newbie learning BGP, sometime it take time to understand how to use ebgp-multihop. I hope this lab can explain well.

Download complete GNS3 lab files from https://docs.google.com/leaf?id=0B889ogd4ltI2ZjYyMDVhZjQtYjY4OS00NDUwLWI4YmEtY2Q1ODcwYTY0YTUw&hl=en&authkey=CJeusKgO


















R1 is in AS 100 with following configuration.

Two serial interfaces with IP 2.2.2.1 and 1.1.1.1 for redundancy
Two loopback for testing ebgp multi hop. (10.10.10.10) and external network emulation for 150.10.1.1
--------------
R2 is in AS 200 with following config.
Two serial intefaces with IP 2.2.2.2 and 1.1.1.2 for redundancy
Two loopback for testing ebgp multi hop. (5.5.5.5) and external network emulation for 160.10.1.1
========================
Create EBGP neighbors using external IP of two routers.
Establish BGP neighbors. (noted that the lab is not using phyisical serial interfaces for BGP neighbor relationship becuase if one of the
physical inteface is down, BGP neighbor relationship will continue and next-hop address will update by itself to reach to external network)
---------------------

Configurations in R1
==============

router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 10.10.10.10 mask 255.255.255.255
 redistribute static
 neighbor 160.10.1.1 remote-as 200
 neighbor 160.10.1.1 ebgp-multihop 255
 neighbor 160.10.1.1 update-source Loopback0
----------
For static route configuration in R1 to reach external IPs.

ip route 160.10.0.0 255.255.0.0 1.1.1.2
ip route 160.10.0.0 255.255.0.0 2.2.2.2

================================================
Configuration in R2

router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 5.5.5.5 mask 255.255.255.255
 neighbor 150.10.1.1 remote-as 100
 neighbor 150.10.1.1 ebgp-multihop 255
 neighbor 150.10.1.1 update-source Loopback0
----------------
Static route will be configure as follow to reach to external IP through serial interfaces.

ip route 150.10.0.0 255.255.0.0 1.1.1.1
ip route 150.10.0.0 255.255.0.0 2.2.2.1
=============================================================
This is how I tested by shutting down s1/1 from AS 200 router.

Before shut down s1/1 from AS 200
R1#sh ip bgp
BGP table version is 6, local router ID is 150.10.1.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
*> 5.5.5.5/32       160.10.1.1               0             0 200 i
*> 6.6.6.6/32       0.0.0.0                  0         32768 ?
*> 10.10.10.10/32   0.0.0.0                  0         32768 i
*> 160.10.0.0       1.1.1.2                  0         32768 ?
-----------
Note that to reach to 160.10.0.0, next hop address is 1.1.1.2

After shutdown s1/1 from AS 200,  next hop address has changed to 2.2.2.2 (s1/0) automatically to reach to external route 160.10.0.0/24

R1#sh ip bgp
BGP table version is 7, local router ID is 150.10.1.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
*> 5.5.5.5/32       160.10.1.1               0             0 200 i
*> 6.6.6.6/32       0.0.0.0                  0         32768 ?
*> 10.10.10.10/32   0.0.0.0                  0         32768 i
*> 160.10.0.0       2.2.2.2                  0         32768 ?

No comments:

Post a Comment