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?

Dirk
  • 3,749
  • 3
  • 19
  • 27

1 Answers1

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.