tcp-ip Port Numbers

本文详细介绍了TCP/IP协议中端口的作用及分类。包括知名端口(1-1023)、客户端使用的短暂端口(通常为1024-5000)以及其它服务器端口(高于5000)。解释了服务器与客户端如何通过端口号进行通信,并说明了这些端口号在不同系统中的分配方式。

TCP and UDP identify applications using 16-bit port numbers.

Servers are normally known by their well-known port number.Those services that can be provided by any implementation of TCP/IP have well-known port numbers between 1 and 1023.

A client usually doesn't care what port number it uses on its end. All it needs to be certain of is that whatever port number it uses be unique on its host. Client port numbers are called ephemeral ports (i.e., short lived). This is because a client typically exists only as long as the user running the client needs its service, while servers typically run as long as the host is up.

Most TCP/IP implementations allocate ephemeral port numbers between 1024 and 5000. The port numbers above 5000 are intended for other servers (those that aren't well known across the Internet).

The well-known port numbers are contained in the file /etc/services on most Unix systems.
access-list combined Description The access-list combined command is used to add Combined ACL rule. To delete the corresponding rule, please use no access-list extended command. Syntax access-list combined acl-id-or-name rule {auto | rule-id } {deny | permit} logging {enable | disable} [smac source-mac-address smask source-mac-mask] [dmac dest-mac-address dmask dest-mac-mask] [vid vlan-id] [type ether-type] [pri priority] [sip source-ip-address sip-mask source-ip-mask]] [dip destination-ip-address dip-mask destination-ip-mask] [dscp dscp-value] [tos tos-value] [pre pre-value] [protocol protocol [s-port s-port-number s-port-mask s-port-mask] [d-port d-port-number d-port-mask d-port-mask] [tcpflag tcpflag]] [tseg time-range-name] no access-list combined acl-id-or-name rule rule-id 413 Parameter acl-id-or-name —— Enter the ID or name of the ACL that you want to add a rule for. auto —— The rule ID will be assigned automatically and the interval between rule IDs is 5. rule-id —— Assign an ID to the rule. deny | permit —— Specify the action to be taken with the packets that match the rule. By default, it is set to permit. The packets will be discarded if “deny” is selected and forwarded if “permit” is selected. logging {enable | disable} —— Enable or disable Logging function for the ACL rule. If "enable " is selected, the times that the rule is matched will be logged every 5 minutes. With ACL Counter trap enabled, a related trap will be generated if the matching times changes. source-mac-address —— Enter the source MAC address. source-mac-mask —— Enter the source MAC address mask. dest-mac-address —— Enter the destination MAC address. dest-mac-mask —— Enter the destination MAC address mask. This is required if a destination MAC address is entered. vlan-id: The VLAN ID ranges from 1 to 4094. ether-type —— Specify the Ethernet-type with 4 hexadecimal numbers. priority —— The user priority ranges from 0 to 7. The default is No Limit. source-ip: Enter the source IP address. source-ip-mask —— Enter the mask of the source IP address. It is required if source IP address is entered. destination-ip —— This is required if a source IP address is entered. destination-ip-mask —— Enter the destination IP address mask. This is required if a destination IP address is entered. dscp-value —— Specify the DSCP value between 0 and 63. tos-value ——Specify an IP ToS value to be matched between 0 and 15. pre-value ——Specify an IP Precedence value to be matched between 0 and 7. protocol —— Specify a protocol type. s-port-number —— Specify the source port number. s-port-mask —— Specify the source port mask with 4 hexadecimal numbers. d-port-number —— Specify the destination port number. 414 d-port-mask —— Specify the destination port mask with 4 hexadecimal numbers. tcpflag —— For TCP protocol, specify the flag value using either binary numbers or * (for example, 01*010*). The default is *, which indicates that the flag will not be matched. The flags are URG (Urgent flag), ACK (acknowledge flag), PSH(push flag), RST(reset flag),SYN(synchronize flag), and FIN(finish flag). time-range-name —— The name of the time-range. The default is No Limit. Command Mode Global Configuration Mode Privilege Requirement Only Admin, Operator and Power User level users have access to these commands. Example Create Combined ACL 1100 and configure Rule 1 to deny packets with source IP address 192.168.3.100 in VLAN 2: Switch(config)# access-list create 1100 Switch(config)# access-list combined 1100 logging disable rule 1 permit vid 2 sip 192.168.3.100 sip-mask 255.255.255.255
最新发布
08-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值