Скрыть
две сети + 2 сетевушки = отказоустойчивый сервер
Есть eth0 и eth1 со следующими параметрами соответственно:
ip1=212.152.36.162 netmask1=255.255.255.240 gateway1=212.152.36.161 dns1=212.152.32.66
ip2=22.12.3.12 netmask2=255.255.255.0 gateway2=22.12.3.1 dns2=22.12.2.4
обе сетевухи воткнуты в мамку и в комп ведет два сетевых кабеля, от разных свичей. Как сделать так, чтобы при произвольном вытаскивании любого из кабелей(но не двух сразу) оставалась доступной сеть в целом и в целом видна была бы машина извне. т.е. своеобразная отказоустойчивая система.
По каким ключевым словам хотя бы искать? Спасибо!
Re: две сети + 2 сетевушки = отказоустойчивый сервер
> По каким ключевым словам хотя бы искать?
По каким-нибудь из этих ищи:
Enabling failover routing
After you have configured your network, the next step is to enable failover routing on your Linux box, so that if the first route dies the router will automatically switch over to the next route. To do so, you'll need to add the default gateway routes provided to you by your ISPs for both your network cards:
# route add default gw 61.16.130.97 dev eth0
# route add default gw 200.15.110.90 dev eth1
Here, 61.16.130.97 is the gateway address given by ISP1 and 200.15.110.90 is the gateway address given by ISP2. Replace them with the addresses available to you. These routes will disappear every time you reboot the system. In order to make these routes permanent add the above two commands in the /etc/rc.d/rc.local file, which is run at boot time.
Also make sure that all the computers on your internal LAN (10.0.0.0/24) have their default gateway address set as the IP address of the eth3 Ethernet interface (i.e. 10.0.0.1) of your failover router.
Finally, modify the /proc/sys/net/ipv4/route/gc_timeout file. This file contains a numerical value that denotes the time in seconds after which the kernel declares a route to be inactive and automatically switches to the other route if available. Open the file in any text editor and change its default value of 300 to some smaller value, say 10 or 15. Save the changes and exit.
Now your Linux machine is ready to serve as a failover router, automatically and quickly switching to the secondary route every time the primary route fails.