tcp destination-port

Last Updated : Nov 06, 2012 |

Defines a destination port with the TCP protocol for which to apply the current rule.

Use no tcp destination-port to set the TCP destination port to any. If the protocol is not TCP, the protocol is set to TCP and the source port is set to its default value.

Use not tcp destination-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 source 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 destination-port any | {{eq | lt | gt} {port_name | port_number}} | {range start_port end_port}

no tcp destination-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, crypto-list ip-rule

Note:

The not tcp destination-port command is not relevant in the crypto-list ip-rule context.

Examples

To specify that rule 22 applies to all packets whose destination port is 300:

Gxxx-001(ACL 330/ip rule 22)# tcp destination-port eq 300

To specify that rule 22 applies to all packets except for those whose destination port is 300:

Gxxx-001(ACL 330/ip rule 22)# not tcp destination-port eq 300