Connecting a NAS device directly to ethernet port

Hi, currently I don’t have both devices at the same place to test this, but maybe someone uses a similar setup. So I’d like to use a CoreELEC device with a NAS device connected directly to the ethernet port of the CE device. So there is no router in between. I can set a fixed ip address on the NAS, I guess the same can be done on the device running CE. And CE should immediately detect the SMB share on the NAS when connected this way, right?
Currently I have the NAS connected to an old samsung tv this way and it works as a media server for the tv. But I lose internet on the tv, because wifi can’t be used at the same time when the NAS is connected. What would be really cool is if I could use CE’s wifi connection while the NAS is connected to ethernet, and if CE was able to somehow passthrough the NAS’ SMB share to the rest of the local network devices, so they could also read/write to the NAS. Any thoughts if something like this could be done? :slight_smile: connecting the NAS to the router doesn’t work for me, because LAN cable doesn’t reach the place where the tv is and wifi is too slow for video.

From your description, i think you need 1 of these 2 options:

  1. Buy a cheap 5-port switch to place at that location: connect CE, NAS & TV to the switch

  2. A more interesting option might be to buy an Access point/router that can be set up as a bridge. You connect everything to it, like option 1, but additionally you can set up a bridge to connect it to the wifi of the house. Its wifi connection will probably be better than the TVs or the CE. So the TV and CE and NAS will instead use the routers wifi

Thanks, yes I think this would work. But I’m trying to keep a lower number of devices in this setup, if possible. And I thought maybe it was possible to configure CE, its linux framework - to do the job of the router.

Not sure about direct connection between CE and NAS by ethernet, perhaps others might offer morr technical solution.
I dont know about configuring CE to act as router. In my mind both CE and NAS are trying to act as “clients” so not sure they can be connected directly. It might require an Ethernet crossover cable.

Have you considered connecting NAS to CE by usb instead of ethernet?

When connecting the NAS to tv - direct connection works, I just had to set manual IPs both in NAS and the tv, so that DHCP would not be used. The “CE as a router” is what interests me more.
I would have to check, but I think NASes are not designed to be connected through USB, the USB ports in the ones that I used are more for connecting external media to the NAS. But it’s worth checking the documentation, if USB connection can be used, this would make things a bit easier.

I think tethering is what you are looking for.

1 Like

this is very interesting, thanks vpeter

Usually if you are connecting two Ethernet “clients” back to back you need to use a cross-over Ethernet cable instead of a regular Ethernet patch lead.

As for your NAS working when connected to TV Directly means, the TV Ethernet port supports Auto MDI-X and hence can do the cross-over internally as needed when talking to other “client” device

1 Like

So, I got a chance to test this setup. After some trial and error - connecting the NAS directly to the CoreELEC device works, I can access the NAS SMB share with CE. I had to manually input the IP address and gateway or subnet mask values in the network settings, when I set the wired connection to manual (one of them was filled by default, the one with 255.255.xxx, and I had to manually input the one with 192.168.xxx, I don’t remember precisely but if someone stumbles upon this post and is interested - I can check). The LAN cable is standard (I think), not crossed-over, unless a crossed over cable somehow ended up in my unused lan cables pile, which is unlikely because I never intentionally purchased such a cable.

Now if I connect CE to wifi, I lose access to the SMB share which is on the NAS connected by ethernet. I tried tethering the ethernet connection ( connection - Enable Ethernet tethering with LibreELEC - Raspberry Pi Stack Exchange) by ssh, it returned the message that ethernet tethering is on. But that doesn’t seem to change anything for my needs. When connected to wifi, I still can’t access the ethernet connected NAS, and this NAS doesn’t appear for other devices on the wifi network.

Thinking about your problem, when connecting CE to wifi, you lose access to the NAS by ethernet: i’m wondering is it that the CE device only allows one type of connection and disables the other?
Another possibility is that the wifi connection forces the CE device to adopt certain parameters like IP, gateway, mask etc. And they are incompatible with the parameters you put manually to connect to the NAS. You might try rethinking those manual parameters to make them compatible to be part of the network created by the wifi (i’m not at all an expert on what you’re trying ti do, just brainstorming)

1 Like

Thanks for your reply. Yes, I think my thoughts (and google searches) are in the same general direction as yours :slight_smile:
But I hope CE doesn’t disable the ethernet connection while connected to wifi and the problem might indeed be the incompatibility of wifi and ethernet network parameters, so CE just doesn’t know when to search on wifi network and when on ethernet. So far, if I understand this correctly - the IP range actually needs to be different for ethernet and wifi (something about this is discussed here I think: Linux - Route Specific Traffic Through Ethernet - Stack Overflow, I had found another question on stackexchange which seems easier to understand earlier, but I can’t find it quickly now).

So I might try to play with IP parameters for the ethernet connection later. But I’m still not sure if that would help me make the NAS accessible for other devices on the network that CE connects to through wifi.

And if I change the NAS manual IP to something like 10.10.xxx from 192.168.xxx, I’m afraid I might lose the ability to adjust the NAS’ settings when connected to my main network router (which has IP addresses as 192.168.xxx). it would be best to set up DHCP on CE ethernet port so it would assign the IP automatically for the NAS, but I guess that would complicate things even more, even if possible.

Edit: found a way to have CE connected to wifi (and able to access other SMB shares on the wifi network), while still being able to access the ethernet connected NAS. With a command “ip route add 192.168.72.20/32 dev eth0”, 192.168.72.20 is the ip of the NAS. This only works until reboot, but it shouldn’t be hard to make this permanent I guess. Still not sure if it’s possible to broadcast the ethernet NAS’ SMB share to the wifi network, but I can live without that.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.