亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 5531 | 回復(fù): 4
打印 上一主題 下一主題

lvs 配置多個虛擬IP [復(fù)制鏈接]

論壇徽章:
1
處女座
日期:2014-01-14 13:59:48
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2013-09-11 20:08 |只看該作者 |倒序?yàn)g覽
keepalived.conf配置如下:
! Configuration File for keepalived

global_defs {
   notification_email {
     acassen@firewall.loc
     failover@firewall.loc
     sysadmin@firewall.loc
   }
   notification_email_from Alexandre.Cassen@firewall.loc
   smtp_server 127.0.0.1
   smtp_connect_timeout 30
   router_id LVS_DEVEL
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 101
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
    xxx.xxx.87.209
        }
}

virtual_server xxx.xxx.87.209 80 {
    delay_loop 6
    lb_algo lc
    lb_kind DR
    nat_mask 255.255.255.255
    persistence_timeout 0
    protocol TCP


    real_server xxx.xxx.87.213 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
            connect_port 80
        }
    }

    real_server xxx.xxx.87.211 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
            connect_port 80
        }
    }

}


vrrp_instance VI_2 {
    state MASTER
    interface eth0
    virtual_router_id 52
    priority 101
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
    xxx.xxx.89.26
        }
}


virtual_server xxx.xxx.89.26 80 {
    delay_loop 6
    lb_algo lc
    lb_kind DR
    nat_mask 255.255.255.255
    persistence_timeout 0
    protocol TCP


    real_server xxx.xxx.89.51 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
            connect_port 80
        }
    }

    real_server xxx.xxx.89.52 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
            connect_port 80
        }
    }




}

realserver.sh如下:
#!/bin/bash
VIP=xxx.xxx.87.209
VIP_2=xxx.xxx.89.26
case "$1" in
start )
/sbin/ifconfig lo:0 $VIP broadcast $VIP netmask 255.255.255.255 up
/sbin/ifconfig lo:1 ${VIP_2} broadcast ${VIP_2} netmask 255.255.255.255 up
/sbin/route add -host $VIP dev lo:0
/sbin/route add -host ${VIP_2} dev lo:1
echo "1" >/proc/sys/net/ipv4/conf/lo/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/lo/arp_announce
echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce
sysctl -p
echo "realserver start"
;;
stop )/sbin/ifconfig lo:0 down
/sbin/ifconfig lo:1 down
/sbin/route del -host $VIP
/sbin/route del -host ${VIP_2}
echo "0" >/proc/sys/net/ipv4/conf/lo/arp_ignore
echo "0" >/proc/sys/net/ipv4/conf/lo/arp_announce
echo "0" >/proc/sys/net/ipv4/conf/all/arp_ignore
echo "0" >/proc/sys/net/ipv4/conf/all/arp_announce
echo "realserver stop"
;;
* )
echo "argment is wrong"
exit 1
esac
exit 0

MASER上有一塊網(wǎng)卡綁定的IP為:xxx.xxx.87.212
現(xiàn)在是telnet xxx.xxx.87.209 80 是通的,不過telnet xxx.xxx.89.26 80 就是不通,不知道為什么,請大家指點(diǎn)。

論壇徽章:
1
處女座
日期:2014-01-14 13:59:48
2 [報(bào)告]
發(fā)表于 2013-09-11 20:23 |只看該作者
自己先回一下。

論壇徽章:
1
處女座
日期:2014-01-14 13:59:48
3 [報(bào)告]
發(fā)表于 2013-09-12 09:18 |只看該作者
哎!也沒有人回

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2013-10-14 11:30 |只看該作者
我想應(yīng)該是realserver上的兩個對應(yīng)的vip必須分開寫。
參考鏈接:http://blog.chinaunix.net/uid-23916356-id-3506943.html

論壇徽章:
1
IT運(yùn)維版塊每日發(fā)帖之星
日期:2015-12-27 06:20:00
5 [報(bào)告]
發(fā)表于 2013-11-20 19:43 |只看該作者
keepalived.conf配置如下:
! Configuration File for keepalived

global_defs {
   notification_email {
     acassen@firewall.loc
     failover@firewall.loc
     sysadmin@firewall.loc
   }
   notification_email_from Alexandre.Cassen@firewall.loc
   smtp_server 127.0.0.1
   smtp_connect_timeout 30
   router_id LVS_DEVEL
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 101
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
    xxx.xxx.87.209
    xxx.xxx.89.26
        }
}

virtual_server xxx.xxx.87.209 80 {
    delay_loop 6
    lb_algo lc
    lb_kind DR
    nat_mask 255.255.255.255
    persistence_timeout 0
    protocol TCP


    real_server xxx.xxx.87.213 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
            connect_port 80
        }
    }

    real_server xxx.xxx.87.211 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
            connect_port 80
        }
    }

}

virtual_server xxx.xxx.89.26 80 {
    delay_loop 6
    lb_algo lc
    lb_kind DR
    nat_mask 255.255.255.255
    persistence_timeout 0
    protocol TCP


    real_server xxx.xxx.89.51 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
            connect_port 80
        }
    }

    real_server xxx.xxx.89.52 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
            connect_port 80
        }
    }
}

這樣配置keepalived試一下。


   
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP