I am using Respbian on a Pi 3, which accesses the external Internet through wlan and accesses a local NAS server directly through eth0. Configuration of the eth0 NIC is a little bit tricky.
- modify the /etc/network/interfaces file is not working.
- add the following two line at the end of /etc/dhcpcd.conf:
- interface eth0
- static ip_address=192.168.1.10/24
Last but not least, reboot. That’s all. If the eth0 is used for accessing the Internet or a specific organisational network, there might be more necessary settings. But for accessing an internal NAS point, only this setting is enough.
For mounting the shared volume on NAS, run the following command. Some boot script seems nice to have but did not work on my Pi. Folders under mnt directory should be prepared manually in advance.
- sudo mount -t cifs -o username=myname,password=mypassword //192.168.1.10/Volume_1 /mnt/nas_volume1
- sudo mount -t cifs -o username=myname,password=mypassword //192.168.1.10/Volume_2 /mnt/nas_volume2