14.3.2.5 Configuring Disaster Recovery
Here we assume the host method is configured as “proximity”, then start to configure disaster recovery function.
FortiBalancer1
- Step 1 Create a new host name
FortiBalancer(config)#llb dns host “www.example.com” 10.3.210.1
- Step 2 Add a disaster recovery group
FortiBalancer(config)#sdns group dr arr “www.example.com”
- Step 3 Add a primary site
FortiBalancer(config)#sdns group primary arr Beijing
- Step 4 Add a standby site
FortiBalancer(config)#sdns group standby arr Tianjin
FortiBalancer2
- Step 1 Create a new host name
FortiBalancer(config)#llb dns host “www.example.com” 10.3.220.1
- Step 2 Add a disaster recovery group
FortiBalancer(config)#sdns group dr arr “www.example.com”
- Step 3 Add a primary site
FortiBalancer(config)#sdns group primary arr Beijing
- Step 4 Add a standby site
FortiBalancer(config)#sdns group standby arr Tianjin
“www.example.com” is being resolved through nslookup. The resolving results are as follows:
>www.example.com
Server: [10.3.200.1] Address: 10.3.200.1
Name: www.example.com
Address: 10.3.210.1
>www.example.com
Server: [10.3.200.1] Address: 10.3.200.1
Name: www.example.com
Address:10.3.210.1
From the above, the IP address of “www.example.com” on the FortiBalancer1 will be returned every time, because primary is set to Beijing and the member of Beijing site is FortiBalancer1. Then, set 10.3.210.1 on the FortiBalancer1 to DOWN. The result is as follows:
>www.example.com
Server: [10.3.200.1] Address: 10.3.200.1
Name: www.example.com
Address: 20.3.220.1
>www.example.com
Server: [10.3.200.1] Address: 10.3.200.1
Name: www.example.com
Address: 10.3.220.1
At this time, the result is the IP address of “www.example.com” configured on the FortiBalancer2, because this is configured on the FortiBalancer2 of standby Tianjin site.
14.3.3 Configuration Example Based on Topology 2 via CLI
14.3.3.1 Configuring SLB
SLB configuration is the same for Topology 1 and Topology 2.
FortiBalancer1
- Step 1 Configure a real server
FortiBalancer(config)#slb real http “rs1” 10.3.200.110 8080 1000 tcp 1 1
- Step 2 Configure multiple virtual servers
FortiBalancer(config)#slb virtual http “vs1” 10.3.210.1 80 FortiBalancer(config)#slb virtual http “vs2” 10.3.210.2 80
FortiBalancer(config)#slb virtual http “vs3” 10.3.210.3 80
- Step 3 Configure SLB policy
FortiBalancer(config)#slb policy static “vs1” “rs1” FortiBalancer(config)#slb policy static “vs2” “rs1” FortiBalancer(config)#slb policy static “vs3” “rs1”
FortiBalancer2
- Step 1 Configure a real server
FortiBalancer(config)#slb real http “rs1” 10.3.200.110 8080 1000 tcp 1 1
- Step 2 Configure multiple virtual servers
FortiBalancer(config)#slb virtual http “vs1” 10.3.220.1 80
FortiBalancer(config)#slb virtual http “vs2” 10.3.220.2 80
FortiBalancer(config)#slb virtual http “vs3” 10.3.220.3 80
- Step 3 Configure SLB policy
FortiBalancer(config)#slb policy static “vs1” “rs1” FortiBalancer(config)#slb policy static “vs2” “rs1” FortiBalancer(config)#slb policy static “vs3” “rs1”
FortiBalancer3
- Step 1 Configure a real server
FortiBalancer(config)#slb real http “rs1” 10.3.200.110 8080 1000 tcp 1 1
- Step 2 Configure multiple virtual servers
FortiBalancer(config)#slb virtual http “vs1” 10.3.230.1 80
FortiBalancer(config)#slb virtual http “vs2” 10.3.230.2 80
FortiBalancer(config)#slb virtual http “vs3” 10.3.230.3 80
- Step 3 Configure SLB policy
FortiBalancer(config)#slb policy static “vs1” “rs1”
FortiBalancer(config)#slb policy static “vs2” “rs1”
FortiBalancer(config)#slb policy static “vs3” “rs1”