Skip to content
Dec 7 / Greg

VM Failover With SAN Replication Across Multiple Datacenters

This video and the included configs/diagrams show how to have failover with VM infrastructure/SAN replication in multiple datacenters. This basically leverages the power of BGP to move our public addressing. BGP is the ONLY choice to have addressing seamlessly migrate from one site to another…it is the protocol that the Internet happens to run on 😉

We use a combination of Cisco equipment with BGP(using prepending and filtering) and VRRP, though the below configs show HSRP instead(the Cisco proprietary version of VRRP). BGP does our public advertising to the internet while VRRP provides us gateway redundancy inside our network.

We also stretch the VM L2 subnets across the datacenters so we can have seamless VM migration from one location to the other.

Here’s the diagrams that go along with the video: VM Failover Diagrams (1455).

Here’s the video(only about 10 minutes long):

Here are the router configs:
Internet

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
hostname Internet
!
interface FastEthernet0/0
 description houston
 ip address 11.11.11.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description bryan
 ip address 12.12.12.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 10.0.0.1 255.255.255.0
 duplex auto
 speed auto
!
router bgp 1
 bgp log-neighbor-changes
 neighbor 11.11.11.1 remote-as 2
 neighbor 11.11.11.1 version 4
 neighbor 12.12.12.1 remote-as 2
 neighbor 12.12.12.1 version 4
 !
 address-family ipv4
 neighbor 11.11.11.1 activate
 neighbor 11.11.11.1 default-originate
 neighbor 12.12.12.1 activate
 neighbor 12.12.12.1 default-originate
 no auto-summary
 no synchronization
 network 20.0.0.0 mask 255.255.255.0
 exit-address-family
!

Bryan

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
!
hostname bryan
!
!
ip subnet-zero
ip routing
!
!
spanning-tree extend system-id
!
!
!
interface FastEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 no ip address
!
interface FastEthernet0/2
 no switchport
 ip address 12.12.12.1 255.255.255.252
!
interface FastEthernet0/3
 description [failover p2p]
 switchport trunk encapsulation dot1q
 switchport mode trunk
 no ip address
!
interface FastEthernet0/47
 switchport access vlan 20
 switchport mode access
 no ip address
 spanning-tree portfast
!
interface FastEthernet0/48
 switchport access vlan 10
 switchport mode access
 no ip address
 spanning-tree portfast
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan10
 description [Houston Primary]
 ip address 192.168.1.3 255.255.255.0
 no ip redirects
 standby preempt delay minimum 30
 standby 10 ip 192.168.1.1
 standby 10 preempt
 standby 10 track FastEthernet0/2 20
!
interface Vlan20
 description [Bryan Primary]
 ip address 192.168.2.2 255.255.255.0
 no ip redirects
 standby preempt delay minimum 30
 standby 20 ip 192.168.2.1
 standby 20 priority 105
 standby 20 preempt
 standby 20 track FastEthernet0/2 20
!
router bgp 2
 no synchronization
 bgp log-neighbor-changes
 network 1.1.1.0 mask 255.255.255.0
 network 2.2.2.0 mask 255.255.255.0
 network 192.168.1.0
 network 192.168.2.0
 neighbor 12.12.12.2 remote-as 1
 neighbor 12.12.12.2 version 4
 neighbor 12.12.12.2 soft-reconfiguration inbound
 neighbor 12.12.12.2 prefix-list in in
 neighbor 12.12.12.2 route-map out out
 no auto-summary
!
ip classless
ip route 1.1.1.0 255.255.255.0 Null0 250
ip route 2.2.2.0 255.255.255.0 Null0
!
!
!
ip prefix-list in seq 5 permit 0.0.0.0/0
ip prefix-list in seq 15 deny 0.0.0.0/0 le 32
!
ip prefix-list out seq 5 permit 192.168.2.0/24
ip prefix-list out seq 10 deny 0.0.0.0/0 le 32
!
ip prefix-list out-prepend seq 5 permit 192.168.1.0/24
ip prefix-list out-prepend seq 10 deny 0.0.0.0/0 le 32
!
route-map out permit 10
 match ip address prefix-list out
 set origin igp
!
route-map out permit 20
 match ip address prefix-list out-prepend
 set as-path prepend 2 2 2 2
!

Houston

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
!
hostname hou
!
!
ip subnet-zero
ip routing
!
!
interface FastEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/2
 no switchport
 ip address 11.11.11.1 255.255.255.252
!
interface FastEthernet0/3
 description [failover p2p]
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/47
 switchport access vlan 20
 switchport mode access
 spanning-tree portfast
!
interface FastEthernet0/48
 switchport access vlan 10
 switchport mode access
 spanning-tree portfast
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan10
 description [Houston Primary]
 ip address 192.168.1.2 255.255.255.0
 standby preempt delay minimum 30
 standby 10 ip 192.168.1.1
 standby 10 priority 105
 standby 10 preempt
 standby 10 track FastEthernet0/2 20
!
interface Vlan20
 description [Bryan Primary]
 ip address 192.168.2.3 255.255.255.0
 standby preempt delay minimum 30
 standby 20 ip 192.168.2.1
 standby 20 preempt
 standby 20 track FastEthernet0/2 20
!
router bgp 2
 bgp log-neighbor-changes
 neighbor 11.11.11.2 remote-as 1
 neighbor 11.11.11.2 version 4
 !
 address-family ipv4
  neighbor 11.11.11.2 activate
  neighbor 11.11.11.2 soft-reconfiguration inbound
  neighbor 11.11.11.2 prefix-list in in
  neighbor 11.11.11.2 route-map out out
  no auto-summary
  no synchronization
  network 1.1.1.0 mask 255.255.255.0
  network 2.2.2.0 mask 255.255.255.0
  network 192.168.1.0
  network 192.168.2.0
 exit-address-family
!
ip classless
ip route 1.1.1.0 255.255.255.0 Null0
ip route 2.2.2.0 255.255.255.0 Null0 250
!
ip prefix-list in seq 5 permit 0.0.0.0/0
ip prefix-list in seq 15 deny 0.0.0.0/0 le 32
!
ip prefix-list out seq 5 permit 192.168.1.0/24
ip prefix-list out seq 10 deny 0.0.0.0/0 le 32
!
ip prefix-list out-prepend seq 5 permit 192.168.2.0/24
ip prefix-list out-prepend seq 10 deny 0.0.0.0/0 le 32
route-map out permit 10
 match ip address prefix-list out
 set origin igp
!
route-map out permit 20
 match ip address prefix-list out-prepend
 set as-path prepend 2 2 2 2
!
Leave a Comment

 

*