ip route add: Cannot find device "eth0"

Discussions about using Linux guests in VirtualBox.
Locked
automatix1311
Posts: 34
Joined: 6. Jan 2013, 22:53
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: Debian 7, Ubuntu 14.04

ip route add: Cannot find device "eth0"

Post by automatix1311 »

Hello!

I'm using three VMs:
192.168.56.101 Dev VM Debian 6 + Gnome Adapter 1 Nat Adapter 2 Host-only
192.168.56.102 Sandbox VM Debian 6 Adapter 1 Nat Adapter 2 Host-only
192.168.56.103 Example VM Debian 6 + Gnome Adapter 1 Nat Adapter 2 Host-only
For the Dev and Example the routing is working fine and their routing tables seem to be configured correctly:
root@devmv:/var/log/nginx# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.2.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
192.168.56.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth1
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
root@devmv:/var/log/nginx#
root@examplevm:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.2.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
192.168.56.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth1
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
root@examplevm:~#
The Sandbox cannot be reached from Host (browser, SSH etc.) and has no access to the internet. It's routing table is empty:
root@sandboxvm:~# route -n
root@sandboxvm:~#
For the Dev and the Example I had configured the routing over the GUI (a quick HowTo is here). The Sandbox has no GUI and now I'm trying to set the configs via command line:

Code: Select all

# ip route add 10.0.2.0/24 via 0.0.0.0 dev eth0
Cannot find device "eth0"
#
Can somebody help me please to fill my routing table? Thank you!

Information
  • VirtualBox Version: 4.2.6
  • Host: Windows 7 64 bit
  • Guests (alls the three): Debian 6.0.6 64 bit
  • Log files: attached
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: ip route add: Cannot find device "eth0"

Post by noteirak »

Configuring the guest OS like routing table is out of scope of this forum and should be redirected to appropriate support forums.
Also, this is a post belonging to this discussion : viewtopic.php?f=1&t=53634

I will lock this topic as it doesn't add any new information and is simply a copy paste of the original conversation - this post does not describe a new problem, just a symptom of the original post's one.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Locked