service-port
Use service-port to specify a port number or a port range as a match criterion in a user-defined
NBAR rule.
Use undo service-port to restore the default.
Syntax
service-port { port-num | range start-port end-port }
undo service-port
Default
A user-defined NBAR rule matches packets of all port numbers.
Views
NBAR rule view
Predefined user roles
network-admin
Parameters
port-num: Specifies the port number in the range of 0 to 65535.
range: Specifies a port range.
start-port: Specifies the start port number for the port range, in the range of 0 to 65535.
end-port: Specifies the end port number for the port range, in the range of 0 to 65535. The end port
number cannot be smaller than the start port number.
Usage guidelines
The following matrix shows the command and hardware compatibility:
Hardware
MSR810/810-W/810-W-DB/810-LM/810-W-LM/810-10-PoE/810-LM
-HK/810-W-LM-HK
MSR810-LMS/810-LUS
MSR2600-10-X1
MSR 2630
MSR3600-28/3600-51
MSR3600-28-SI/3600-51-SI
MSR3610-X1/3610-X1-DP/3610-X1-DC/3610-X1-DP-DC
MSR 3610/3620/3620-DP/3640/3660
MSR5620/5660/5680
The specified port number or port range is used to match the packets' destination ports first. If no
match is found for a packet, the device continues to match its source port. A packet is determined as
a matching packet as long as one of the ports is matched.
If you execute this command multiple times for the same NBAR rule, the most recent configuration
takes effect.
Examples
# Configure user-defined NBAR rule abcd to match packets with port numbers 2001 through 2004.
859
Command compatibility
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes