08-21-2024 12:11 AM
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
08-21-2024 12:18 AM
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
08-21-2024 12:46 AM - edited 08-21-2024 12:47 AM
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
08-21-2024 12:50 AM
08-21-2024 12:19 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide