Skip to content

Commit

Permalink
Moving lowerbound of default test ports up to 5202 to prevent collisi…
Browse files Browse the repository at this point in the history
…ons with pscheduler. See perfsonar/pscheduler#296
  • Loading branch information
arlake228 committed Mar 2, 2017
1 parent fd75981 commit 7b175bf
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion bwctld/bwctldP.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define BWCTLD_CONF_FILE "bwctl-server.conf"
#endif

#define BWCTLD_IPERF_DEF_TESTPORT (5001)
#define BWCTLD_IPERF_DEF_TESTPORT (5202)
#define BWCTLD_THRULAYD_DEF_TESTPORT (5003)

#if defined(HAVE_SYS_QUEUE_H)
Expand Down
4 changes: 2 additions & 2 deletions bwlib/iperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ BWLToolDefinitionRec BWLToolIperf = {
"iperf", /* name */
"iperf", /* def_cmd */
NULL, /* def_server_cmd */
5001, /* def_port */
5202, /* def_port */
_BWLToolGenericParse, /* parse */
BWLGenericParseThroughputParameters, /* parse_request */
BWLGenericUnparseThroughputParameters, /* unparse_request */
Expand All @@ -397,6 +397,6 @@ BWLToolDefinitionRec BWLToolIperf = {
BWLToolServerSideData, /* results_side */
False, /* supports_server_sends */
True, /* supports_endpointless */
5001, /* The server port to use in endpointless tests */
5202, /* The server port to use in endpointless tests */
0, /* parsable format */
};
2 changes: 1 addition & 1 deletion bwlib/iperf3.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ BWLToolDefinitionRec BWLToolIperf3 = {
"iperf3", /* name */
"iperf3", /* def_cmd */
"iperf3", /* def_server_cmd */
5001, /* def_port */
5202, /* def_port */
_BWLToolGenericParse, /* parse */
BWLGenericParseThroughputParameters, /* parse_request */
BWLGenericUnparseThroughputParameters, /* unparse_request */
Expand Down
4 changes: 2 additions & 2 deletions bwlib/nuttcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ BWLToolDefinitionRec BWLToolNuttcp = {
"nuttcp", /* name */
"nuttcp", /* def_cmd */
NULL, /* def_server_cmd */
5001, /* def_port */
5202, /* def_port */
_BWLToolGenericParse, /* parse */
BWLGenericParseThroughputParameters, /* parse_request */
BWLGenericUnparseThroughputParameters, /* unparse_request */
Expand All @@ -325,6 +325,6 @@ BWLToolDefinitionRec BWLToolNuttcp = {
BWLToolClientSideData, /* results_side */
True, /* supports_server_sends */
True, /* supports_endpointless */
5001, /* The server port to use in endpointless tests */
5202, /* The server port to use in endpointless tests */
0, /* parsable format */
};
4 changes: 2 additions & 2 deletions bwlib/tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,9 +787,9 @@ _BWLToolGenericInitTest(
if( !prange ) {
prange = calloc(1,sizeof(BWLPortRangeRec));
if(prange) {
prange->low = 5001;
prange->low = 5202;
prange->high = 5900;
BWLPortsSetI(ctx,prange,5001);
BWLPortsSetI(ctx,prange,5202);
BWLContextConfigSet(ctx,"V.test_port",prange);
}
}
Expand Down
12 changes: 6 additions & 6 deletions conf/bwctld.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ peer_port 6001-6200
# since some tests can run in parallel, and need to be able to open servers on
# separate ports. The daemon will cycle through this range assigning each ports
# to each test, as needed.
# (defaults to 5001-5900)
test_port 5001-5900
# (defaults to 5202-5900)
test_port 5202-5900


# full path to iperf executable
Expand All @@ -46,8 +46,8 @@ test_port 5001-5900
#disable_iperf

# iperf_port (port to run iperf server "receiver" processes on)
# (defaults to 5001-5100)
#iperf_port 5001-5300
# (defaults to 5202-5900)
#iperf_port 5202-5300

# full path to nuttcp executable
# (defaults to "nuttcp" - assumes it will be found using PATH)
Expand All @@ -57,8 +57,8 @@ test_port 5001-5900
#disable_nuttcp

# nuttcp_port (port to run nuttcp server "receiver" processes on)
# (defaults to 5001-5100)
# nuttcp_port 5301-5600
# (defaults to 5202-5900)
# nuttcp_port 5301-5400


# ping_cmd - full path to ping executable
Expand Down
12 changes: 6 additions & 6 deletions doc/bwctl_firewalls.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@
appropriate configuration option.

<p>If you specified <em>iperf_port</em> as
5001-5004, you would then need to enable this range in your
5202-5205, you would then need to enable this range in your
firewall configuration. If you allow UDP tests (in your
<a href="bwctld.limits.man.html">bwctld.limits</a> file),
you will need to open up the UDP ports. Likewise for TCP.
The default is 5001 for TCP and UDP tests, and you will only be
The default is 5202 for TCP and UDP tests, and you will only be
able to test if you open the ports specified.</p>
<p>On a typical Red Hat Enterprise Linux system,
you would need to add the following lines to /etc/sysconfig/iptables
given this range:</p>
<pre>-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5001:5004 -j ACCEPT
-A RH-Firewall-1-INPUT -m udp -p ucp --dport 5001:5004 -j ACCEPT
<pre>-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5202:5205 -j ACCEPT
-A RH-Firewall-1-INPUT -m udp -p ucp --dport 5202:5205 -j ACCEPT
</pre>
<p>
This should be added somewhere <b>after</b> the line that allows
Expand Down Expand Up @@ -99,8 +99,8 @@ <h3>Example RHEL 4 /etc/sysconfig/iptables file</h3>
# bwctld peer_ports
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9910:9950 -j ACCEPT
# bwctl/iperf_port
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5001 -j ACCEPT
-A RH-Firewall-1-INPUT -m udp -p ucp --dport 5001 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5202 -j ACCEPT
-A RH-Firewall-1-INPUT -m udp -p ucp --dport 5202 -j ACCEPT
# reject anything that has not matched
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
Expand Down
24 changes: 12 additions & 12 deletions doc/bwctld_conf_opts.man
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ Currently, \fBbwctld\fR simply cycles through this range linearly.
\fIiperf_port\fR can be specified as a single valid port number or as
a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid
port numbers with the '\-' character separating them. Whitespace is
not allowed within the \fIiperf_port\fR. For example, \fB"5001\-5004"\fR would
be valid, but \fB"5001 \- 5004"\fR would be invalid.
not allowed within the \fIiperf_port\fR. For example, \fB"5202\-5205"\fR would
be valid, but \fB"5202 \- 5205"\fR would be invalid.
.RS
.PP
This value should be set to a range because it can take a few minutes for a
Expand All @@ -223,8 +223,8 @@ Currently, \fBbwctld\fR simply cycles through this range linearly.
\fIiperf3_port\fR can be specified as a single valid port number or as
a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid
port numbers with the '\-' character separating them. Whitespace is
not allowed within the \fIiperf3_port\fR. For example, \fB"5001\-5004"\fR would
be valid, but \fB"5001 \- 5004"\fR would be invalid.
not allowed within the \fIiperf3_port\fR. For example, \fB"5202\-5205"\fR would
be valid, but \fB"5202 \- 5205"\fR would be invalid.
.RS
.PP
This value should be set to a range because it can take a few minutes for a
Expand Down Expand Up @@ -262,8 +262,8 @@ Currently, \fBbwctld\fR simply cycles through this range linearly.
\fInuttcp_port\fR can be specified as a single valid port number or as
a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid
port numbers with the '\-' character separating them. Whitespace is
not allowed within the \fInuttcp_port\fR. For example, \fB"5001\-5004"\fR would
be valid, but \fB"5001 \- 5004"\fR would be invalid.
not allowed within the \fInuttcp_port\fR. For example, \fB"5202\-5205"\fR would
be valid, but \fB"5202 \- 5205"\fR would be invalid.
.RS
.PP
This value should be set to a range because it can take a few minutes for a
Expand Down Expand Up @@ -301,7 +301,7 @@ Currently, \fBbwctld\fR simply cycles through this range linearly.
\fIowamp_port\fR must be specified as a range as \fIlow\fR\-\fIhigh\fR. The
range must be specified as two valid port numbers with the '\-' character
separating them. Whitespace is not allowed within the \fIowamp_port\fR. For
example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be
example, \fB"5202\-5205"\fR would be valid, but \fB"5202 \- 5205"\fR would be
invalid.
.RS
.PP
Expand Down Expand Up @@ -414,15 +414,15 @@ set using one of the other port variables. Currently, \fBbwctld\fR simply
cycles through this range linearly. \fItest_port\fR must be specified as a
range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port
numbers with the '\-' character separating them. Whitespace is not allowed
within the \fItest_port\fR. For example, \fB"5001\-5004"\fR would be valid, but
\fB"5001 \- 5004"\fR would be invalid.
within the \fItest_port\fR. For example, \fB"5202\-5205"\fR would be valid, but
\fB"5202 \- 5205"\fR would be invalid.
.RS
.PP
This value must be set to a range because it is used for both the \fBOwamp\fR
communication and test ports.
.PP
.IP Default:
5001-5900
5202-5900
.RE
.TP
.BI thrulay_port " thrulayport"
Expand All @@ -431,8 +431,8 @@ Currently, \fBbwctld\fR simply cycles through this range linearly.
\fIthrulay_port\fR can be specified as a single valid port number or as
a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid
port numbers with the '\-' character separating them. Whitespace is
not allowed within the \fIthrulay_port\fR. For example, \fB"5001\-5004"\fR would
be valid, but \fB"5001 \- 5004"\fR would be invalid.
not allowed within the \fIthrulay_port\fR. For example, \fB"5202\-5205"\fR would
be valid, but \fB"5202 \- 5205"\fR would be invalid.
.RS
.PP
This value should be set to a range because it can take a few minutes for a
Expand Down

0 comments on commit 7b175bf

Please sign in to comment.