2

I am new here so please be patient. :)

I have the following infrastructure and would like to share things between these subnets but don't really know how to do that. (I am just a programmer)

2 subnets

The solid lines are wired connections, and the dotted lines are connected via wifi.

I've already read about this, but it seems to have many approaches and I don't know what's best based on my needs.
Can I share only a printer between 2 different networks? - No PC access
Sharing files across different subnets
Windows file sharing and print sharing across 2 subnets?

Examples of connections that I currently am able to do:

  • Smartphone 1 -> Smart TV 1
  • Smartphone 1 -> Notebook 1
  • Notebook 2 -> Printer 1 (when PC is turned on)
  • Smart TV 1 -> Notebook 1
  • Smart TV 2 -> Notebook 3
  • Notebook 3 -> Printer 2 (when Notebook 4 is turned on)

Examples of connections that I would like to do:

  • Smartphone 1 -> Smart TV 2
  • Smartphone 2 -> Notebook 2
  • Notebook 2 -> Printer 2 (when Notebook 4 is turned on)
  • Notebook 3 -> Printer 1 (when PC is turned on)
  • Smart TV 2 -> Notebook 1

Basically, the only thing that is accessible by both houses is internet.

Switch 1 (house 1)

  • Internal IP 192.168.0.1
  • Mask 255.255.255.0
  • DHCP 192.168.0.20 to 192.168.0.100
  • Blue wire connected to LAN port

Switch 2 (house 2)

  • Internal IP 192.168.0.12
  • Mask 255.255.255.0
  • DHCP 192.168.0.101 to 192.168.0.200
  • Blue wire connected to WAN port
  • Spoofed MAC Address (It contains the MAC Address of the wired connection adapter of Notebook 1)

The Wifi signal of switch 1 on house 2 is almost zero.
Both printers are connected with USB, they don't have network connection.

I use Windows on notebooks and pc, Android on smartphones(Samsung) and don't know about the smart tvs (Samsung) but I think they use some unix version.
I use AllShare or DLNA to connect with Smart TV.

Any more details needed?

Thanks in advance.

Solution

  • Changed WAN to LAN
  • Disabled DHCP
  • Unchecked auto-reconnect WAN
  • Removed spoofed mac address

Everything was done on switch 2

10
  • VPN? between 2 networks? Oct 4, 2013 at 3:12
  • Sorry, but what made you think this was on topic here? This is for connecting two houses, it's clearly not professional sysadmin related. Super User is most likely a better destination.
    – MDMarra
    Oct 4, 2013 at 3:14
  • Yes the IP details matter, and whether the host is a laptop or a smart tv does not matter. Somehow you've got two networks with shared internet - without knowing any network details we can only guess how that's working. I suggest you stop the green WiFi access point doing DHCP and get the internet router do DHCP for House 2. Have everything in one subnet (e.g. 192.168.0.x/24) at both houses. That should do it. Oct 4, 2013 at 3:22
  • Keep it simple. But in order to answer about the printer, it's necessary to know if the printer has a network connection (whether wired or wireless), and/or if you are open to using a networkable print server. I suspect that the scope of your question is too broad, though; perhaps take it one piece at a time, i.e. all devices able to communicate, printer access, etc. The OS on each computer makes a difference too. What you want is obviously do-able, but involves configuring many pieces. (And yes, it would be simpler on one subnet.)
    – Debra
    Oct 4, 2013 at 4:04
  • @DanilaLadner, it is not VPN.
    – w35l3y
    Oct 4, 2013 at 11:53

3 Answers 3

2

Assuming that the Smart TV connections are using DLNA or Airplay or similar, then all these devices must be on a single network unless you have a router that will route multicast between segments.

Understanding how the blue line connects would help clarify what changes need to be made.

However, it is likely that the two houses are on separate IP address ranges right now, and if they are, DLNA and other broadcast protocols will not work across the ranges.

If you were to connect the two switches by LAN ports, rather than LAN/WAN ports, and then disable DHCP at one of the houses, then all devices would be on the same network, and everything you want to do above will work.

From your description, you simply need to relocate the blue wire from the WAN port of switch 2 to the LAN port of switch 2. You currently have two separate networks with the same IP range, so you wouldn't even be able to route between them.

Changing the blue cable to the LAN port puts them on the same network, and both should use a the default gateway of 192.168.0.1 - the switch leading to the internet. The easiest way to do this is to disable the DHCP server on switch 2.

5
  • No, the devices may not be on the same or single network. DLNA uses multicast, not broadcast.
    – rapadura
    Oct 4, 2013 at 11:58
  • Added more details to the question. By saying "disable DHCP at one of the house" you mean use "static ips on that house" or use "DHCP of one house on both" ? Because the second option would be great but I don't know how to do that. I will try LAN/LAN ports later again and see what I missed the first time.
    – w35l3y
    Oct 4, 2013 at 13:11
  • @rapadura It is extremely rare to get a multicast router in a domestic setting
    – Paul
    Oct 4, 2013 at 13:32
  • @w35l3y I have updated my answer - you can get there in two steps :)
    – Paul
    Oct 4, 2013 at 13:35
  • I have a multicast router, its called TomatoUSB :) Linux forever. In any case, DLNA specifies usage of SSDP, which initiates searches and discovery using multicast, on 239.255.255.250.
    – rapadura
    Oct 4, 2013 at 13:47
0

If the blue wire already is in place, all you have to do is make sure they are on the same subnet. If these are windows computers you can easily share resources by configuring them to be in the same home group.

If the blue wire is an electrical conductor, e.g. a twisted pair cable, you will have to consider the grounding potential between the two houses. (I think that is what it's called. I'm neither an electrician or an English major). If it's an optical fiber or a wireless connection you don't have to worry about that.

1
  • Yes, the blue wire already is in place. I think it is not that simple because the nodes are not visible (only until its own switch) the way it currently is. Maybe with the new details in the question will help you to be more specific.
    – w35l3y
    Oct 4, 2013 at 12:33
0

Yes you can do everything you want in that scenario.

Use openvpn as a server in house 2, and as a client in house 1. Set openvpn to use tap mode, not tun. Because this way its easier to get the multicasting and broadcasting services working correctly, and the overhead if you have a good internet-line isnt that crippling.

Next, you bridge the wifi in house 1, the ethernet lans and the vpn interface tap0 together, to br0.

Do the same on house 2. Bam. For all intents and purposes both house 1 & 2 are on the same network and can share everything. You can then filter things out with iptables.

EDIT: Oh I see you have a blue line between your houses. In that case, you dont need vpn over the internet, you just setup bridging mode for everything.

Make a bridge on switch1, the blue lan port is on it, the wifi is on it, and the internal ethernet lans are on the same bridge. (Note, some wifi cards cant be bridged in Linux because they suck). On switch2 bridge the blue lan-port, other ether-net ports and wifi. Just bridge everything!

2
  • I remember that for some reason I couldn't use bridge mode. I will try that once again later.
    – w35l3y
    Oct 4, 2013 at 14:05
  • Some drivers dont support it, but its nice when it works. Otherwise look into multicast and igmp-proxy if its only dlna that needs to work.
    – rapadura
    Oct 7, 2013 at 12:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .