We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

Jak podpiac do VPS dodatkowe IP (IP.FAIL.OVER)


dzwoniec
02-01-2015, 19:45
Dokupiłem sobie do vpsa (w ovh / vps cloud) dodatkowe IP (polskie)
i próbuje je podpiąć pod vpsa (stare ip=92.222.189.54 , nowe ip /to chce dodać =92.222.31.3 )
niby robię zgodnie z poradnikiem ale coś nie wychodzi (link do poradnika http://pomoc.ovh.pl/DodajAliasIp#link3 )

na początek podklejam oryginalny /etc/network/interfaces (jeszcze przed zmianami - tu wszystko bangla)
Kod:
auto eth0
iface eth0 inet static
        address 92.222.189.54
        netmask 255.255.255.0
        gateway 92.222.189.254
iface eth0 inet6 static
        address 2001:41D0:0052:0E00:0000:0000:0000:00bb
        netmask 64
        post-up /sbin/ip -f inet6 route add 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F dev eth0
        post-up /sbin/ip -f inet6 route add default via 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F
        pre-down /sbin/ip -f inet6 route del default via 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F
        pre-down /sbin/ip -f inet6 route del 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F dev eth0
tu obecny konfig /etc/network/interfaces - po zmianach (stare IP działa - nowe nie działa - nie odpowiada na ping)
Kod:
auto eth0
iface eth0 inet static
        address 92.222.189.54
        netmask 255.255.255.0
        broadcast 92.222.189.255
        network 92.222.189.0
        gateway 92.222.189.254
        post-up /sbin/ifconfig eth0:0 92.222.31.3 netmask 255.255.255.255 broadcast 92.222.31.3
        post-down /sbin/ifconfig eth0:0 down
iface eth0 inet6 static
        address 2001:41D0:0052:0E00:0000:0000:0000:00bb
        netmask 64
        post-up /sbin/ip -f inet6 route add 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F dev eth0
        post-up /sbin/ip -f inet6 route add default via 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F
        pre-down /sbin/ip -f inet6 route del default via 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F
        pre-down /sbin/ip -f inet6 route del 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F dev eth0
probowalem tez na takim /etc/network/interfaces (i tez nowy ip nie pinguje się)
Kod:
auto eth0
iface eth0 inet static
        address 92.222.189.54
        netmask 255.255.255.0
        broadcast 92.222.189.255
        network 92.222.189.0
        gateway 92.222.189.254
        post-up /sbin/ifconfig eth0:0 92.222.31.3 netmask 255.255.255.255 broadcast 92.222.31.255
        post-down /sbin/ifconfig eth0:0 down
iface eth0 inet6 static
        address 2001:41D0:0052:0E00:0000:0000:0000:00bb
        netmask 64
        post-up /sbin/ip -f inet6 route add 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F dev eth0
        post-up /sbin/ip -f inet6 route add default via 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F
        pre-down /sbin/ip -f inet6 route del default via 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F
        pre-down /sbin/ip -f inet6 route del 2001:41D0:52:0EFF:FFFF:FFFF:FFFF:FF7F dev eth0
jak restartuje networking to dostaje takie info
Kod:
# /etc/init.d/networking restart
[warn] Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
[....] Reconfiguring network interfaces...RTNETLINK answers: No such process
done.
tak wygląda obecnie ifconfig
Kod:
eth0      Link encap:Ethernet  HWaddr 02:00:5c:de:bd:36  
          inet addr:92.222.189.54  Bcast:92.222.189.255  Mask:255.255.255.0
          inet6 addr: 2001:41d0:52:e00::bb/64 Scope:Global
          inet6 addr: fe80::5cff:fede:bd36/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:429 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:120662 (117.8 KiB)  TX bytes:3584 (3.5 KiB)

eth0:0    Link encap:Ethernet  HWaddr 02:00:5c:de:bd:36  
          inet addr:92.222.31.3  Bcast:92.222.31.3  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:65536  Metric:1
          RX packets:224 errors:0 dropped:0 overruns:0 frame:0
          TX packets:224 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:24206 (23.6 KiB)  TX bytes:24206 (23.6 KiB)
Pytanie: jak wymedytować ten /etc/network/interfaces żeby ten nowy IP działał ?
(distro Debian Wheezy)