BGP: LAB: MULTIHOMING / DUAL HOMED / DUAL ROUTER


REFERENCE LINK

http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html

 

SCENARIO

Load balancing on the two links is not possible because BGP chooses the single best path. So, we will go for

Load Sharing using Route-Map(set of conditions) here, instead of Load Balancing.

 

OUTBOUND TRAFFIC REQUIREMENT

  • All traffic that is destined to the Internet from R101 goes out through the R101-R103 link.
  • If the R101-R103 link fails, then all traffic to the Internet from R101 goes through R102 to AS 10.
  • Similarly, all traffic that is destined to the Internet from R102 goes through the R102-R104 link.
  • If the R102-R104 link fails, then all traffic to the Internet from R102 goes through R101 to AS 10.

 

INBOUND TRAFFIC REQUIREMENT

  • Traffic that is destined for network 192.168.11.0/24 from the Internet should come from the R103-R101 link.
  • Traffic that is destined for network 192.168.12.0/24 from the Internet should come from the R104-R102 link.
  • If one link to AS 10 fails, then the other link should route the traffic that is destined for all networks back to AS 11 from the Internet.

 

NETWORK DIAGRAM

 

40c.gif

 

CONFIGURATION

R101

interface Ethernet0/0
 ip address 192.168.11.1 255.255.255.0 secondary
 ip address 192.168.12.1 255.255.255.0
!
interface Serial8/0
 ip address 10.10.13.1 255.255.255.0
!
router bgp 11
 no synchronization
 bgp log-neighbor-changes
 network 192.168.11.0
 network 192.168.12.0
 neighbor 10.10.13.3 remote-as 10
 neighbor 10.10.13.3 route-map R101-103-MAP out

/ The AS_PATH is increased for 192.168.12.0 / 

 neighbor 192.168.12.2 remote-as 11
 neighbor 192.168.12.2 next-hop-self
 maximum-paths 2
 no auto-summary
!
access-list 1 permit 192.168.12.0
access-list 2 permit 192.168.11.0
route-map R101-103-MAP permit 10
 match ip address 1
 set as-path prepend 11 11 11
!         
route-map R101-103-MAP permit 20
 match ip address 2

R102
interface Ethernet0/0
 ip address 192.168.11.2 255.255.255.0 secondary
 ip address 192.168.12.2 255.255.255.0
!
interface Serial8/0
 ip address 10.10.24.2 255.255.255.0
!
router bgp 11
 no synchronization
 bgp log-neighbor-changes
 network 192.168.11.0
 network 192.168.12.0
 neighbor 10.10.24.4 remote-as 10
 neighbor 10.10.24.4 route-map R102-104-MAP out

!--- The AS_PATH is increased for 192.168.11.0.

 neighbor 192.168.12.1 remote-as 11
 neighbor 192.168.12.1 next-hop-self
 no auto-summary
!
access-list 1 permit 192.168.11.0
access-list 2 permit 192.168.12.0
route-map R102-104-MAP permit 10
 match ip address 1
 set as-path prepend 11 11 11
!         
route-map R102-104-MAP permit 20
 match ip address 2


R103
interface Ethernet0/0
 ip address 10.10.34.3 255.255.255.0
!
interface Serial8/0
 ip address 10.10.13.3 255.255.255.0
!
router bgp 10
no synchronization
 bgp log-neighbor-changes
 network 10.10.34.0 mask 255.255.255.0
 neighbor 10.10.13.1 remote-as 11
 neighbor 10.10.13.1 default-originate
 neighbor 10.10.34.4 remote-as 10
 neighbor 10.10.34.4 next-hop-self
 no auto-summary

R104
interface Ethernet0/0
 ip address 10.10.34.4 255.255.255.0

!
interface Serial8/0
 ip address 10.10.24.4 255.255.255.0
!
router bgp 10
 no synchronization
 bgp log-neighbor-changes
 neighbor 10.10.24.2 remote-as 11
 neighbor 10.10.24.2 default-originate
 neighbor 10.10.34.3 remote-as 10
 neighbor 10.10.34.3 next-hop-self
 no auto-summary


VERIFICATION

  1. FOR OUTBOUND TRAFFIC
R101# show ip bgp
Network          Next Hop                Metric LocPrf Weight Path
* i10.10.34.0/24    192.168.12.2                  100      0 10 i
*>                  10.10.13.3               0             0 10 i  

R101# show ip route
B 10.10.34.0 [20/0] via 10.10.13.3, 00:08:53

 

Similarly verify for R102

 

2. FOR INBOUND TRAFFIC

R103# show ip bgp
Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.11.0     10.10.13.1               0             0 11 i             
!--- The next hop is R101.

*  192.168.12.0     10.10.13.1               0             0 11 11 11 11 i   
*>i                 10.10.34.4               0    100      0 11 i             
!--- The next hop is R104

R103# show ip route
B 192.168.12.0/24 [200/0] via 10.10.34.4, 00:04:46
 !--- The next hop is R104.
  B 192.168.11.0/24 [20/0] via 10.10.13.1, 00:04:46
 !--- The next hop is R101

 

 




 


					
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s