Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kenshinu

macrumors newbie
Original poster
Oct 27, 2008
29
5
I have a MacBook connected to the Network + Internet via WiFi. I then share the network connection via a Patch Cable to an Ubuntu machine and I want to share the files on the Ubuntu OS. So may network looks like:

Router - Subnet A
MacBook
Windows 1
Windows 2
etc..

MacBook - Subnet B
Ubuntu

So I want Windows N to be able to access SMB on the Ubuntu machine. However, I can't do this. Yet I can access Windows N from the Ubuntu machine. I can't put the Ubuntu machine straight into the router via ethernet as the router is located far away from my room.
 

Eric M

macrumors member
Nov 18, 2009
53
0
UK
why different subnets?

The easiest way would be to get rid of shared connection and just add ubuntu box to the network via some sort wifi extender/bridge
I had two different networks before and there was always "something wrong" with the way clients talked to each other (+we are talking multi OS environment here)
...
 

Winni

macrumors 68040
Oct 15, 2008
3,207
1,196
Germany.
I have a MacBook connected to the Network + Internet via WiFi. I then share the network connection via a Patch Cable to an Ubuntu machine and I want to share the files on the Ubuntu OS. So may network looks like:

Router - Subnet A
MacBook
Windows 1
Windows 2
etc..

MacBook - Subnet B
Ubuntu

So I want Windows N to be able to access SMB on the Ubuntu machine. However, I can't do this. Yet I can access Windows N from the Ubuntu machine. I can't put the Ubuntu machine straight into the router via ethernet as the router is located far away from my room.

This is a routing issue. Traffic is routed from the Ubuntu subnet to the shared home network, but there is no route available that tells the Windows clients how to access the Ubuntu machine.

You can add a route manually on each Windows host with the "route add" command on the command prompt - you need to tell them that in order to reach the IP address of the Ubuntu machine they have to go through the IP address of the MacBook to which you patched the Ubuntu box.

You can make that route persistent on the Windows machines with the -p parameter, but in all likelihood you're using DHCP everywhere and all the host addresses might change on the next reboot, invalidating your routing entries (unless, of course, you just add a route for the Ubuntu network and not just its host.

Anyway, this is not a nice setup and you just might want to invest in small switch & router for your network.
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
This is a routing issue. Traffic is routed from the Ubuntu subnet to the shared home network, but there is no route available that tells the Windows clients how to access the Ubuntu machine.

You can add a route manually on each Windows host with the "route add" command on the command prompt - you need to tell them that in order to reach the IP address of the Ubuntu machine they have to go through the IP address of the MacBook to which you patched the Ubuntu box.

You can make that route persistent on the Windows machines with the -p parameter, but in all likelihood you're using DHCP everywhere and all the host addresses might change on the next reboot, invalidating your routing entries (unless, of course, you just add a route for the Ubuntu network and not just its host.

Anyway, this is not a nice setup and you just might want to invest in small switch & router for your network.

That's the best option. For the low cost, instead of adding a route on each machine, just add a route on the Internet router. It adds a hop, but on such a small network, it's a non-issue. The only problem may be that the machine sharing the connection may not allow inbound connections anyway, so the point may be moot. I'd just buy another router as suggested and call it a day. I run two AEBS utilizing a wireless link between them for the machines that aren't close to the Internet router.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.