cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
484
Views
0
Helpful
7
Replies

BGP Routing - Multihome

dien9
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

pkhatri
Level 11
Level 11

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.

View solution in original post

7 Replies 7

pkhatri
Level 11
Level 11

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.

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.

pkhatri
Level 11
Level 11

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.

Is it doing on the border router?

IP address of next-hop that goes to ISPB/A > peering IP ?

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.

very helpful. thx

No problems.

Kind regards,

Paresh.

Getting Started

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: