cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1128
Views
1
Helpful
4
Replies

Traffic Routing between 2 BGP peers

ridwanawujoola
Level 1
Level 1

Hi Everyone, 

I’m currently in a bit of hurry to implement a traffic manipulation for a new client. we currently have bgp session with 2 ISP and we are advertising all our prefixes to both as we are running load balancing. 

 

the new client wants their traffic to go through ISP 1 only. Kindly find below bgp configuration.

i will appreciate any assistance. thanks

 

interface GigabitEthernet0/0.1555

description BGP-Fiber-Link to ISP1

encapsulation dot1Q 1555

ip address 1.1.1.1 255.255.255.252

 

interface GigabitEthernet0/5

description Connection to ISP2 Fiber

ip address 2.2.2.2 255.255.255.254

duplex full

speed 1000

 

router bgp 327898

bgp log-neighbor-changes

bgp bestpath as-path multipath-relax

network 177.222.333.0 mask 255.255.254.0

neighbor 2.2.2.2 remote-as 2222

neighbor 2.2.2.2 description ISP2-Upstream

neighbor 2.2.2.2 ebgp-multihop 5

neighbor 2.2.2.2 update-source GigabitEthernet0/5

neighbor 1.1.1.1 remote-as 1111

neighbor 1.1.1.1 description ISP1-Fiber-Link

neighbor 1.1.1.1 ebgp-multihop 5

neighbor 1.1.1.1 update-source GigabitEthernet0/0.1555

maximum-paths 4

!

ip forward-protocol nd

!

no ip http server

no ip http secure-server

!

ip route 177.222.333.0  255.255.254.0 Null0

ip route 177.222.333.0 255.255.255.0 177.222.333.10 name route-to-originate-prefix

ip route 177.222.337.0 255.255.255.0 177.222.333.10 name route-to-originate-prefix

4 Replies 4

Friend ALL IGP and BGP look for destiantion when forwarding packet 

You need PBR which look for both source and destiantion to forwarding packet' so any change in bgp dont help ypu need to use pbr to forward specific subnet toward specific ISP

MHM

access-list 101 permit ip host 177.222.333.85 any

 

access-list 101 permit ip host 177.222.333.85 any

 

interface GigabitEthernet0/0.1555
ip policy route-map PBR-CLIENT

 

 

kindly verify this 

M02@rt37
VIP
VIP

Hello @ridwanawujoola 

You could manipulate the BGP local-preference attribute, which influences path selection within your AS.

First, create a route map that matches the client's prefix and sets a higher local-preference for routes learned from ISP1, making them more preferred. Then, apply this route map to the BGP neighbor configuration for ISP1. Optionally, you can also create another route map that sets a lower local-preference or the same prefix via ISP2 to further discourage the use of ISP2 for the client's traffic.

After configuring these, you should verify the BGP table to ensure the desired path selection is taking place... 

-- example--
ip prefix-list CLIENT-PREFIX permit client-prefix/x
route-map CLIENT-ISP1-PREF permit 10
match ip address prefix-list CLIENT-PREFIX
set local-preference 200
route-map CLIENT-ISP2-LOWER-PREF permit 10
match ip address prefix-list CLIENT-PREFIX
set local-preference 50
router bgp x
neighbor 1.1.1.1 route-map CLIENT-ISP1-PREF in
neighbor 2.2.2.2 route-map CLIENT-ISP2-LOWER-PREF in


Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.