Port Forwarding In a Computer Network

Port Forwarding In a Computer Network
Port Forwarding In a Computer Network

Internet even though you're behind a router so for example let's say a friend of yours at their home wants to remotely control your computer at your home using a service such as remote desktop connection now remote desktop connection is a service built into Microsoft Windows that enables you to connect to another computer running .Microsoft Windows and then once you're connected to the remote computer you can use that computers programs and files just as if you were sitting in front of it so now your friend is ready to connect to your computer .

How Port Forwarding Works In a Computer Network

So he starts up the remote desktop connection and sends the request to your public IP address with a specific port number now a port is not a physical connection but it's a logical connection that is used by programs and services to exchange information ports uniquely identify these programs and services that are running on a computer and in this case remote desktop connection uses port 3389 so the request with the port number will make its way through the Internet to your router. and once it reaches your router your router needs to know where to forward the request for port 3389 because without any port forwarding configured your friend will not be able to connect to your computer. because your router does not know what to do with this request so this is where port forwarding comes in so now we're going to tell our router to send or forward any requests that come in with port 3389 and send the request to our computer here.  so to do this we're going to log in to our routers configuration page by typing in the routers internal IP address using a web browser so if you're not sure what your router .

 Internal private IP addresses you just open up a command prompt on a Windows computer and type in ip config and press Enter and the default gateway is the internal IP address of your router and it's also important to know what your computer's .IP address is which is right here because we're going to be entering that IP address in the port forwarding configuration page so in a web browser we enter the IP address of the router and now we are in the routers configuration page now depending upon what router you're using the configuration page will be different depending on which brand of router you are using .I'm using a Cisco  router in this example so whatever type of router you're using the layout is going to be a little different but basically you need to go to the port forwarding section to configure port forwarding .so here on a port forwarding configuration page we can just enter a name for our application and we can just call it remote desktop and then we have to forward the remote desktop connection port to the computer. so you type in the remote desktop port number which happens to be 3389 and then you have to point it to the IP address of the computer that you want your friend to access which is .

 We can just save our settings and now we're done when your friend sends a request with port 3389 the router knows where to forward that request to and now the connection is complete so if you're still confused about ports let's use an illustration. to explain what a port is and how it works so here we have a phone with an electronic switchboard that would typically be used in a company so when someone wants to make a call to this company and let's say they wanted to talk to the sales department within this company they would dial the company's phone number .along with the extension of the sales department so when the call comes in the phone will answer the call and then the phone will look at the extension number and send or forward the call to the corresponding department number so let's say another person calls the company. and they wanted to talk to the support department so the call comes in and is received by the phone now the phone number has done its job which is to send the call to the specific company from the outside but once the call is received using the phone number the phone number is no longer needed because it's done its job so the only thing that is needed now is the extension so now the phone will forward the call to the support department because of the matching extension number now this works very similar in a network.

  In a network the router is contacted with an IP address along with a port number so now the router will look at the port number and send or forward the request to the internal IP address that the port has been configured to so again another request from the internet comes into the network and reaches the router so the IP address has done its job. which was to bring the request to the router from the internet so the IP address is no longer needed because it has already done its job so now the router will look at the port number and based on its port forwarding configuration it will now forward the request to the computer with the IP address that the port number has been configured.

If you like this article on Port Forwarding In a Computer Network then please give your comment below.

Post a Comment