Добрый день. Есть виртуальный сервер с двумя ip. OS debian 8
ifconfig
eth0 Link encap:Ethernet HWaddr fa:16:3e:6d:f5:11
inet addr:IP1 Bcast:IP1 Mask:255.255.255.255
inet6 addr: fe80::f816:3eff:fe6d:f511/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:87 errors:0 dropped:0 overruns:0 frame:0
TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10019 (9.7 KiB) TX bytes:7975 (7.7 KiB)
eth0:0 Link encap:Ethernet HWaddr fa:16:3e:6d:f5:11
inet addr:IP2 Bcast:IP2 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:733 errors:0 dropped:0 overruns:0 frame:0
TX packets:733 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:355224 (346.8 KiB) TX bytes:355224 (346.8 KiB)
iface eth0 inet static
address IP1
netmask 255.255.255.255
post-up /sbin/ip route add Gateway1 dev eth0
post-up /sbin/ip route add default via Gateway1
pre-down /sbin/ip route del default via Gateway1
pre-down /sbin/ip route del Gateway1 dev eth0
dns-nameserver 213.186.33.99
dns-search ovh.net
post-up /sbin/ifconfig eth0:0 IP2 netmask 255.255.255.255 broadcast IP2
post-down /sbin/ifconfig eth0:0 down