P4PORT
Description
For the Perforce service (server, broker, or proxy), the port number on which it listens, and the network transport(s) to which it is to bind.
For Perforce applications, the protocol, host and port number of the
Perforce service with which to communicate. The most commonly-used
communications protocols are tcp
(plaintext over TCP/IP) or ssl
(SSL
over TCP/IP).
Perforce supports connectivity over IPv6 networks as well as over IPv4
networks. You can specify whether you require (or merely prefer) to use
IPv4 or IPv6 addresses when resolving hostnames. The protocol settings
of tcp4
and ssl4
require IPv4 address support. Similarly, tcp6
and
ssl6
require IPv6 support. Using tcp64
and ssl64
attempts first to
resolve the host to an IPv6 address, but will accept an IPv4 address if
IPv6 is not available. The opposite behavior is available with tcp46
and ssl46
; these default to the use of IPv4 if possible, and use IPv6
if IPv4 is unavailable. A configurable, net.rfc3484
, may be set on
user workstations or in P4CONFIG
files in order to permit
the operating system to automatically determine which transport to use.
Behavior and performance of networked services is contingent not merely upon the networking capabilities of the machine that hosts the service, nor only on the operating systems used by the end users, but also on your specific LAN and WAN infrastructure (and the state of IPv6 support for every router between the end user and the Perforce versioning service).
To illustrate just one possible scenario, a user working from home; even
if they have an IPv6-based home network, their ISP or VPN provider may
not fully support IPv6. We have consequently provided several variations
on P4PORT
to provide maximum flexibility and backwards
compatibility for administrators and users during the transition from
IPv4 to IPv6.
P4PORT protocol value | Behavior in IPv4/IPv6 or mixed networks |
---|---|
|
Use |
|
Use |
|
Listen on/connect to an IPv4 address/port only. |
|
Listen on/connect to an IPv6 address/port only. |
|
Attempt to listen/connect to an IPv4 address. If this fails, try IPv6. |
|
Attempt to listen/connect to an IPv6 address. If this fails, try IPv4. |
|
Use |
|
Listen on/connect to an IPv4 address/port only, using SSL encryption. |
|
Listen on/connect to an IPv6 address/port only, using SSL encryption. |
|
Listen on/connect to an IPv4 address/port. If that fails, try IPv6. After connecting, require SSL encryption. |
|
Listen on/connect to an IPv6 address/port. If that fails, try IPv4. After connecting, require SSL encryption. |
In mixed environments it is good practice to set the net.rfc3484
configurable to 1
:
p4 configure set net.rfc3484=1
Doing so ensures RFC3484-compliant behavior for users who do not
explicitly specify the protocol value; that is, if the client-side
configurable net.rfc3484
is set to 1
, and P4PORT
is set
to example.com:1666
, or tcp:example.com:1666
, or
ssl:example.com:1666
, the user’s operating system will automatically
determine, for any given connection, whether to use IPv4 or IPv6.
If you use SSL to connect to Perforce, the fingerprint of the Perforce
server must match that stored in the P4TRUST
file. (When
you connect to a new Perforce installation for the first time, the
server’s fingerprint is displayed. If it matches the one your
administrator has assigned it, you may safely connect to the server by
using the p4 trust
command to add the server to your
P4TRUST
file.)
Usage Notes
Used by Client? | Used by Server? | Command-Line Alternative | Can be set in P4CONFIG file? |
---|---|---|---|
Yes |
Yes |
p4 -p
|
Yes |
Value if not Explicitly Set
Program | Value |
---|---|
Perforce server |
|
Perforce proxy |
|
Perforce application |
|
Examples
Perforce application | Perforce versioning service |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Notes
The format of P4PORT
for Perforce applications is
,
or protocol
:host
:port
port
by itself if both the Perforce application and versioning
service 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 versioning service ignores requests
from any IP addresses other than the one specified in
P4PORT
.
If you do not specify a protocol, transmissions between Perforce applications and the Perforce versioning service are performed in plaintext, and IPv4 addresses are assumed.