04-27-2024 01:35 PM
Hello,
Need some help on the below code. we have 2 bgp path ( primary and backup) and i configure 1 subnet to be routed through main path and the rest 3 subnets through backup.
on the backup i have the 3 subnet primary and the first subnet as backup
router bgp 334
no bgp default ipv4-unicast
neighbor 192.169.2.1 remote-as 444
neighbor 192.169.2.1 description ISP-B
neighbor 192.169.1.1 remote-as 222
neighbor 192.169.1.1 description ISP-A
neighbor 192.169.1.1 ebgp-multihop 5
!
address-family ipv4
network 10.0.0.0 mask 255.255.255.0
network 20.0.0.0 mask 255.255.255.0
network 30.0.0.0 mask 255.255.255.0
network 40.0.0.0 mask 255.255.255.0
neighbor 192.169.2.1 activate
neighbor 192.169.2.1 next-hop-self
neighbor 192.169.2.1 soft-reconfiguration inbound
neighbor 192.169.2.1 prefix-list ISPBIn in
neighbor 192.169.2.1 route-map ISPBOut out
neighbor 192.169.1.1 activate
neighbor 192.169.1.1 next-hop-self
neighbor 192.169.1.1 weight 500
neighbor 192.169.1.1 soft-reconfiguration inbound
neighbor 192.169.1.1 route-map ISPAOut out
maximum-paths 4
exit-address-family
!
ip prefix-list ISPBIn seq 10 permit 0.0.0.0/0
ip prefix-list ISPBIn seq 100 deny 0.0.0.0/0 le 32
route-map ISPBOut permit 20
match ip address prefix-list ISPBPrimary
set origin incomplete
!
route-map ISPBOut permit 30
match ip address prefix-list ISPBBackup
set origin incomplete
set as-path prepend 334 334 334 334
route-map ISPAOut permit 10
match ip address prefix-list ISPAPrimary
set origin incomplete
route-map ISPAOut permit 20
match ip address prefix-list ISPABackup
set origin incomplete
set as-path prepend 334 334 334 334
ip prefix-list ISPBPrimary seq 20 permit 20.0.0.0/24
ip prefix-list ISPBPrimary seq 30 permit 30.0.0.0/24
ip prefix-list ISPBPrimary seq 40 permit 40.0.0.0/24
ip prefix-list ISPBPrimary seq 100 deny 0.0.0.0/0 le 32
ip prefix-list ISPBBackup seq 50 permit 10.0.0.0/24
ip prefix-list ISPBBackup seq 100 deny 0.0.0.0/0 le 32
ip prefix-list ISPAPrimary seq 5 permit 10.0.0.0/24
ip prefix-list ISPAPrimary seq 100 deny 0.0.0.0/0 le 32
ip prefix-list ISPABackup seq 8 permit 20.0.0.0/24
ip prefix-list ISPABackup seq 9 permit 30.0.0.0/24
ip prefix-list ISPABackup seq 10 permit 40.0.0.0/24
ip prefix-list ISPABackup seq 100 deny 0.0.0.0/0 le 32
________________________________________________
Its not matching 100% .
04-27-2024 01:47 PM
This not clear
Route these subnet need route-map IN and you receive this prefix' am I correct?
MHM
04-27-2024 02:05 PM
adding the below in the routes.
ip route 10.0.0.0 255.255.255.0 Null0 252
ip route 20.0.0.0 255.255.255.0 Null0 252
ip route 30.0.0.0 255.255.255.0 Null0 252
ip route 40.0.0.0 255.255.255.0 Null0 252
Want to set the first subnet (10.0.0.0) to be on main path uplink and downlink . while the others on the backup path and vice versa
Can you inform me what am doing wrong in the configuration above ?
04-27-2024 04:24 PM
Sorry' maybe other help you in your task'
But what you want to achieve can not done with only these step.
The prefix you mention is send via primary and backup' and this effect traffic INBOUND to these subnet' for traffic OUTBOUND you need route-map "pbr" since I think receive default route from both ISP.
Thanks a lot
Have a nice weekend
MHM
04-28-2024 02:28 AM
04-29-2024 06:47 AM
Hello Paul
As i can see in this solution, the first subnet 10.0.0.0/24 will not be advertised the main path.
Regards,
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