Connecting with VNC
July 4, 2005 11:42 PM
Subscribe
Need help getting VNC to work.
I'd like to use VNC between three computers. I have two stationary PCs at two different locations connected to the internet via different broadband providers with routers. I also have a laptop which will be used at both locations (connecting to the internet wirelessly via the aforementioned routers).
The laptop can only communicate (using VNC) with the PC it happens to be sharing the LAN with and not with the one far away on a different LAN . This (I think) is due to the cable ISP setting IP addresses dynamically, and my router not being configured to allow VNC service.
How do I address the above two issues so that all three computers can communicate using VNC (in server and viewer modes)? I understand that to configure the routers I need to go to the router login site and add VNC as a service. But is this something I must do _from each computer_? And since the laptop will be used at both locations (each using different brand routers, must I do this on the laptop twice (once for each router)? Also, when I specify the service and port at the router site, it asks me for an ip address--will it work if i simply indicate the IP address assigned at that time? It seems not. It seems I need to somehow get a static IP address. I'd appreciate any input on whether I'm right about that and if so, on where and how to get a static IP address. Thanks.
posted by crack to computers & internet (3 comments total)
2 users marked this as a favorite
Second, your laptop is being assigned a local (192.168.0.x) dynamic IP address by one or the other of the routers and this IP address changes each time. The easiest way around this is to set up a DHCP server that can be configured to give a particular MAC address (e.g. the MAC address of your laptop) the same reserved DHCP address each time. The machine will continue to ask for a dynamic address but the DHCP server will recognize it and assign it the same one, making it essentially static. Some routers (Netgear, DLink) have this capability in their DHCP servers. You could also set up static IP configurations on the laptop and switch from one to the other manually when connecting, but this gets to be a pain pretty quickly -- it's better to do it at the router if you can, because it will require less fiddling on the client machine.
Once all of your machines have an internal IP address that can be relied upon, you can set up port forwarding. At times, there will be more than one machine on one or the other network that you need to have accessible via VNC. To do this you will need to assign different port numbers to the VNC servers on each machine, then set up port forwarding on your router so that the proper ports go to the correct machines. For example, port 5900 (the default VNC port) might go to one machine and port 5901 might go to another. When connecting with a VNC client you will then specify the port number (or the display number -- VNC adds the display number to 5900 to get the port, so they would be numbered 0, 1, etc.) in addition to the hostname of the network you are connecting to.
posted by kindall at 12:10 AM on July 5, 2005