Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I got KVM working fine on a Linux system, for quite some weeks.

Then today something weird happened: suddenly the host (and the host only) lost some of its Internet access:

  • it can still access the LAN (I can ssh to other machines)
  • it can still access the guests (for example I can ssh from the host into a Linux guest)
  • the forwarding still works (other physical machines on the LAN still have Internet access, yet their using the KVM host as the 'forwarder')

But I didn't touch any configuration file. I was just browsing / using the guests. I tried to ifconfig down br0 and then ifconfig up br0 and reset the route, but to not avail.

Does anyone have any idea as to what's going up? It's my main workstation and it has 2 months of uptime: I don't like rebooting so I'd rather not have to do it (moreover it would just show that the machine ain't stable enough).

EDIT: I add here more details/answers hoping you guys can help me out a bit

Meanwhile I decided to do a shutdown and bring the machine back up and now everything is working fine again but still... I'd like to know if I could solve this the next time it happens without needing to shutdown the host.

do your VMs us a 'public bridge' networking method? (ie: bridged to local lan)

Yes I think so: I use br0 and both the host and the VMs have IPs that are 10.0.0.x which is the same as other physical machines on my LAN

is your host interface wired or wireless?

All wired, no WiFi at all at my home : )

is your default gateway a commodity "router" such as you get from Verizon or Comcast?

It's a Zyxel that I setup myself (I didn't try rebooting it)

if you reboot one of the VMs, does it receive a full network configuration, and is it still capable of reaching the internet, even when the host OS is not?

Yes. That was the "crazy" part. It's as if the host's IP had an issue but the "bridging" kept working fine: I did reboot both VMs and they did both get back network access.

I didn't netstat -rn because I had already rebooted the machine but I will next time there's an issue (and compare to a known ok netstat -rn that I now took).

share|improve this question
    
Under Linux, gatewayed routes for which there is no non-gatewayed route to the router cannot exist. Bringing the link up and down manually using ifconfig or ip link will definitely kill the default route unless you have some daemon monitoring link status. Under some distributions, the canonical way is to use ifup and ifdown. Also, please stop using net-tools (netstat, ifconfig, etc.), and use iproute2. –  pilona Dec 10 '13 at 17:33

1 Answer 1

up vote 1 down vote accepted

Sounds like maybe your host lost it's default route.

Some questions.

  1. do your VMs us a 'public bridge' networking method? (ie: bridged to local lan)

  2. is your host interface wired or wireless?

  3. is your default gateway a commodity "router" such as you get from Verizon or Comcast?

  4. if you reboot one of the VMs, does it receive a full network configuration, and is it still capable of reaching the internet, even when the host OS is not?

My home router stops properly handing out DHCP every once in a while, and needs to be reset. When this happens, anytime a lease expires, I can lose internet access until I reboot it. Depending on how the VM networking is setup, your VMs may be receiving faux-DHCP information from QEMU, rather than sending out DHCP packets on the wire.

Check your routing table (netstat -rn) and make sure your default is a) there, and b) correct.

Wifi interfaces don't do bridging properly, if at all, but you mentioned that everything was working before, so I don't think that's going to be the culprit.

share|improve this answer
    
+1, thanks for helping me... I answer your questions in an edit to my question because it's too long for a comment :) –  Cedric Martin Oct 30 '11 at 0:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.