07-08-2015 02:53 AM - edited 03-05-2019 01:49 AM
Hello,
I have two routers working as main and backup via HSRP. Both of them are advertising the subnet 172.10.10.0/24, the question is I need that the packets with destiny 172.10.10.64/26 subnet, go through the backup router. I applied a route-map with a prefix-list in backup router that include the 172.10.10.64/26 subnet with a better metric. However the packets which are sent to that subnet go through main router. This is the configuration:
- Backup Router (standby status)
router bgp 1000
no synchronization
bgp log-neighbor-changes
network 172.10.10.0
redistribute connected
redistribute static
neighbor iBGP peer-group
neighbor iBGP remote-as 1000
neighbor iBGP route-map iBGP-OUT out
neighbor x.x.x.x remote-as 500
neighbor x.x.x.x description BGP
neighbor x.x.x.x timers 10 30
neighbor x.x.x.x next-hop-self
neighbor x.x.x.x send-community
neighbor x.x.x.x route-map INPUT_NET in
neighbor x.x.x.x route-map USER_NET out
neighbor y.y.y.y peer-group iBGP
neighbor z.z.z.z peer-group iBGP
no auto-summary
!
ip route 172.10.10.0 255.255.255.0 192.168.1.20
ip route 172.10.10.64 255.255.255.192 192.168.1.20
ip prefix-list USER_NET1 seq 1 permit 172.10.10.0 /24
ip prefix-list USER_NET2 seq 1 permit 172.10.10.64/26
route-map USER_NET permit 10
match ip address prefix-list USER_NET1
set metric 105
!
route-map USER_NET permit 20
match ip address prefix-list USER_NET2
set metric 90
!
route-map iBGP-OUT permit 10
set metric 300
set local-preference 100
- Main Router (active status)
router bgp 1000
no synchronization
bgp log-neighbor-changes
network 172.10.10.0
redistribute connected
redistribute static
neighbor iBGP peer-group
neighbor iBGP remote-as 1000
neighbor iBGP route-map iBGP-OUT out
neighbor a.a.a.a remote-as 500
neighbor a.a.a.a description Sesion BGP PRINCIPAL
neighbor a.a.a.a timers 10 30
neighbor a.a.a.a next-hop-self
neighbor a.a.a.a send-community
neighbor a.a.a.a route-map INPUT_NET in
neighbor a.a.a.a route-map USER_NET out
neighbor y.y.y.y peer-group iBGP
neighbor z.z.z.z peer-group iBGP
no auto-summary
!
ip route 172.10.10.0 255.255.255.0 192.168.1.20
ip prefix-list USER_NET1 seq 1 permit 172.10.10.0 /24
route-map USER_NET permit 10
match ip address prefix-list USER_NET1
set metric 100
!
route-map iBGP-OUT permit 10
set metric 300
set local-preference 50
What can i do?
Note: The objetive is all traffic with source or destination 172.10.10.64/26 subnet go through backup router. If backup router fails, the traffic tothat subnet must go through the main router.
Thank you and sorry for my english
07-08-2015 08:16 AM
Is this an internal or external BGP?
Is 172.10.10.0/24 actually split into multiple subnets or is there just a single /24?
What does your HSRP configuration look like?
What does the configuration look like on the other side of the BGP session?
07-09-2015 01:36 AM
Is this an internal or external BGP?
Internal BGP
Is 172.10.10.0/24 actually split into multiple subnets or is there just a single /24?
It's a single /24, but the users have a group of servers with ip addresses within 172.10.10.64/26.
What does your HSRP configuration look like?
Backup Router:
interface Vlanxx
description VLAN port LAN
ip address xxxxxxxxxxx
no ip redirects
no ip proxy-arp
load-interval 30
standby 1 ip yyyyyyyyy
standby 1 preempt
standby 1 track GigabitEthernet0/1
!
interface GigabitEthernet0/0.102
description User LAN
encapsulation dot1Q 102
ip address xxxxxxxxxxx
ip access-group 101 out
no ip redirects
no ip proxy-arp
no cdp enable
standby 3 ip xxxxxxxxxxx
standby 3 preempt
standby 3 track GigabitEthernet0/1
Main router:
interface Vlanxx
description VLAN port LAN
ip address xxxxxxxxxxx
no ip redirects
no ip proxy-arp
load-interval 30
standby 1 ip yyyyyyyyy
standby 1 preempt
standby 1 priority 105
standby 1 track GigabitEthernet0/1
!
interface GigabitEthernet0/0.102
description User LAN
encapsulation dot1Q 102
ip address xxxxxxxxxxx
ip access-group 101 out
no ip redirects
no ip proxy-arp
no cdp enable
standby 3 ip xxxxxxxxxxx
standby 3 preempt
standby 3 priority 105
standby 3 track GigabitEthernet0/1
What does the configuration look like on the other side of the BGP session?
In the other side. the preferred route for all nets is the main router. The 172.10.10.64/26 looks like summarized in 172.10.10.0/24
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