Is it necessary to set up different port ranges for MetaTester 5 Agent Manager software on different computers?

 
I have many computers, located on the same LAN, meaning they will go out to the internet under the same public ip address. I install MetaTester software on these machines. When installing, I kept all the default steps, and I saw (of course) that the software on all machines used the same port range (from 2000 onwards depending on the number of cores).

I want to ask if the identical port between these machines has any negative impact on performance or receiving compute requests from the cloud or something else?

If there is an impact, it means I need to reinstall the software and specify different port ranges. But I don't see any way to do this. Once the MetaTester software is installed, the Agents will automatically be added to the list and it will automatically receive a port in the port range 2000... already. I also don't see software that allows editing these ports.
 

Yes, each agent needs a unique port to communicate on.

In MetaTester, to assign custom ports, you have to delete the agents (select all -> right-click -> uninstall), then at the top of the list you see an input field that probably says "2000" - this is where you enter your 'start port'.

So, if you have machine A on port 2000-2011, and you want machine B on port 2012-2023, you enter 2012 in the input field and start adding agents one by one. The port number will increment by 1 for each agent you add, starting at the start port you defined.

Don't forget to forward the ports to the correct machine IP on the network.
 
Ngoc Khoa Kim:
I want to ask if the identical port between these machines has any negative impact on performance or receiving compute requests from the cloud or something else?

Probably you can keep default settings on the local PCs as is and setup proper port forwarding in your router - each PC as a different "virtual server" with appropriately shifted range of ports. I did not try this.

 
Morten Buch #:

Yes, each agent needs a unique port to communicate on.

In MetaTester, to assign custom ports, you have to delete the agents (select all -> right-click -> uninstall), then at the top of the list you see an input field that probably says "2000" - this is where you enter your 'start port'.

So, if you have machine A on port 2000-2011, and you want machine B on port 2012-2023, you enter 2012 in the input field and start adding agents one by one. The port number will increment by 1 for each agent you add, starting at the start port you defined.

Don't forget to forward the ports to the correct machine IP on the network.

Thank for reply.

I want to ask more clearly about this idea: Don't forget to forward the ports to the correct machine IP on the network.

Does it mean I need to configure port forwarding on my modem/router too? Is this port forward configuration mandatory?

Currently, I have not done any port forwarding settings on the modem. But I see that my agents are still receiving and processing cloud requests, although the performance is quite low according to my expectations.

 
Ngoc Khoa Kim #:

Thank for reply.

I want to ask more clearly about this idea: Don't forget to forward the ports to the correct machine IP on the network.

Does it mean I need to configure port forwarding on my modem/router too? Is this port forward configuration mandatory?

Currently, I have not done any port forwarding settings on the modem. But I see that my agents are still receiving and processing cloud requests, although the performance is quite low according to my expectations.

Your router might have UPnP enabled, which automatically opens up the ports requested by the machine.

But even so, each agent still needs a unique port to communicate on - like my example of machine A nd B.

 
Ngoc Khoa Kim:
I have many computers, located on the same LAN, meaning they will go out to the internet under the same public ip address. I install MetaTester software on these machines. When installing, I kept all the default steps, and I saw (of course) that the software on all machines used the same port range (from 2000 onwards depending on the number of cores).

I want to ask if the identical port between these machines has any negative impact on performance or receiving compute requests from the cloud or something else?

Absolutely not.  MQL5 Cloud Network connections are all outgoing on port 443 (HTTPS/SSL), so they will be assigned random ephemeral port numbers upon connection.  The MQL5 Cloud Network makes no use of port forwarding or the local (2000-) port ranges whatsoever.

As far as local farm use goes (which is what the assignable port numbers are for), you should never port forward your agents to the Internet; if you need to access your local farm remotely (or share it with someone else), use a VPN to bring the MetaTrader client PC onto the local farm network.  The port numbers can be duplicated without issue because each local PC has its own IP address on your local network, within which the port numbers reside (i.e. 192.168.1.2:2000-2007, 192.168.1.3:2000-2007, and so on).  Using a VPN would protect the local farm agents from hackers and allow your terminal to access the local PCs in your network farm directly by IP regardless of your public IP.

 
Shalem Loritsch #:

Absolutely not.  MQL5 Cloud Network connections are all outgoing on port 443 (HTTPS/SSL), so they will be assigned random ephemeral port numbers upon connection.  The MQL5 Cloud Network makes no use of port forwarding or the local (2000-) port ranges whatsoever.

As far as local farm use goes (which is what the assignable port numbers are for), you should never port forward your agents to the Internet; if you need to access your local farm remotely (or share it with someone else), use a VPN to bring the MetaTrader client PC onto the local farm network.  The port numbers can be duplicated without issue because each local PC has its own IP address on your local network, within which the port numbers reside (i.e. 192.168.1.2:2000-2007, 192.168.1.3:2000-2007, and so on).  Using a VPN would protect the local farm agents from hackers and allow your terminal to access the local PCs in your network farm directly by IP regardless of your public IP.

Thank you for responding.

I have changed the ports of some computers in the past few days to monitor, and found that these computers have not had any change in processing performance compared to before when they used the same port range. Additional time may also be needed.

Because I don't understand the connection and processing mechanism between my computer (MetaTester installation) and the MQL5 Cloud Network system, I don't understand what ports are used for and when.

Your opinions and Morten Buch's are opposite, so hopefully you can explain more clearly the mechanism of connecting, receiving and processing requests from the Cloud network so that we can understand more about the meaning and effects of ports.

 

I already said most of what there is to say on the subject; in regards to cloud usage, what he said was misinformation, and as such, there isn't much clarifying to be done.  There are two network mechanisms in MetaTester 5; one listens for incoming connections on the specified ports for Local Network Farm usage, and the other makes outgoing connections on port 443 for the MQL5 Cloud Network just like a regular web browser.  The statistics for these two network mechanisms can be seen right on the Overview tab of MetaTester 5 Agents Manager (under "Local statistics" and "MQL5 Cloud Network").

The only reason you would need each agent (across multiple PCs) to be on its own unique port number (as Morten said) is if you're port-forwarding your local network farm to the Internet with a dumb router incapable of translating port numbers—neither of which are a good idea.  As I said earlier, if you need this functionality remotely, use a VPN to bring your remote MetaTrader 5 client terminal onto the local farm network.  But if your "Local statistics" column shows 0 passes, you're not even using this functionality.  You can do a search here to read more about using MetaTester on a local network farm if you want to know more about this.  But if you're only trying to earn money on the MQL5 Cloud Network (as your original post suggests), the local network farm functionality (and its associated port numbers) are completely irrelevant to you; MQL5 Cloud Network traffic from all agents on all PCs is outbound on port 443 with no need to adjust firewall settings or open ports on your router beyond what is needed to make a web browser work on your Internet connection.

 
Shalem Loritsch #:

I already said most of what there is to say on the subject; in regards to cloud usage, what he said was misinformation, and as such, there isn't much clarifying to be done.  There are two network mechanisms in MetaTester 5; one listens for incoming connections on the specified ports for Local Network Farm usage, and the other makes outgoing connections on port 443 for the MQL5 Cloud Network just like a regular web browser.  The statistics for these two network mechanisms can be seen right on the Overview tab of MetaTester 5 Agents Manager (under "Local statistics" and "MQL5 Cloud Network").

The only reason you would need each agent (across multiple PCs) to be on its own unique port number (as Morten said) is if you're port-forwarding your local network farm to the Internet with a dumb router incapable of translating port numbers—neither of which are a good idea.  As I said earlier, if you need this functionality remotely, use a VPN to bring your remote MetaTrader 5 client terminal onto the local farm network.  But if your "Local statistics" column shows 0 passes, you're not even using this functionality.  You can do a search here to read more about using MetaTester on a local network farm if you want to know more about this.  But if you're only trying to earn money on the MQL5 Cloud Network (as your original post suggests), the local network farm functionality (and its associated port numbers) are completely irrelevant to you; MQL5 Cloud Network traffic from all agents on all PCs is outbound on port 443 with no need to adjust firewall settings or open ports on your router beyond what is needed to make a web browser work on your Internet connection.

Wow, you're right!

First ever instance I set up wouldn't connect until I forwarded ports, so I have been doing that ever since.

Just tested by disabling the forwards, and lo and behold, they still connect - thanks!

 
If all PC are into the same LAN and you are trying to access them locally you don't need any port forwarding or uPnP.

Port forwarding is mandatory if you need to access your agents remotely from outside (internet).

In both cases you don't need to change port numbers.
 
Shalem Loritsch #:

I already said most of what there is to say on the subject; in regards to cloud usage, what he said was misinformation, and as such, there isn't much clarifying to be done.  There are two network mechanisms in MetaTester 5; one listens for incoming connections on the specified ports for Local Network Farm usage, and the other makes outgoing connections on port 443 for the MQL5 Cloud Network just like a regular web browser.  The statistics for these two network mechanisms can be seen right on the Overview tab of MetaTester 5 Agents Manager (under "Local statistics" and "MQL5 Cloud Network").

The only reason you would need each agent (across multiple PCs) to be on its own unique port number (as Morten said) is if you're port-forwarding your local network farm to the Internet with a dumb router incapable of translating port numbers—neither of which are a good idea.  As I said earlier, if you need this functionality remotely, use a VPN to bring your remote MetaTrader 5 client terminal onto the local farm network.  But if your "Local statistics" column shows 0 passes, you're not even using this functionality.  You can do a search here to read more about using MetaTester on a local network farm if you want to know more about this.  But if you're only trying to earn money on the MQL5 Cloud Network (as your original post suggests), the local network farm functionality (and its associated port numbers) are completely irrelevant to you; MQL5 Cloud Network traffic from all agents on all PCs is outbound on port 443 with no need to adjust firewall settings or open ports on your router beyond what is needed to make a web browser work on your Internet connection.

Perfect. Your explanation is easy to understand and couldn't be any clearer. Thank you so much.