Gentoo in virtualbox, eth0 present but no internet

1

I've a gentoo installation in Virtualbox which was working perfectly few weeks ago. Then all of a sudden it started complaining.

* Bringing up interface eth0 
*   ERROR: interface eth0 does not exist 
*   Ensure that you have loaded the correct kernel module for your hardware 
* ERROR: net.eth0 failed to start

I thought there was a conflict with MAC address, so I changed MAC in Virtual Box. But that looks unrelated now. I've selected intel PRO/1000 MT Desktop (NAT) from VBox. Then I fixed it by removing /etc/udev/rules.d/70-persistent-net.rules

What I see Now is eth0 interface is present. But there is no internet. I can't do ssh to gentoo box.

$ sudo ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:78:72:c8  
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe78:72c8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:846 (846.0 B)

$ sudo rc-update -v show | grep net 
         net.eth0 |      default                 
           net.lo | boot                         
         netmount |      default                 
          network |                              

$ cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /usr/share/doc/openrc*/net.example* and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0="192.168.0.10 netmask 255.255.255.0 brd 192.168.0.255"
routes_eth0="default via 192.168.0.1"

I can't even ping router which is at 192.168.0.1

user36582

Posted 2013-03-12T17:15:55.923

Reputation: 173

Answers

1

Check that you're using Vbox Bridged Adapter.

user168261

Posted 2013-03-12T17:15:55.923

Reputation:

worked BUT docs say I should use Bridged Adapter only if Its in a different subnet. – user36582 – 2013-03-12T18:08:11.750

Docs might be stated in a confusing fashion. "bridged" puts the vb adapter on the same network as your host's adapter - since you're addressing on that network that's what you need. – None – 2013-03-12T18:32:20.937