Wednesday, March 27, 2013

BGP Load balacing mechanism:



BGP when runs always rely on some IGP running protocol like dynamic protocols like OSPF, EIGRP  or static and connected routes.

So BGP forwards packet by destination network learned via BGP next hop + the route to reach that next hop with some interior gateway protocol.

1. EBGP does load balacing if it has two or more path to reach the destiantion prefix, provided the peering is done on loopback interfaces. This is like having two static routes to a peer leading to destination network. This has to be in consideration with AS PATH. MED, Local PREF , weight values being equal. The path attributes can spoil LB if not matching.
2. EBGP multipath commands allow to load balance on the number of path given & available.
3. IBGP does loadbalacing on underlying protocol. Like eigrp does equal cost path LB and unequal cost path LB.
4. If the BGP learned destination's next hop is learned on a network which connects over port channel using LACP/PAgP etc. then the channel portocol will load balance/share the packets with channeling mechanism
5. Still if a destination on BGP is learned via a HOP, & the HOP is reachable via static route, & if flow switching is working then one link will be used to flow switch the traffic that matches src/dst IP / port criteria.
6. If a route/HOP is reachable via CEF then CEF could use per src/dst IP, src/dst port & per packet load balancing. Per packet LB has its caveats for other layers of network functional devices; like a firewall may see this as an attack if two packets are learned from different interfaces with same source just because that destination is reachable on equal cost .