[SOLVED]No internet?

Discussions about using Linux guests in VirtualBox.
Post Reply
lugoteehalt
Posts: 57
Joined: 14. Jun 2008, 12:12

[SOLVED]No internet?

Post by lugoteehalt »

Using Debian Lenny 5 32 bit guest on a Debian Lenny 5 64 bit host.

The guest used to get the internet, then had a bit of trouble with it and the internet has stopped. Internet all right on the host.

Don't know if following is relevant:

Code: Select all

ifconfig -a                                      
eth2      Link encap:Ethernet  HWaddr 08:00:27:e7:ce:98  
          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:1000                        
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)              
          Interrupt:10 Base address:0xd020                    

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:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0                            
          RX bytes:840 (840.0 B)  TX bytes:840 (840.0 B)

Code: Select all

dmesg|grep eth
[    4.615109] eth0: registered as PCnet/PCI II 79C970A
[    6.303986] Driver 'sd' needs updating - please use bus_type methods
[   11.167513] udev: renamed network interface eth0 to eth2

Code: Select all

ifup eth2
Ignoring unknown interface eth2=eth2.


ifup eth0
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
eth0: ERROR while getting interface flags: No such device
Bind socket to interface: No such device
Failed to bring up eth0.
If eth0 is changed to eth2 in /etc/network/interfaces in the guest then eth2 does come up - presumably because udev has renamed eth0 to eth2 - but still cannot get the internet. Great thanks any help.
Last edited by lugoteehalt on 25. Jul 2010, 14:18, edited 1 time in total.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: No internet?

Post by Sasquatch »

Run 'dhclient' as root in the Guest and you should have internet again. The interface name change is because the MAC address changed. Linux creates a new interface name when it detects an interface with a different MAC address. You can change this by editing or removing /etc/udev/rules.d/70-persistent-net.rules and reboot.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
lugoteehalt
Posts: 57
Joined: 14. Jun 2008, 12:12

Re: No internet?

Post by lugoteehalt »

Vast thanks Sasquatch, dhclient worked instantly. Never have worked that out myself in a million years.
rambutan
Posts: 1
Joined: 21. Jun 2011, 13:04
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: W7-64bit,Debian Squeeze,OSX

Re: [SOLVED]No internet?

Post by rambutan »

@Sasquatch

Big THX. Messed around forever until I found your post. dhclient did not work, but editing the persistent-net.rules file did the trick.
Post Reply