当前位置:网站首页>Keepalived set the master not to recapture the VIP after fault recovery (it is invalid to solve nopreempt)
Keepalived set the master not to recapture the VIP after fault recovery (it is invalid to solve nopreempt)
2022-07-04 02:26:00 【Daxin brother 666】
Be careful : Be sure to turn off the firewall test first , First, we can ensure that the test passes .
If the server must use a firewall , Then after the test is correct , Run... By command VRRP Routing redundancy protocol .
Allow multicast , Both devices need to perform
iptables -A INPUT -d 224.0.0.18 -j ACCEPT
Or modify :vim /etc/sysconfig/iptables
Add rows in place :
-A INPUT -d 224.0.0.18 -j ACCEPT
- 1.
- 2.
- 3.
- 4.
- 5.
By default keepalived There is a master server (master, Later it will be called M The server ), A standby server (backup, Later it will be called B The server ). Under normal circumstances M The server takes over VIP Become 【 Lord 】, When M When the server goes down ,B The server takes over VIP Become 【 Lord 】, The effect of disaster recovery has been achieved , If M The server is back to normal again , that M The server will recover VIP Become 【 Lord 】 B The server becomes 【 To prepare 】.
The core configuration is as follows , Configuration here is incomplete , We need to pay attention to :
Master To configure
vrrp_instance VI_1 {
state MASTER
interface eno16777736
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.80.120
}
#notify_master /home/keepshell/notify_master.sh
#notify_backup /home/keepshell/notify_backup.sh
#notify_fault /home/keepshell/notify_fault.sh
#notify_stop /home/keepshell/notify_stop.sh
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
Backup To configure
vrrp_instance VI_1 {
state BACKUP
interface eno16777736
virtual_router_id 51
nopreempt
priority 90
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.80.120
}
#notify_master /home/keepshell/notify_master.sh
#notify_backup /home/keepshell/notify_backup.sh
#notify_fault /home/keepshell/notify_fault.sh
#notify_stop /home/keepshell/notify_stop.sh
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
Sometimes we need M Do not take over again after the server returns to normal VIP, Give Way B The server continues to be 【 Lord 】 Let later return to normal M The server is 【 To prepare 】.
modify Master To configure , Backup The configuration of the server remains unchanged .
vrrp_instance VI_1 {
state BACKUP
interface eno16777736
virtual_router_id 51
priority 100
nopreempt
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.80.120
}
notify_master /home/keepshell/notify_master.sh
notify_backup /home/keepshell/notify_backup.sh
notify_fault /home/keepshell/notify_fault.sh
notify_stop /home/keepshell/notify_stop.sh
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
state MASTER It is amended as follows state BACKUP nopreempt Set not to snatch VIP
you 're right , modify M,B Server's state BACKUP All for 【 To prepare 】 type , Simultaneous setting nopreempt Set not to snatch VIP, And then start M The server ,M The server will become 【 Lord 】,
Then start B The server , because M High priority 【priority 100】 therefore B Won't rob VIP, At this time M Downtime ,B Become 【 Lord 】, next M Back to normal , Due to the nopreempt therefore M Won't rob VIP,B Continue for 【 Lord 】 and M by 【 To prepare 】.
Technology exchange group : 212320390
边栏推荐
- Network byte order
- Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)
- G3 boiler water treatment registration examination and G3 boiler water treatment theory examination in 2022
- 中電資訊-信貸業務數字化轉型如何從星空到指尖?
- Bugku Zhi, you have to stop him
- Jerry's watch information type table [chapter]
- Applet graduation project based on wechat selection voting applet graduation project opening report function reference
- Flex flexible layout, box in the middle of the page
- After listening to the system clear message notification, Jerry informed the device side to delete the message [article]
- Remote work guide
猜你喜欢

How to subcontract uniapp and applet, detailed steps (illustration) # yyds dry goods inventory #

ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel

Small program graduation project based on wechat examination small program graduation project opening report function reference

Applet graduation project based on wechat selection voting applet graduation project opening report function reference

Override and virtual of classes in C #

What are the conditions for the opening of Tiktok live broadcast preview?

The "message withdrawal" of a push message push, one click traceless message withdrawal makes the operation no longer difficult
![[software implementation series] software implementation interview questions with SQL joint query diagram](/img/8b/8718fea82f83a6169ea5d8c2e5b645.jpg)
[software implementation series] software implementation interview questions with SQL joint query diagram

Iclr2022 | ontoprotein: protein pre training integrated with gene ontology knowledge

Redis transaction
随机推荐
Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
Méthode de calcul de la connexion MSSQL de la carte esp32c3
C # learning notes: structure of CS documents
String: LV1 eat hot pot
Chapter 3.4: starrocks data import - Flink connector and CDC second level data synchronization
Design and implementation of redis 7.0 multi part AOF
Keep an IT training diary 054- opening and closing
Small program graduation project based on wechat video broadcast small program graduation project opening report function reference
Jerry's modification setting status [chapter]
Key knowledge of C language
ZABBIX API batch delete a template of the host
A fan summed up so many interview questions for you. There is always one you need!
Yyds dry goods inventory hand-in-hand teach you the development of Tiktok series video batch Downloader
LV1 previous life archives
FRP intranet penetration
Database concept and installation
AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
What is the intelligent monitoring system of sewage lifting pump station and does it play a big role
Key knowledge of embedded driver
The contact data on Jerry's management device supports reading and updating operations [articles]