Configure a link with NAS in Respbian

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.

  1. modify the /etc/network/interfaces file is not working.
  2. 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

Reference:

http://www.techsneeze.com/configuring-static-ip-raspberry-pi-running-raspbian/

https://rasspberrypi.wordpress.com/2012/09/04/mounting-and-automounting-windows-shares-on-raspberry-pi/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s