12-20-2005 07:17 PM - edited 03-03-2019 01:11 AM
I have a Multihome BGP Border Router - 7500, it have 2 BGP peer with two ISP (ISP A & ISP B, Different AS), I have two Class C network - 10.10.10.0 & 10.10.20.0, how can I setup 10.10.10.0 customer in & out traffic thru ISP A while 10.10.20.0 in & out traffic thru ISP B ?
Can bgp route according to source ip address ?
Please help, Urgent.
Solved! Go to Solution.
12-20-2005 07:47 PM
Hi,
If you want to route traffic based on source addresses, you really need to use policy-based routing. BGP does not support this by itself. Remember that BGP only populates the routing table. The actual routing is done based on the contents of the routing table, which typically performs destination-based routing, unless PBR is in effect.
In your case, use the following config:
route-map PBRPolicy permit 10
match ip address 1
set ip next-hop
!
route-map PBRPolicy permit 20
match ip address 2
set ip next-hop
!
access-list 1 permit 10.10.10.0 0.0.0.255
access-list 2 permit 10.10.20.0 0.0.0.255
Then, on the interfaces that go to 10.10.10.0/24 and 10.10.20.0/24, configure the following command:
e.g.
interface ethernet 0/0
ip policy route-map PBRPolicy.
Hope that helps.
Paresh
Pls rate this post if it helps.
12-20-2005 07:44 PM
Hi,
If you want to route traffic based on source addresses, you really need to use policy-based routing. BGP does not support this by itself. Remember that BGP only populates the routing table. The actual routing is done based on the contents of the routing table, which typically performs destination-based routing, unless PBR is in effect.
In your case, use the following config:
route-map PBRPolicy permit 10
match ip address 1
set ip next-hop
!
route-map PBRPolicy permit 20
match ip address 2
set ip next-hop
!
access-list 1 permit 10.10.10.0 0.0.0.255
access-list 2 permit 10.10.20.0 0.0.0.255
Then, on the interfaces that go to 10.10.10.0/24 and 10.10.20.0/24, configure the following command:
e.g.
interface ethernet 0/0
ip policy route-map PBRPolicy.
Hope that helps.
Paresh
Pls rate this post if it helps.
12-21-2005 04:06 AM
Hi,
The PBR example given solves the outgoing traffic issue. The return traffic has to be influenced by BGP.
The common practice to do this is AS path prepending. Assuming yous AS is 65000 you would announce
to ISP A
10.10.10.0/24 65000
10.10.20.0/24 65000 65000 65000 65000 65000
to ISP B
10.10.10.0/24 65000 65000 65000 65000 65000
10.10.20.0/24 65000
This tries to influence the other AS in the internet to pick the return path you would like. Be aware however that every AS could just set it´s policy to ignore this (f.e. by using local preference). In the end they are all AUTONOMOUS systems.
Hope this helps.
Martin
P.S.: there are good configuration examples regarding BGP AS path prepending on CCO.
12-20-2005 07:47 PM
Hi,
If you want to route traffic based on source addresses, you really need to use policy-based routing. BGP does not support this by itself. Remember that BGP only populates the routing table. The actual routing is done based on the contents of the routing table, which typically performs destination-based routing, unless PBR is in effect.
In your case, use the following config:
route-map PBRPolicy permit 10
match ip address 1
set ip next-hop
!
route-map PBRPolicy permit 20
match ip address 2
set ip next-hop
!
access-list 1 permit 10.10.10.0 0.0.0.255
access-list 2 permit 10.10.20.0 0.0.0.255
Then, on the interfaces that go to 10.10.10.0/24 and 10.10.20.0/24, configure the following command:
e.g.
interface ethernet 0/0
ip policy route-map PBRPolicy.
Hope that helps.
Paresh
Pls rate this post if it helps.
12-28-2005 11:05 PM
Is it doing on the border router?
IP address of next-hop that goes to ISPB/A > peering IP ?
12-28-2005 11:21 PM
Yep, the border router is where you need to do. The next-hop will be the peering address, since EBGP peers with link addresses.
Give that a shot and let us know how you go.
Regards,
Paresh.
12-28-2005 11:30 PM
very helpful. thx
12-28-2005 11:47 PM
No problems.
Kind regards,
Paresh.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: