Zeroconf can be enabled by setting the P4ZEROCONF
registry variable. Alternately, Zeroconf can be enabled by passing a command line flag to the executable on service startup.
Setting Zeroconf Registry Variables
To set the Zeroconf registry variables, use p4 set -S:
p4 set -S <servicename> <variable>=<value>
After setting the variables, restart the server to have it begin offering Zeroconf.
The following three variables can be set:
(Required) If set, p4d attempts to advertise itself as a zeroconf service upon startup. The value used to set it can be anything - 'true' is recommended.
(Optional) In a zeroconf environment, the unique, identifiable name for a Perforce server. Although not required, it is highly recommended that this name be set.
(Optional) In a zeroconf environment, a comment describing a Perforce server.
p4 set -S Perforce P4ZEROCONF=true
p4 set -S Perforce P4NAME=MyPerforceServer
p4 set -S Perforce P4DESCRIPTION="Connect here for SCM goodness"
Setting Command-line Arguments in the Service
As an alternative to using registry variables, you can modify the service to start Zeroconf by setting startup arguments.
Note: When using this method the settings are not persistent. They are used only once and then the default settings are restored.
To set Zeroconf settings using command-line arguments:
Open the Services dialog (Select Start | Control Panel | Administrative Tools | Services).
Double-click the Perforce service to open the service dialog.
Stop the service.
In the field marked "Start Parameters" use the following flags:
-0 Start Zeroconf. Note that this is a zero, not an 'O'. (required)
-In <name> Define the Zeroconf name.
-Id <description> Define the description.
-0 -In "MyPerforce" -Id "This is my Perforce server"
5. Restart the server to have it start broadcasting Zeroconf.