User Tools

Site Tools


Raspberry Pi NAS: Networking

Current release of RaspiOS (we are on Debian 10 Buster) uses dhcpcd to manage networking (see Raspberry Pi TCP/IP Networking). This means that:

  • Use /etc/dhcpcd.conf file to define static IP address or fallback IP address (if DHCP fails). The same file is used to e.g. disable WiFi (wlan0) interface.
  • Do not use /etc/network/interfaces for static or dynamic IP assignment.
  • WiFi ESSIDs and passwords are in /etc/wpa_supplicant/wpa_supplicant.conf.
  • Do not install Network Manager.
  • If a gaphical interface is needed, use lxplug-network.
  • If some package installs the systemd wpa_supplicant.service, disable it or you will have two conflicting wpa_supplicant processes running (execute the systemctl disable wpa_supplicant.service command and reboot).

I want the eth0 interface to have a static IP address beside the one eventually assigned by DHCP (i.e. I want an IP alias on eth0:0). This is useful when I wan connect to the host even in an unknown network. To achieve this when dhcpcd is running, it is necessary to create an user defined hook script. See this page for more details: How to configure an IP alias with dhcpcd.



Transfer rate

We measured the transfer rate from other home NASes, just to figure out how much time is required to transfer 500 Gb of data. The receiving NAS is the Raspberry Pi 4 with a Seagate 4 Tb IronWolf 3.5 inch hard disk connected through the X835 USB3 interface. The network is limited to 100 Mbit transfer rate, due to the limit of the LAN switch.

NAS model Disk model Transfer rate (Mbit) 500 Gb transfer time (hours)
LaCie d2 Network WDC WD10EFRX-68FYTN0, 1Tb, 5400 rpm 13 87.5
QNAP TS-120 Hitachi Deskstar 7K1000.B, 1Tb, 7200 rpm 98 12.7

Hard disk performance

To measure the hard disk read performance we copied a large file of about 3 Gb into /dev/null, this is the result timing:

Interface Mb/s
USB 2 31.8
USB 3.0 184.8

If you are interested in transferring large files across the network, beware that a 100 Mbit LAN imposes a limit of 14.7 Mb per second, so the USB 2 interface is enough to sustain that. But if you are interested into Gigabit Ethernet performance offered by the Raspberry Pi 4, you definitely need to use the USB 3.0 interface.

doc/appunti/hardware/raspberrypi_nas_networking.txt · Last modified: 2021/04/02 13:19 by niccolo