I have a screen sharing service hosted on one router and the target screen(a smart tv) connected to another router. What can I do to connect them? - networking

The first router (Telekom something) which is connected to the cable from outside is the one which the smart tv is connected to. The second router (Asus something) is connected through the first one and hosts a separate wifi network from the first. My pc is connected to this router through a LAN cable. I'm trying to use a screen sharing program called Deskreen which hosts a website from the computer and can be reached by typing in the ip address of the computer into a browser. This only works on the same network that the pc connected to.
I tried searching online but I couldn't find anything about a similar situation. My main question would be if I can somehow reach the other router from the smart tv since the two routers are connected.

Yes, use more specific networks that are part of the block on the first router (if you have at least a /29 block), and enable proxy arp (should be on by default).

Related

Transfer data between two devices on different routers on the same modem

I have two devices, a PC and a RaspberryPi, that are connected to two different routers (one has VPN, one does not), that are connected to the same modem. (See diagram). The two routers are physically separated, so it would be difficult to connect them with a cable.
I am trying to access the RaspberryPi from my PC using SSH to run programs remotely on the Pi, and have the Pi send data that the program scrapes back to my PC for processing.
My question is, is this possible? And if so, how would I be able to implement it?
Thanks
I had this working (prior to my network reconfigure).
What I did was set router A as DHCP server.
Router B was configured as not to hand out IP Addresses.
Connect router A and router B on the LAN side.
All clients went through Router A, unless the devices' IP Settings were changed. I only changed gateway to router B to have the secondary connection.

Using WAN IP to connect to a device connected to router

I have a router (belkin) with many devices connected.
I ran a application on one my devices and the application assigned a port number for remote connection.
Now for me access this device i tried doing something like:
wanipaddress:port
But unable to connect. I am not sure if the router can be used to accomplish the above.
Any suggestions on how to achieve the above?
P.S my router assigned unique LAN IP to all the devices.
I achieved the following using Port Forwarding mechanism. A port forward is a way of making a computer on your home or business network accessible to computers on the internet, even though they are behind a router.
I found the following tutorial to be useful:

How can I ping my home computer from outside?

I'm trying to wrap my head around networking and the internet. This is a very big subject, and it is not my goal to understand all of it. However, I want to know how to use it for... stuff... which right now means I want to find a specific computer. I'm going for my home computer. I know the IP adress is alpha and omega when it comes to finding something online, so I have looked it up, by typing "my ip" into google. So far, so good.
However, I did the same on my phone, which is connected to the same wireless router, and lo and behold, it has the same IP address, according to google. So, if I am on a different computer, on a different network, and I try to ping that IP address, my best bet is that I'll reach that wireless router and that's that (I've checked in the router settings that that is indeed my router's IP address as well). How can I send a ping (as in, using the sommand ping, either on linux or windows) from somewhere else that goes out on the internet, and specifically finds my computer, instead of just the router controlling my home network?
Your home router has a single IP address. The router's job is to use a network address translation (NAT) to figure out which computer or device on your home network sent which requests so that all the devices on your router can use the same external IP address.
The router also has port forwarding settings that you can look up so you can, for example, set up a game server or web server that directs all outside network traffic trying to use that port to that one specific computer. You can also DMZ a specific computer but that leaves that device open to attacks.
To keep it simple: the devices in your home network do have an IP address, but it is a private IP address. In order to be able to reach your phone from the internet, it should have a public IP.
Unless you try to mess with the router, you can't reach any device from outside your network.
Your PC lives underneath the router on a smaller network called your LAN. The internet cannot see it, it can only see your router, which in this case is serving as a gateway.
Pinging is difficult behind a router depending on whether your router uses PAT or NAT. In order to forward traffic to a specific port you can change a setting in your router to forward incoming traffic on that port to the local machine.

Same ip address for multiple devices?

I want to develop an Android app that connects with a Windows desktop application via TCP/IP.
However I have very little knowledge of networking and so please forgive me if this is a very basic doubt.
My Windows based laptop as well as Android phone are connected to the internet via the same WiFi router.
Now I checked the IP address for my laptop as well as phone using a website.
Both are same!
If both have the same IP address, then to achieve networking between these devices I will choose different set of port numbers.
Will this connection work?
Is the connection happening via the internet or just locally on my
router?
EDIT: After reading the answer from #Doon, I have broadened my question.
Let's say the local address of laptop is 192.168.1.10 and that of phone is 192.168.1.20.
If I code my application to use these IP addresses, it should work as it is a local network.
But what if I want my laptop to connect with another phone which is not connected to the WiFi router, rather by 3G network.
Then which IP address should be used for the laptop and the other phone?
Since I am not allowed to use any other server, I am going to use port forwarding i.e. the user will type in the IP address displayed on the other device. The connection could be initiated on either one of the devices.
If you could also show how to do this programmatically, it would be very helpful.
My Windows application is developed in C++ using Qt.
All of your devices are sharing 1 external or WAN IP address using NAPT (network address port translation). Internally on your LAN each device has its own address. So yes it will work but you are going to need to use internal addrss and the devices actual IP address not its perceived address via an external service.
As for the connection locally or via router that all depends on where you are connecting to. If both end points are on your lan or on the same Subnet then the router will not be involved. So in the average home network between your phone and desktop both connected to the same network say via wifi then they are most likely layer 2 adjacent (see the OSI 7 layer model for more info on layer 2 vs layer 3). But once they are not on the same network then routing will be involved and your router will be used. If the phone is connected to 3G or the cell data network and you want it to talk to your desktop on your home network you are going to need to deal with port forwarding on your router and other such fun things.
In regards to updates. Once you leave the local network it gets more complicated especially with IPv4 as address are running out so there is more and more use of nat or IPv6 with 6 to 4 gateways. Do you want the laptop to initiate connect to the phone or phone to the laptop? But normally you will need to iterate your address on your interfaces. Then connect with an external service to get your external IP address and compare and see if they are the same. if both endpoints are dynamically assigned you will need some sort of location mechanism could be dynamic DNS could be locator service etc.

Airprint between two routers?

I have setup AirPrint via CUPS in Ubuntu 12.04.03. This works through my main router, when my iPad and iPod are on this wifi router. That router is the main ADSL into the house. I then have another router, a MikroTik Routerboard, on an Ethernet cable attached to this. I use both of these networks for different iDevices, however the CUPS server is attached to the main router.
I think AirPrint only works on the local router, but I need to use it on both networks.
Is it possible to create some sort of tunnel to direct the AirPrint into the MikroTik router's network?
Thank you.
AirPrint utilizes the Bonjour service to discover local 'Airprint' printers. Because Bonjour can 'only' discover local printers it makes it almost impossible to reach outside your local network to discover nearby printers.
The best advice I can give would be to purchase a second network adapter (Ethernet or Wireless) and connect it directly to your 2nd 'MikroTik' router. This would then allow you to have the AirPrint server accessible in both networks. An under $20 fix to a complex solution.
The easiest solution however would be to use your second router as a bridge to your main network. However I am guessing you're avoiding this scenario for some undisclosed reason.

Resources