Provavelmente uma resposta simples, mas não consigo encontrá-la. Eu estou rodando um Stable Debian multihomed (mais recente) e na interface eth1 eu preciso do endereço IPv4 e IPv6.
Meu / etc / network / interfaces é assim:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
up ip -6 address add 2001:470:28:5b2::1/64 dev $IFACE
O problema é que a interface só recebe o endereço IPv4, não o endereço IPv6. O que estou perdendo?
Ao executar ifup -av :
g00nz@debie:~$ sudo ifup -av
[sudo] password for g00nz:
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
Configuring interface eth1=eth1 (inet)
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
ip addr add 192.168.1.2/255.255.255.0 broadcast 192.168.1.255 dev eth1 label eth1
RTNETLINK answers: File exists
Failed to bring up eth1.
run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant
Parece que o eth1 já está configurado e não consigo adicionar o endereço IPv6, mas quando faço isso no bashprompt ele funciona:
sudo ip -6 addr add 2001:470:28:5b2::1/64 dev eth1
e verifique com ifconfig eth1 :
g00nz@debie:~$ sudo ip -6 addr add 2001:470:28:5b2::1/64 dev eth1
g00nz@debie:~$ sudo ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:24:9b:08:4b:aa
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2001:470:28:5b2::1/64 Scope:Global
inet6 addr: fe80::224:9bff:fe08:4baa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4254 errors:0 dropped:2080 overruns:0 frame:0
TX packets:305 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:469773 (458.7 KiB) TX bytes:45395 (44.3 KiB)
Alguém? : (
/ roger
OK, tentei isso e consegui isso em minhas interfaces / etc / network / agora:
auto eth1
iface eth1 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
iface eth1 inet6 static
address 2001:470:28:5b2::1
netmask 64
Mas ainda assim, quando eu verifico com ip a eu tenho:
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:24:9b:08:4b:aa brd ff:ff:ff:ff:ff:ff
inet 192.168.1.2/24 brd 192.168.1.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::224:9bff:fe08:4baa/64 scope link
valid_lft forever preferred_lft forever
Eu não fico: (
Ainda recebe erro com ifup:
g00nz@debie:~$ sudo ifup -av
[sudo] password for g00nz:
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
Configuring interface eth1=eth1 (inet)
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
ip addr add 192.168.1.2/255.255.255.0 broadcast 192.168.1.255 dev eth1 label eth1
RTNETLINK answers: File exists
Failed to bring up eth1.
run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant
g00nz@debie:~$