0

I installed OpenMediaVault on my Raspberry Pi and connected a USB 3.0 LAN adapter to the Raspberry where a LAN cable is connected. I can access the hard drive, which is also connected to the Raspberry, and OMV remotely, so the LAN adapter works.

I have defined the following network interface (eth0 is the build-in lan and eth1 is the lan adapter).

# The loopback network interface
auto lo
iface lo inet loopback

# eth0 network interface
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
iface eth0 inet6 manual
    pre-down ip -6 addr flush dev $IFACE
# eth1 network interface
auto eth1
iface eth1 inet static
address 192.168.0.114
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

ifconfig Output:

[...]
eth1      Link encap:Ethernet  HWaddr 00:e0:4c:68:ce:15  
          inet addr:192.168.0.114  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2743 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2559 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:283457 (276.8 KiB)  TX bytes:5385381 (5.1 MiB)
[...]

route output:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth1
192.168.0.0     *               255.255.255.0   U     0      0        0 eth1

My problem is that I can't access websites outside my own network. For example the command

ping -c 4 google.com

returns

ping: unknown host google.com

So the command

sudo apt-get update

does not work either.

What am I doing wrong here?

  • You're probably missing nameservers ... cat /etc/resolv.conf ... There are numerous methods of assigning namesevers. I'm unfamiliar with OMV's default networking behavior. However, from the image file it looks like they may be using network manager. – RubberStamp Sep 5 '18 at 22:29
  • After installing OMV and playing around a bit, it looks like the network configuration is manageable through the web interface which should be available at the unit's IP address in your favorite browser. ping raspberrypi.local should respond with the unit's IPv4 address. The underlying default networking is performed via Network Manager... there's a command line interface nmcli and here's how to setup a static address using nmcli – RubberStamp Sep 6 '18 at 0:36
  • From where do you ping? From the DHCP subnet behind eth0, or from subnet 192.168.0.0/24 behind eth1? Can you ping 8.8.8.8? – Ingo Sep 6 '18 at 1:20
  • Yes I can ping 8.8.8.8. When I type ping -I eth1 google.com, I get the same error. I defined the eth1 interface in OVM's web interface, but the problem still persists. nmcli is not installed and I cannot install it, because I don't have access outside my own network. One thing to mention: When I plug the lan cable in the build-in box, I can access the internet. – OldTimeRambler Sep 6 '18 at 13:55
0

The best way, was not to make the interface static. Just used DHCP, with the disadvantage that the IP-Adress might change when restarting the Raspberry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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