tcp source-port

Last Updated : Nov 06, 2012 |
Defines a source port with the TCP protocol for which to apply the current rule.
Prolog information
Use no tcp source-port to set the TCP source port to
Use not tcp source-port to specify that the rule applies to all TCP ports other than the requested ports. If the protocol is not TCP, the protocol is set to TCP and the destination port is set to its default value
Note:
Issuing this command also sets the protocol to be TCP, if it is not already.

Syntax

[not] tcp source-port any | {{eq | lt | gt} {port_name | port_number}} | {range start_port end_port}
no tcp source-port

Parameters

Parameter
Description
Possible Values
Default Value
any
Keyword that specifies to apply the rule to a port with any name or number
eq
Keyword that specifies to apply the rule to a port whose name or number matches exactly to the specified name or number
lt
Keyword that specifies to apply the rule to a port whose name or number is less than the specified name or number
gt
Keyword that specifies to apply the rule to a port whose name or number is greater than the specified name or number
port_name
The name of the port for which to apply the rule
port_number
The number of the port for which to apply the rule
range
Keyword indicating that a range of ports is specified
start_port
The start of a port range for which to apply the rule
end_port
The end of a port range for which to apply the rule

User level

read-write

Context

ip pbr-list ip-rule, ip capture-list ip-rule, ip qos-list ip-rule, ip access-control-list ip-rule, ip crypto-list ip-rule
Note:
The not form of the command is not relevant in the crypto-list ip-rule context.

Examples

To specify that rule 22 applies to all packets whose source port is greater than port 95:
Gxxx-001(ACL 330/ip rule 22)# tcp source-port gt 95
To specify that rule 22 applies to all packets whose source port is less than or equal to port 95:
Gxxx-001(ACL 330/ip rule 22)# not tcp source-port gt 95