The format of P4PORT on the Perforce client is
host:port, or
port by itself if both the Perforce client and server are running on the same host. Port numbers must be in the range
1024 through
32767.
If you specify both an IP address and a port number in
P4PORT, the Perforce server ignores requests from any IP addresses other than the one specified in
P4PORT.
To use the default value perforce with a Perforce server, define
perforce as an alias to the host running the server in
/etc/hosts on UNIX, or in
%SystemRoot%\system32\drivers\etc\hosts on Windows, or use DNS.