0

I have a NAS drive (server) which has a static IP. When I try and connect my laptop directly to the NAS via Ethernet often the network icon in the Ubuntu unity-panel just plays the Wi-Fi 'connecting' animation and eventually fails.

When I connect my NAS and laptop to my router (and I can connect to the NAS) and then quickly unplug and replug the NAS directly into my laptop, sometimes the wired connection 'sticks' and I can access the NAS directly using the static IP.

There must be some way of connecting this properly without this silly 'hack'(?)

I can see the option of creating a new connection in edit connections -> add but I am unsure of the correct settings.

Advice please.

1

From the sound of it, the network interface in your Ubuntu laptop is set to retrieve it's IP address automatically using DHCP (a "random" free IP address within your network, technical details can be found on Wikipedia). When you plug your laptop into the NAS, Ubuntu recognizes that a data connection is established and will start broadcasting a DHCP request.

Although, your NAS is (in all likelyhood) not a DHCP server and does not respond to the request. Result: Your network icon will keep on asking for an address and show the "loading indicator" while it does.

When you plugin your laptop into your router, it does respond to the DHCP request and give you an address to use inside of your network. That's why this "hack" works.

What you should do when you want to talk to your NAS is give your Ubuntu laptop a static IP address as well, so your laptop does not issue a DHCP request.

(The below text is mostly borrowed from this page that also has some screenshots to guide you along the process).

To change your Ubuntu machine to a Static IP go to System \ Preferences \ Network Connections. Find your interface (usually eth0 or wlan0) and click "Edit".

Now, select the IPv4 settings tab, change Method to Manual, click the Add button. Then type in the Static IP Address, Subnet Mask, DNS Servers, and Default Gateway.

Set your IP address to something in the same range as your NAS. For example if your NAS is on 192.168.0.1, set your laptop to 192.168.0.5 (or something else that's not in use yet). For subnet mask you can then use 255.255.255.0. You can usually leave the default gateway empty.

This should allow your laptop and NAS to talk to each other directly. This should also still allow you to communicate with your router, so you could keep this configuration permanently to avoid having to "switch" all the time.

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.