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.

I have the following configuration: my laptop connected to router #1 (ASUS RT-N66U, let call him R1) using wireless connection. Laptop's IPv4 address is 192.168.1.143 (DHCP allocated) (LAN options on R1: addresses: 192.168.1.1-192.168.1.254, mask: 255.255.255.0). My router #2 (ASUS RT-N10U, let call him R2) connected to R1 using wired connection. R2 LAN settings is: addresses: 192.168.2.1-192.168.2.254, mask: 255.255.255.0. My device (let call him D1) connected to R2 using wired connection and has IPv4 address 192.168.2.20. Lets try to draw the picture:

                                                     D1 192.168.2.20 (static)
                                                     |
                                                     | 192.168.2.x subnet
laptop 192.168.1.143 (DHCP)      R2------------------
   |  192.168.1.x subnet         |
   |                             |
   --------------R1--------------

I want to be able to access my laptop from D1 and vice versa (access D1 from my laptop), so for example D1 can connect to the web server running on the laptop. I'm not the guru in the network architecture, so I can figure out why I can't access my laptop from 192.168.2.x subnet (and can't access D1 from my laptop) and how can I achieve this.

Basically I need my laptop to be in one subnet (e.g. 192.168.1.x) and my device D1 be in other subnet (e.g. 192.168.2.x) so that D1 can access my laptop's web server.

Thanks in advance.

share|improve this question
1  
Which ports on both routers does the cable between R1 and R2 connect? –  Marcks Thomas Dec 17 '13 at 14:43
    
@MarcksThomas: WAN port of R1 connected with external network. LAN port #1 of the R1 connected to WAN port of the R2. –  maverik Dec 17 '13 at 14:45

2 Answers 2

up vote 2 down vote accepted

If you want to maintain two seperate networks, the most obvious subnets would be 192.168.1.0/24 and 192.168.2.0/24 for the networks behind R1 and R2 respectively. Currently, the latter is set to 192.168.0.0/16. That range includes all IP-addresses from the first subnet. When you attempt to access your laptop at 192.168.1.143 from D1, your packets will not be routed to their destination, because the IP is expected to be within the LAN. Limit the second subnet to 192.168.2.0/24 by changing the subnet mask to 255.255.255.0 and re-obtain IP-settings through DHCP. The destination IP 192.168.1.143 will no longer be within the current subnet and should be routed appropriately.

With this network setup, it will still be difficult to initiate a connection to D1 from your laptop. Network address translation will prevent access to hosts behind R2. To get around this, you would have to forward ports and connect to the WAN IP of R2 instead of 192.168.2.20.

share|improve this answer

You should change your R1 subnet mask to 255.255.252.0 (or 255.255.0.0 to match what you have on R2).

share|improve this answer
    
Sorry, my fault, both routers have 255.255.255.0 mask. I've edited the question to fix that. –  maverik Dec 17 '13 at 15:00
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  Dave M Dec 17 '13 at 15:41
    
I wish I could comment, but like you said, I don't have enough rep. –  shinjijai Dec 17 '13 at 17:50

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.