0

Currently I have two subnets in the 10.0.0.0/16, which are 10.40.20.0/24, let's say that's A and 10.32.80.0/24, B.

My PC is in the subnet A and what I'm going to do is use Steam Link, Oculus Air Link or something like that to access my PC from subnet B. Or in another word, make the remote PC in subnet A have a local ip address in subnet B.

I don't know how Steam Link works exactly, but I thought it has something to do with ARP. Before I'm here I have done some tries and research. I tried putting a RPI in subnet B and used iptables to forward all it's ports to my PC in A like below.

iptables -A INPUT -p tcp -m multiport --dports 1025:64000 -j ACCEPT
iptables -t nat -I PREROUTING -p tcp -m tcp --dport 1025:50000 -j DNAT --to-destination 10.40.20.100:1025-64000
iptables -A FORWARD -d 10.40.20.100/32 -i br-lan -p tcp -m tcp --dport 1025:64000 -j ACCEPT

It turned out it doesn't work, Steam Link can't find my PC as expected.

My next try is using VPN like PPTP to make the VR headset have an IP in subnet A. However the VPN server could only work when the VPN clients' "virtual IP addresses" are diffetent from server's local subnet. For this case, the VPN clients must be in any subnet other than 10.40.20.0/24.

The topology in the subnet A and B could be changed freely, for example adding a new gateway on the top of the VR headset is OK, as long as it could work.

Thanks in advanced.

1 Answer 1

0

It may be useful to think in terms of "broadcast domain", or: those systems which will receive a broadcast message (ARP uses broadcast messages, for example)

For a IP subnet to function, it must be on a broadcast domain, either implicit (e.g. same switch / switch VLAN), or explicit (e.g. VPN or other link, with traffic explicitly forwarded (bridged, technically) between two broadcast domains)

I think you are right that you'll want to give both systems an IP address on the same network / subnet, or at least to be able to.

Interestingly, you can simply bridge the two networks (making them one broadcast domain), and both subnets will continue to function (with some caveats, including bandwidth). This would let you simply assign an IP address on either subnet for any machine on that broadcast domain.

If you want to do something more complex, e.g. a bridge with filtering, that might require more work and more learning, but it should limit the down-sides / caveats. Fundamentally this decision comes down to the question of: why did you create separate networks in the first place?

So, short answer:

  • It's complicated. Probably technically possible, maybe even easy.

Obligatory diagrams:

Current network:

10.40.20.0/24 [A]
 |
{router}
 |
10.32.80.0/24 [B]

Bridged broadcast domains (e.g. running a cable between two switches)(broadcast domain includes any systems continuously connected through lines like | and -):

10.40.20.0/24 [A]
 |
 |--{router}
 |
10.32.80.0/24 [B]
2
  • The case is that I can't change any devices between the A and B, otherwise I would simply make them a single subnet🫠
    – Lyn
    Commented May 14, 2022 at 9:43
  • So I explicitly avoid going into more detail because configuring a VPN is a bit more than I'm prepared for in an answer here (maybe someone else wants to profrer a better one), but my thought is to use WireGuard or similar to connect the two hosts, and if that doesn't solve the problem, you could bridge a LAN interface on each side to the WireGuard created interface. You could get in trouble with the network admins on either side for doing this, because you are explicitly prohibited from changing devices in between per your comment. Commented May 15, 2022 at 23:46

You must log in to answer this question.

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