Skip to content

Instantly share code, notes, and snippets.

@Linuxpizi
Created May 7, 2020 10:21
Show Gist options
  • Select an option

  • Save Linuxpizi/77587c3a3cb04c5e6177e0669e436346 to your computer and use it in GitHub Desktop.

Select an option

Save Linuxpizi/77587c3a3cb04c5e6177e0669e436346 to your computer and use it in GitHub Desktop.
keepalived精简配置
  ! Configuration File for keepalived

vrrp_script lis {
    script /opt/sh/lis.sh
    interval 1
    timeout  5
    user     root
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }

    track_script {
        lis
    }

    unicast_src_ip 10.0.0.22
    unicast_peer {
        10.0.0.23
    }

    advert_int 1
    nopreempt

    virtual_ipaddress {
        10.0.0.20
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment