12-03-2019 02:21 AM
Dear All,
I am looking for a solution for the following scenario. Any help in this regard would be highly appreciated.
There is one service running on servers which has additional virtual IP (30.30.30.1/30) which could be active on Site A or Site B at any given time but not on both sides at the same time. I need to use static routing on my "Layer 3 Device" which is connected to both Site A and Site B. I need to enable static route tracking to find out whether this Virtual IP is active on Site A or Site B and then somehow automatically change the routing table entry in the "Layer 3 Device" i.e.
If Virtual IP is active on Site A,
route via Site A Switch HSRP Gateway
otherwise
route via Site B Switch HSRP Gateway
is installed in the routing table. I know about IP SLA feature but i think i can't use SLA feature in this scenario. What options can I use in this scenario.
Thanks in advance.
Regards,
AMU
12-03-2019 03:29 AM
Hello,
if your layer 3 device is a Cisco device, you could use the IP SLA below. If 30.30.30.1 cannot be reached via Site A, the secondary route via Site B will be used:
Layer 3 Device
interface GigabitEthernet0/0
description Link to Site A
!
interface GigabitEthernet0/0
description Link to Site A
!
track 1 ip sla 1 reachability
!
ip sla 1
icmp-echo 30.30.30.1 source-interface GigabitEthernet0/0
frequency 5
!
ip sla schedule 1 start-time now life forever
!
ip route 30.30.30.0 255.255.255.252 GigabitEthernet0/0 track 1
ip route 30.30.30.0 255.255.255.252 GigabitEthernet0/1 200
12-03-2019 04:30 AM
Thanks for your Answer Georg, I have already tried IP SLA but it is not working in my scenario because I am not tracking the reachability for gateway/nexthop IP but the address itself 30.30.30.1/32.
12-03-2019 05:20 AM
Hello,
the configuration I posted does exactly that: it tracks the reachability of 30.30.30.1 on Site A. If 30.30.30.1 cannot be reached on Site A, traffic for that virtual IP will go to Site B.
Maybe I misunderstand your setup...
12-03-2019 04:13 AM
Hello
@AMU wrote:
There is one service running on servers which has additional virtual IP (30.30.30.1/30) which could be active on Site A or Site B at any given time but not on both sides at the same time.
So why do you need static routing? -How is this server active on either either site, How is it addressing currenlty being advertied by either site
12-03-2019 04:33 AM
Hi Paul,
I can't use dynamic routing on this "Layer 3 Device". The Servers1/2 and Switches 1/2 are OSPF capable and as soon as this address is active on either site, they are propagated through the OSPF to the Switches1/2 on relevant site.
Thanks,
AMU
12-03-2019 05:49 AM - edited 12-03-2019 05:52 AM
Hello
Apologies here - but it still doesn’t verify your topology
you show a L3 device in between two sites so your not extending you lans across each site but each site has dynamic routing active
Unless u am looking at the the wrong way around and given your topology- how can a server reside in both sites and have the same vip - are you using virtualisation (lisp) etc ??
Or is it this server is upstream from both sites only accessible via the L3 device
12-03-2019 06:14 AM - edited 12-03-2019 06:16 AM
Hi Paul,
Switches 1/2 are and Servers1/2 are running OSPF. The VIP 30.30.30.1/32 is active and available On Server1/2 by an application but either on Site A or Site B at any given time. To explain the scenario, Say be default the VIP is active and available on Site A. Static Routing on "Layer 3 Device"
192.168.10.0/24 via 192.168.10.X (HSRP IP on Switches 1/2, GW) Site A
192.168.20.0/24 via 192.168.20.X (HSRP IP on Switches 1/2, GW) Site B
30.30.30.1/32 via 192.168.10.X (in case it is available on Site A, need to somehow track whether it still available through Site A GW 192.168.10.X)
If there is some issue with Site A Servers than the site Failover is performed. The VIP is not available for some time say 5 minutes but then It is active and available now on Site B. Static Routing on "Layer 3 Device" should automatically now adopt to
192.168.10.0/24 via 192.168.10.X (HSRP IP on Switches 1/2, GW) Site A
192.168.20.0/24 via 192.168.20.X (HSRP IP on Switches 1/2, GW) Site B
30.30.30.1/32 via 192.168.20.X (Adapted the routing entry to Site B, need to somehow track further whether it still available through Site B GW 192.168.20.X, another Site Failover may occur and it will be again available at Site A and we need to adpot the routing again to first scenario)
Thanks and Best Regards,
AMU
12-03-2019 07:23 AM
Hello,
I am just thinking, why not use two IP SLAs, and if one is down, after a delay of 360 seconds (or whatever value you need), an EEM script installs a default route towards the other site. It would look like this:
interface GigabitEthernet0/0
description Link to Site A
!
interface GigabitEthernet0/1
description Link to Site B
!
track 1 ip sla 1 reachability
track 2 ip sla 2 reachability
!
ip sla 1
icmp-echo 30.30.30.1 source-interface GigabitEthernet0/0
frequency 5
!
ip sla schedule 1 start-time now life forever
!
ip sla 2
icmp-echo 30.30.30.1 source-interface GigabitEthernet0/1
frequency 5
!
ip sla schedule 2 start-time now life forever
!
ip route 0.0.0.0 0.0.0.0 ip_address_site_A
event manager applet TRACK_VIP_DOWN
event timer countdown time 360
event track 1 state down
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "no ip route 0.0.0.0 0.0.0.0 ip_address_Site_A
action 4.0 cli command "ip route 0.0.0.0 0.0.0.0 ip_address_Site_B
action 5.0 cli command "end"
event manager applet TRACK_VIP_UP
event timer countdown time 360
event track 1 state up
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "no ip route 0.0.0.0 0.0.0.0 ip_address_Site_B
action 4.0 cli command "ip route 0.0.0.0 0.0.0.0 ip_address_Site_A
action 5.0 cli command "end"
12-03-2019 07:43 AM - edited 12-03-2019 07:43 AM
Hi Georg,
I was also thinking in this direction, combination of IP SLA and EEM. Will try your solution and let you know. Thanks.
12-03-2019 08:08 AM - edited 12-03-2019 08:13 AM
Hello @Georg Pauwen
@Georg Pauwen wrote:
interface GigabitEthernet0/0
description Link to Site A
!
interface GigabitEthernet0/1
description Link to Site B
!
track 1 ip sla 1 reachability
track 2 ip sla 2 reachability
!
ip sla 1
icmp-echo 30.30.30.1 source-interface GigabitEthernet0/0
frequency 5
!
ip sla schedule 1 start-time now life forever
!
ip sla 2
icmp-echo 30.30.30.1 source-interface GigabitEthernet0/1
frequency 5
!
ip sla schedule 2 start-time now life forever
!
ip route 0.0.0.0 0.0.0.0 ip_address_site_Aevent manager applet TRACK_VIP_DOWN
event timer countdown time 360
event track 1 state down
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "no ip route 0.0.0.0 0.0.0.0 ip_address_Site_A
action 4.0 cli command "ip route 0.0.0.0 0.0.0.0 ip_address_Site_B
action 5.0 cli command "end"
event manager applet TRACK_VIP_UP
event timer countdown time 360
event track 1 state up
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "no ip route 0.0.0.0 0.0.0.0 ip_address_Site_B
action 4.0 cli command "ip route 0.0.0.0 0.0.0.0 ip_address_Site_A
action 5.0 cli command "end"
How can you have default routes on the single L3 device that interconnects both of these routing domains when the two sites also have default routes pointing the the L3 devcie -Surely this incur a loop would it not?
12-03-2019 08:24 AM
Hello Paul,
not sure what you mean, how would the loop occur ? At any given time, there would be only one default route on the layer 3 device. That default route would point to the site where the VIP is active.
Either way I cannot test it, better ask the OP...
12-03-2019 08:26 AM
@Georg Pauwen wrote:
Hello Paul,
not sure what you mean, how would the loop occur ? At any given time, there would be only one default route on the layer 3 device. That default route would point to the site where the VIP is active.
Site X default route <> L3 device default route to site X ??(Outch) !
12-03-2019 08:29 AM
12-03-2019 08:58 AM - edited 12-03-2019 08:59 AM
Hello
I understand that’s why I was querying the EMM example @Georg Pauwen provided as has it had defaults pointing to your sites
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