Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to access a machine in a sub network? This is the situation:

Main-router
 + sub-router
   - machine (2)
   - machine
   - machine
   - ...
 - machine (1)
 - machine
 - machine
 - ...

I want to connect from (1) to (2). Is this also possible in next situation:

Main-router
 + sub-router
   - machine (2)
   - machine
   - machine
   - ...
 + sub-router
   - machine (1)
   - machine
   - machine
   - ...

Thanks

share|improve this question

2 Answers 2

up vote 2 down vote accepted

The following holds true for both examples:

If the sub router is acting as a plain gateway/network bridge and has two interfaces with a valid ip on both, the answer is yes on both counts.

If the sub router however is running any form of NAT that hides the internal addresses from the outside ones, the answer is no. You will be able to set up port forwarding from the machines inside to the routers external interface, then communicate via that - however, this does get more complicated when you have additional routers.

For example.

Machine 1 is behind a NATed router, it hosts a webserver. Any machine behind that router / on the same network can access via http://IP.address, however, machine two or any machine outside the network will access it via http://routers.ip.address (when port 80 is forwarded to the internal interface).

If you simply have it set up as a bridge/gateway, you will have no duplicate IPS, for example, machine one would be 192.168.0.x and machine two would be 192.168.1.x (both on a 255.255.255.0 or /24 subnet), then, it would simply be a matter of typing the real IP address to access the same web server (firewalls and everything else permitting).

If you are architecting a new network from scratch, I would highly advise you go down the gateway/bridge path as it is (in my books) the best way of doing it.

I hope this helps, if you want clarification on anything, please write in comments and I will happily expand.

share|improve this answer

Of course it's possible! The internet itself as a whole is just a giant network of interconnected routers, switches, bridges, hubs, and other network devices and end devices. Similar functionality is applied to LAN technologies. Assuming they are on different subnets, you can bind a second IP address to your card that is on the alternate subnet. The method will vary depending on your operating system, and it is dependent on how the routers are configured as Wil outlined.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.