As I understand in BGP load sharing, outgoing load sharing is done using weight and incoming load sharing is done using router map and prepend.
Right now, I have a single ISP and therefore no load sharing.
To the ISP, the BGP configuration is ( this config was sent by the ISP to be done in ours)
router bgp 100
network 192.168.64.0 mask 255.255.255.0
neighbor 192.168.100.1 remote-as 200
neighbor 192.168.100.1 description eBGP peering with ISP Router
neighbor 192.168.100.1 version 4
neighbor 192.168.100.1 send-community
neighbor 192.168.100.1 prefix-list AS200-IN in
neighbor 192.168.100.1 prefix-list AS200-OUT out
ip prefix-list AS200-IN seq 10 permit 0.0.0.0/0
ip prefix-list AS200-IN seq 100 deny 0.0.0.0/0 le 32
ip prefix-list AS200-OUT seq 10 permit 192.168.64.0/24
ip prefix-list AS200-OUT seq 100 deny 0.0.0.0/0
ip route 192.168.64.0 255.255.255.0 Null0 250
ip http server
I don't have an exact 100% idea on what some of the above settings mean.
Now, we are trying to connect to another ISP (assume BGP 400, with neighbour IP: 192.168.200.1),
how do i config it such that we can load share the incoming and outgoing traffic.
For load sharing for outgoing traffic you can use the multipath option in BGP. With this you can use more then 1 best path.
For incomming load-sharing you have to (as you said) prepand your AS at the path you want to use at a backup.
There are more ways to accomplish this, my prefered way is with creating an access-list, match the ACL in your route-map and prepend your AS number.
Example configuration to prepand as-path 100 four times.:
access-list 10 permit 192.168.65.0 0.0.0.255
access-list 10 permit 192.168.66.0 0.0.0.255
route-map prepend_1 permit 10
match ip address 10
set as-path prepend 100 100 100 100
route-map prepend_1 permit 20
! Needed to allow the other ranges to be advertized
router bgp 100
neighbor 22.214.171.124 route-map prepend_1 out
This way you influence the way you advertise your networks.
Normale your network would be reacable by just 100 (1 as_path)
now it is 100_100_100_100_100 (5 paths).
BGP will make a route decision based on a couple of things where-as AS-PATH is the first decision-maker at the most ISP's.[/i]