Background -
Illustration - https://i.sstatic.net/DFSMh.png
We have a embedded device(referred to as PC2 ahead), which is hosting a UI/webpage, in a Class C network(Network 2 in the diagram above). As we do not have access to Network 1 settings, we need to add our own WiFi Router and create a Network 2, which facilitates us to keep the IP of our devices static. In this scenario we need to access the webpage hosted on PC2 which is in Network 2 from PC1 which is in Network 1.
Conditions to be met -
- We must be able to configure a static IP for PC2/embedded device preferably with WiFi Router B only.
- PC2 being in Network 2 must be accessible to PC1, so that PC1 can see the webpage hosted on PC2.
Iterations Performed -
Iteration 1 -
- Connections - CAT5 from LAN port of Router A to WAN port of Router B.
- Both Router A and Router B are operating in WiFi Router/NAT Mode.
- Observations -
i. I'm not able to reach PC2(192.168.1.100) from PC1(192.168.0.100) but when I try it the other way around, PC2 is able to reach PC1(This must be because of NAT).
ii. PC2 has internet access
Iteration 2 -
- Connections - CAT5 from LAN port of Router A to WAN port of Router B.
- Both Router A and Router B are operating in WiFi Router/NAT Mode.
- Observations -
i. I'm not able to reach PC2(192.168.1.100) from PC1(192.168.0.100) but when I try it the other way around, PC2 is able to reach PC1(This must be because of NAT).
ii. PC2 has internet access - I have tried configuring the following Routing Table in Router A as follows -
ID | Destination Network | Subnet Mask | Gateway | Interface |
---|---|---|---|---|
1 | 192.168.1.1 | 255.255.255.255 | 0.0.0.0 | LAN & WAN |
2 | 192.168.1.0 | 255.255.255.0 | 192.168.1.1 | LAN & WAN |
3 | 192.168.0.0 | 255.255.255.0 | 0.0.0.0 | LAN & WAN |
- Iteration 3 -
- Connections - CAT5 from LAN port of Router A to LAN port of Router B.
- Both Router A and Router B are operating in WiFi Router/NAT Mode.
- Observations - i. I'm able to reach the PC2(192.168.1.100) from PC1(192.168.0.100) i.e. the webpage hosted on PC2 will be visible, but PC2 doesn't have access to the internet.
- I have configured the Routing Tables in both the routers as follows -
i. Router A - Same as above (i.e. Iteration 2)
ii. Router B - \
ID | Destination Network | Subnet Mask | Gateway | Interface |
---|---|---|---|---|
1 | 192.168.0.1 | 255.255.255.255 | 0.0.0.0 | LAN & WAN |
2 | 192.168.1.0 | 255.255.255.0 | 0.0.0.0 | LAN & WAN |
3 | 192.168.0.0 | 255.255.255.0 | 192.168.1.1 | LAN & WAN |
- Iteration 4 (Router B as Access Point)-
- Router A(Network -->192.168.0.0, Router IP --> 192.168.0.1) and Router B(Network -->192.168.0.0, Router IP --> 192.168.0.100)
- An RJ45 ethernet cable is connecting a LAN port from Router A to the WAN port of Router B.
- Router A is operating in WiFi Router/NAT Mode and Router B is in Access Point Mode
- Observations -
i. I'm able to reach, PC1(connected to Router A) from PC2(connected to Router B) and vice versa, both the devices have internet access.
ii. Unable to see, PC2 in the clients list of Router A, which is responsible for assigning IP addresses, since Router B is in access point mode. This prevents me from making the IP of PC2 static from Router A or B.
Questions -
- Are my Routing tables in Iteration 3 correct, if yes, what is the reason for it not working properly?
- Is the behaviour in Iteration 4 when the Router B is configured as an Access Point, desirable? Is it correct to not see the devices connected to Router B in the Clients list of Router A?
- Is there any alternative/better way to approach this problem, given the fact that we are looking for a solution that is highly cost effective and doesn't involve things like adding an expensive VLAN capable router?