Eu tenho um sistema Ubuntu executando 12.10
Estou usando o KVM e configurei uma ponte para as máquinas virtuais, que está usando o encaminhamento nat. Eu estou tendo problemas com a conexão caindo periodicamente, por vezes, fica por alguns dias, por vezes, alguns minutos.
Eu desabilitei a bridge para resolver o problema mas ainda está acontecendo, tentei fazer um release manual do dhcp e renovar o que funciona as vezes, ele me pega um novo ip e estou im novamente mas notei que meu ip não está atualizado quando Eu corro ifconfig
ou em configurações de conexão kvm.
/ etc / interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
#auto br0
#iface br0 inet dhcp
# bridge_ports eth0
# bridge_stp off
# bridge_fd 0
# bridge_maxwait 0
ifconfig
eth0 Link encap:Ethernet HWaddr 38:60:77:aa:aa:aa
inet addr:10.0.0.137 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:52068 errors:0 dropped:0 overruns:0 frame:0
TX packets:10900 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12322071 (12.3 MB) TX bytes:2494188 (2.4 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2651 errors:0 dropped:0 overruns:0 frame:0
TX packets:2651 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:402096 (402.0 KB) TX bytes:402096 (402.0 KB)
virbr0 Link encap:Ethernet HWaddr f6:94:09:8f:7b:b5
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
sudo dhcpclient -r -v
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/virbr0/f6:94:09:8f:7b:b5
Sending on LPF/virbr0/f6:94:09:8f:7b:b5
Listening on LPF/eth0/38:60:77:aa:aa:aa
Sending on LPF/eth0/38:60:77:aa:aa:aa
Sending on Socket/fallback
DHCPRELEASE on eth0 to 10.0.0.254 port 67
sudo dhcpclient -v
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/virbr0/f6:94:09:8f:7b:b5
Sending on LPF/virbr0/f6:94:09:8f:7b:b5
Sending on Socket/fallback
DHCPDISCOVER on virbr0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on virbr0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on virbr0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on virbr0 to 255.255.255.255 port 67 interval 15
No momento, a única maneira de recuperar esse estado é desligando o cabo de rede e reiniciando
UPDATE
Quando a conexão é interrompida, tive algum sucesso executando sudo dhclient -v
sem eliminar o endereço primeiro.
dhclient -v
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/virbr0/96:a2:d6:f5:30:fc
Sending on LPF/virbr0/96:a2:d6:f5:30:fc
Listening on LPF/eth0/38:60:77:aa:aa:aa
Sending on LPF/eth0/38:60:77:aa:aa:aa
Sending on Socket/fallback
DHCPDISCOVER on virbr0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPREQUEST of 10.0.0.129 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 10.0.0.129 from 10.0.0.254
DHCPACK of 10.0.0.129 from 10.0.0.254
bound to 10.0.0.129 -- renewal in 5716 seconds.
aqui eu posso ver que estou sendo alugado 10.0.0.129
mas ifconfig ainda exibe 10.0.0.137
eth0 Link encap:Ethernet HWaddr 38:60:77:82:a8:61
inet addr:10.0.0.137 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:312183 errors:0 dropped:0 overruns:0 frame:0
TX packets:85529 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:80808972 (80.8 MB) TX bytes:20479979 (20.4 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3910 errors:0 dropped:0 overruns:0 frame:0
TX packets:3910 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:461047 (461.0 KB) TX bytes:461047 (461.0 KB)
virbr0 Link encap:Ethernet HWaddr 96:a2:d6:f5:30:fc
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)