Modifying Timeouts on SLP Discovery Requests
Two situations might require that you change the timeouts for SLP discovery requests:
If the SLP agents are separated by multiple subnets, dial-up lines, or other WANs, the network latency can be high enough that the default timeouts are insufficient for a request or registration to be completed. Conversely, if your network is low latency, you can improve performance by decreasing the timeouts.
If the network is subject to heavy traffic or a high collision rates, the maximum period that SAs and UAs need to wait before sending a message might be insufficient to assure collision-free transactions.
Changing Default Timeouts
High network latency can cause UAs and SAs to time out before a
response returns for requests and registrations. Latency can be a problem if a
UA is separated from an SA, or if both a UA and
an SA are separated from a DA;either by multiple subnets, a dial-up line,
or a WAN. You can determine if latency is a problem by checking
whether SLP requests are failing because of timeouts on UA and SA requests
and registrations. You can also use the ping command to measure the
actual latency.
The following table lists configuration properties that control timeouts. You can use the
procedures in this section to modify these properties.
Table 9-4 Time-out Properties
Property |
Description |
net.slp.multicastTimeouts net.slp.DADiscoveryTimeouts net.slp.datagramTimeouts |
The properties that control timeouts
for repeated multicast and unicast UDP message transmissions before the transmission is abandoned. |
net.slp.multicastMaximumWait |
The
property that controls the maximum amount of time a multicast message is transmitted
before it is abandoned. |
net.slp.datagramTimeouts |
The upper bound of a DA timeout that is
specified by the sum of values that are listed for this property. A
UDP datagram is repeatedly sent to a DA until a response is received
or the time-out bound is reached. |
If frequent timeouts are occurring during multicast service discovery or DA discovery, increase
the net.slp.multicastMaximumWait property from the default value of 15000 milliseconds (15 seconds). Increasing
the maximum wait period allows more time for requests on high latency networks to
be completed. After you change the net.slp.multicastMaximumWait, you should also modify the net.slp.multicastTimeouts
and net.slp.DADiscoveryTimeouts. The sum of the timeout values for these properties equals the
net.slp.multicastMaximumWait value.
How to Change Default Timeouts
Use the following procedure to change the SLP properties that control timeouts.
- Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
To configure a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- Stop slpd and all SLP activity on the host.
# svcadm disable network/slp
- Back up the default /etc/inet/slp.conf file before you change the configuration settings.
- Change the net.slp.multicastMaximumWait property in the slpd.conf file:
net.slp.multicastMaximumWait=value
- value
A 32–bit integer that lists the sum of the values that are set for net.slp.multicastTimeouts and net.slp.DADiscoveryTimeouts
Default Value=15000 milliseconds (15 seconds)
Range of Values=1000 to 60000 milliseconds
For example, if you determine that multicast requests require 20 seconds (20000 milliseconds),
you would adjust the values that are listed for net.slp.multicastTimeouts and the
net.slp.DADiscoveryTimeouts properties to equal 20000 milliseconds.
net.slp.multicastMaximumWait=20000
net.slp.multicastTimeouts=2000,5000,6000,7000
net.slp.DADiscoveryTimeouts=3000,3000,6000,8000
- If necessary, change the net.slp.datagramTimeouts property in the slpd.conf file:
net.slp.datagramTimeouts=value
- value
A list of 32–bit integers that specify timeouts, in milliseconds, to implement unicast datagram transmission to DAs
Default=3000,3000,3000
For example, you can increase the datagram timeout to 20000 milliseconds to avoid
frequent timeouts.
net.slp.datagramTimeouts=2000,5000,6000,7000
In high-performance networks, you can reduce the time-out bound for multicast and unicast
UDP datagram transmission. When you reduce the time-out bound, you decrease latency that
is required to satisfy SLP requests.
- Save your changes and close the file.
- Restart slpd to activate your changes.
# svcadm enable network/slp
Configuring the Random-Wait Bound
In networks with heavy traffic or a high collision rate, communication with a
DA might be affected. When collision rates are high, the sending agent must
retransmit the UDP datagram. You can determine if retransmission is occurring by using
snoop to monitor traffic on a network of hosts that are running slpd
as an SA server and a host that is running slpd as a
DA. If multiple service registration messages for the same service appear in
the snoop trace from the host that is running slpd as an SA
server, you might have notice collisions.
Collisions can be particularly troubling at boot time. When a DA first starts,
it sends unsolicited advertisements and the SAs respond with registrations. SLP requires the
SAs to wait for a random amount of time after receiving a DA
advertisement before responding. The random-wait bound is uniformly distributed with a maximum value
that is controlled by the net.slp.randomWaitBound. The default random-wait bound is 1000
milliseconds (1 second).
How to Configure the Random-Wait Bound
Use the following procedure to change the net.slp.RandomWaitBound property in the slp.conf file.
- Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
To configure a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- Stop slpd and all SLP activity on the host.
# svcadm disable network/slp
- Back up the default /etc/inet/slp.conf file before you change the configuration settings.
- Change the net.slp.RandomWaitBound property in the slpd.conf file:
net.slp.RandomWaitBound=value
- value
The upper bound for calculating the random-wait time before attempting to contact a DA
Default Value=1000 milliseconds (1 second)
Range of Values=1000 to 3000 milliseconds
For example, you can lengthen the maximum wait to 2000 milliseconds (2 seconds).
net.slp.randomWaitBound=2000
When you lengthen the random-wait bound, a longer delay in registration occurs. SAs
can complete registrations with newly discovered DAs more slowly to avoid collisions and
timeouts.
- If necessary, change the net.slp.datagramTimeouts property in the slpd.conf file:
net.slp.datgramTimeouts=value
- value
A list of 32–bit integers that specify timeouts, in milliseconds, to implement unicast datagram transmission to DAs
Default=3000,3000,3000
For example, you can increase the datagram timeout to 20000 milliseconds to avoid
frequent timeouts.
net.slp.datagramTimeouts=2000,5000,6000,7000
In high-performance networks, you can reduce the time-out bound for multicast and unicast
UDP datagram transmission. This setting reduces the amount of latency in satisfying SLP
requests.
- Save your changes and close the file.
- Restart slpd to activate your changes.
# svcadm enable network/slp