08-29-2016 01:36 AM - edited 03-05-2019 04:35 AM
Hi,
Scenario: I have 2 Cisco 1941 routers. Both are running Bgp routing with 2 ISP - A & B.
Router 1 is connected to ISP A and Router 2 to ISP B. I want ISP A as primary ISP. If it fails, traffic should route from ISP B & it should be switched back to ISP A as soon as it is UP.
I am planning to configure HSRP between 2 routers. Let say Router 1 is Active and Router 2 is Standby. So, if active router fails, standby router should route traffic from ISP B.
Moreover, i am planning to configure IP SLA to track BGP peer gateway. So if gateway is not reachable, traffic should be switched to ISP B. And when gateway is available, traffic should be switched to ISP A.
Can anyone guide for this scenario whether i am planning proper or not.
I am attaching Network topology for same.
Regards,,
08-29-2016 04:09 AM
Hi,
Based on your diagram. Is the switch acting as the GW to your internal users? because if that's the case, then you can configure floating static route with ip-sla and tracked-object Unless some users are going via Router2 and some users are going via Router1.
See example below:
ip sla 1
icmp-echo x.x.x.x source-interface gi0/1 (put the P2P ip of your provider router)
timeout 500
frequency 3
ip sla schedule 1 start-time now life forever
!
track 1 ip sla 1 reachability
!
ip route 0.0.0.0 0.0.0.0 1.1.1.1 track 1 ===> Router 1
ip route 0.0.0.0 0.0.0.0 2.2.2.2 5 ===> Router 2 (Higher AD)
HTH.
Regards,
Terence
08-29-2016 04:20 AM
Hi Terence,
Gateway for internal network will be HSRP's standby IP: 192.168.1.254.
and do i have to configure IP sla on both router?
thank you.
regards,
08-29-2016 04:49 AM
Hi all,
The setup was not clear to me. If that's the case then it will work with HSRP, and you can use the track object as per below example:
ip sla 1
icmp-echo x.x.x.x source-interface gi0/1 (put the P2P ip of your provider router)
timeout 500
frequency 3
ip sla schedule 1 start-time now life forever
!
track 1 ip sla 1 reachability
int gi0/0 ===> facing LAN
standby 1 priority 120
standbt 1 preempt
standby 1 track 1 decrement 30
HTH.
Regards,
Terence
08-29-2016 10:37 PM
Hi all,
I am bit confused regarding ip sla. I have to configure IP sla on both router. right?
and what if i want to automatic switch back to ISP A once it is recovered.
and 1 more thing can i give in IP SLA, icmp echo (destination) as 8.8.8.8 instead of my gateway?
thank you,
regards,,
08-29-2016 10:55 PM
Only on Primary ISP connected router (here in your case router 1). You can use 8.8.8.8 in IP SLA to send ICMP.
08-30-2016 12:41 AM
Hi all,
Thank you for support !
As explained by terence & pawan, i dont require to track null0 route. right??
I should track only destination IP: 8.8.8.8
As, i have default route on my primary router:
" ip route 192.168.10.0 255.255.255.0 null0 "
thank you,
Regards,
08-30-2016 02:15 AM
Hi Kartik, are you any good with NAT? I really need some help. Sorry to ask on this thread, but it does not let me create a new submission.
08-29-2016 11:15 PM
Hi,
You will need to configure the ip sla on the primary router only.
It will automatically recover because we add the preemption command on the primary router. So in when the primary comes back online based on the SLA, it will automatically preempt. And yes you can use 8.8.8.8 as well, but take note on the timeout value.
You might need to adjust the value depending on the actual latency towards 8.8.8.8.
HTH.
Regards,
Terence
08-29-2016 04:26 AM
Hi Terance,
Why static routing when we have BGP with neighborship with ISP?
Based on this topology user vlan Gateway should be on both routers and HSRP should be configure between two routers.
HSRP is active on router 1 in normal situation and we should use IP SLA and object tracking on HSRP gateway on router 1. So incase IS A goese down HSRP priority will decrements on router 1 and router 2 will be active gateway
08-30-2016 01:30 AM
Hi
I usually prefer not to use IP tracking to manage redundancy. One reasons is that sometime ISPs configure their routers to not respond to ICMP (or they can change this policy in future without warning you), or firewalls could discard this kind of traffic, in some scenario congestion could prevent tracking to work properly.
If you are receiving the default route from both ISP (if not I suggest to discard any other routes), I suggest you to not use IP tracking at all. If I were you I'll configure iBGP between routers 1 and 2 and HSRP on LAN. When network is working good, R1 is HSRP primary and has two path for the default routes: an eBGP path through ISPA and an iBGP path through Router2 and ISPB. Supposing any other BGP path attribute is equal, BGP will prefer eBGP path (otherwise configure a better local preference on Router1).
If link to ISPA goes down (link failure or WAN card failure on Router1) or ISP's router is not reacheable, BGP looses the default route form ISPA but it still has the default through Router2-ISPB. HSRP does'n switch but traffic is routed by Router1 to Router2 and this one will routes traffic to ISP2.
If R1 fails, HSRP switches routers roles, R2 become primary and traffic is routed through ISPB.
Finally note that:
Bye,
enrico.
PS rate if useful
08-30-2016 02:14 AM
hi e.ciollaro,
I thought of this path but i was confuse regarding what configuration i have to do on router 2.
So, thats why i drop this ibgp scenario.
Anyways, if possible can you explain it with configuration command on both routers.
this will be appreciable.
Thank you,
Regards,
08-30-2016 02:44 AM
Yes you can also use ibgp option sample config as below
Router1 config
int L1
des for ibgp with router 2
ip add 1.1.1.1 255.255.255.255
no shut
!
ip route 2.2.2.2 255.255.255.255 <router2 interface IP>
!
router bgp 100
nei 2.2.2.2 remote-as 100
nei 2.2.2.2 update-source L1
nei 2.2.2.2 next-hop-self
!
Router2 config
int L1
des for ibgp with router 1
ip add 2.2.2.2 255.255.255.255
no shut
!
ip route 1.1.1.1 255.255.255.255 <router1 interface IP>
!
router bgp 100
nei 1.1.1.1 remote-as 100
nei 1.1.1.1 update-source L1
nei 1.1.1.1 next-hop-self
!
Regards,
Pawan (CCIE#52104)
Kindly rate for useful post
08-30-2016 03:16 AM
Hi Pawan,
thank you for config command.
This ibgp will be proper solution for redundancy ??
and what if i dont want to use look back address(1.1.1.1 & 2.2.2.2).
can i use 192.168.10.1 & 192.168.10.2 for ibgp??
thank you,
regards,
08-30-2016 06:04 AM
Of course, loopback are usually used because are always on and so reachable through different path
enrico
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