قائمة المدونات الإلكترونية

الجمعة، 17 سبتمبر، 2010

How to Add routing IP Add IP Fail-Over configuring an alias on the main IP in FreeBSD

In one server we can have much IP also if have only one network card.
Just buy an additional IP on our datacenter and routing our IP Fail-Over to our server FreeBSD.

We suppose to have 2 network cards and we do add 2 IP Fail-Over to each card.

This is the routing:
94.23.73.101 > 87.98.222.131
94.23.159.44
> 87.98.222.131
94.23.73.41
> 87.98.223.131
94.23.73.42
> 87.98.223.131

em0:87.98.222.131
em1:87.98.223.131

Open /etc/rc.conf;
ifconfig_em0="inet 87.98.222.131 netmask 255.255.255.0 broadcast 87.98.222.255"
 defaultrouter="87.98.222.254"
 ifconfig_em1="inet 87.98.223.131 netmask 255.255.255.0 broadcast 87.98.223.255"


And add:
ifconfig_em0_alias0="inet 94.23.73.101 netmask 255.255.255.255"
 ifconfig_em0_alias1="inet 94.23.159.44 netmask 255.255.255.255"
 ifconfig_em1_alias0="inet 94.23.73.41 netmask 255.255.255.255"
 ifconfig_em1_alias1="inet 94.23.73.42 netmask 255.255.255.255"


Not all configuration are the same, we can have also a different name of network cards. Now we have em but can have also vr.
Before edit, run ifconfig and see what is the name of your network card.

Consider, each alias start from 0.
If you start with another number or the number are not sequential freebsd wont boot.
Each alias from each network card will start from 0.

ليست هناك تعليقات:

إرسال تعليق