Debian 6 - 64 bits - Ips Adicionais [RESOLVIDO]

1. Debian 6 - 64 bits - Ips Adicionais [RESOLVIDO]

André Domingues
dindeco

(usa Debian)

Enviado em 08/08/2011 - 11:27h

Olá para os que tiverem conhecimento desde já fico agradecido por meu ajudar.

Bom eu equipamento possui 5 ips adicionais porem so funcionam se eu rodar ele pelo console ex:
preciso digitar ifup eth0:0 ifup eth0:1 ifup eth0:2 ifup eth0:3 ifup eth0:4, e ocorre de algumas vezes no dia algum ip cai da maquina por alguns minutos e o mesmo volta sozinho sem nenhuma intervenção minha, irei posta minha interfaces e eu r.local. ips ilustrativos.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 189.1.161.50
netmask 255.255.255.0
network 189.1.161.0
broadcast 189.1.161.255
gateway 189.1.161.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
dns-search mundigames.com.br

auto eth0:0
iface eth0:0 inet static
address 189.1.161.12
netmask 255.255.255.0
network 189.1.161.0
broadcast 189.1.161.255
gateway 189.1.161.1

auto eth0:1
iface eth0:1 inet static
address 189.1.161.208
netmask 255.255.255.0
network 189.1.161.0
broadcast 189.1.161.255
gateway 189.1.161.1

auto eth0:2
iface eth0:2 inet static
address 189.1.161.65
netmask 255.255.255.0
network 189.1.161.0
broadcast 189.1.161.255
gateway 189.1.161.1

auto eth0:3
iface eth0:3 inet static
address 189.1.161.85
netmask 255.255.255.0
network 189.1.161.0
broadcast 189.1.161.255
gateway 189.1.161.1

auto eth0:4
iface eth0:4 inet static
address 189.1.161.126
netmask 255.255.255.0
network 189.1.161.0
broadcast 189.1.161.255
gateway 189.1.161.1



e r.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.

ifup eth0
# By default this script does nothing.

ifup eth0:0
ifup eth0:1
ifup eth0:2
ifup eth0:3
ifup eth0:4

exit 0



  


2. Re: Debian 6 - 64 bits - Ips Adicionais [RESOLVIDO]

Anderson L Tamborim
y2h4ck

(usa Suse)

Enviado em 10/08/2011 - 14:27h

Retire a linha de gateways das interfaces virtuais.
Provavelmente após isso irá funcionar :]

Toda interface virtual segue o gateway da interface fisica a qual ela pertence.


3. Re: Debian 6 - 64 bits - Ips Adicionais [RESOLVIDO]

André Domingues
dindeco

(usa Debian)

Enviado em 10/08/2011 - 15:25h

no caso eu tiraria somente do ip adicional ficando assim?

auto eth0:0
iface eth0:0 inet static
address 189.1.161.12
netmask 255.255.255.0
network 189.1.161.0
broadcast 189.1.161.255

ou do ip principal tb?


4. Re: Debian 6 - 64 bits - Ips Adicionais [RESOLVIDO]

Anderson L Tamborim
y2h4ck

(usa Suse)

Enviado em 22/08/2011 - 09:31h

Siga a instrução da forma que eu coloquei claramente
"remova os gateways das interfaces virtuais".
Ou seja ... somente das eth0:*

Se voce remover da eth0... ai que nao vai funcionar :P


5. Re: Debian 6 - 64 bits - Ips Adicionais [RESOLVIDO]

André Domingues
dindeco

(usa Debian)

Enviado em 28/08/2011 - 11:20h

sim eu fiz isso quando dou reboot ainda nao sobe os ips adiconais somente o principal, eu preciso dar os comandos ifup eth0:0; ifup eth0:1 ;ifup eth0:2 ;ifup eth0:3 ;ifup eth0:4 , para subir, talves tenho alguma alternativa colocar esse comando para executar toda vez quando ter um reboot, isso já me ajudaria.