关闭

ephemeral port的意义(ip_local_port_range )

标签: ip_local_port_range
332人阅读 评论(0) 收藏 举报
分类:

转自维基百科:

Ephemeral port

From Wikipedia, the free encyclopedia

An ephemeral port is a short-lived transport protocol port for Internet Protocol (IP) communications allocated automatically from a predefined range by the IP software. It is used by the Transmission Control Protocol (TCP), User Datagram Protocol (UDP), or the Stream Control Transmission Protocol (SCTP) as the port assignment for the client end of a client–server communication to a well known port on a server.

On servers, ephemeral ports may also be used as the port assignment on the server end of a communication. This is done to continue communications with a client that initially connected to one of the server's well-known service listening ports. File Transfer Protocol (FTP) and Remote Procedure Call (RPC) applications are two protocols that can behave in this manner. Note that the term "server" here includes workstations running services that receive connections initiatied from other clients (such as Remote Desktop Protocol or RDP).

The allocations are temporary and only valid for the duration of the communication session. After completion of the communication session, the ports become available for reuse, after an OS specific completion timeout is reached.[note 1] Since the ports are used on a per request basis they are also called dynamic ports.

The Internet Assigned Numbers Authority (IANA) suggests the range 49152 to 65535 (215+214 to 216−1) for dynamic or private ports.[1]

Many Linux kernels use the port range 32768 to 61000.[note 2] FreeBSD has used the IANA port range since release 4.6. Previous versions, including the Berkeley Software Distribution (BSD), use ports 1024 to 5000 as ephemeral ports.[2]

Microsoft Windows operating systems through XP use the range 1025–5000 as ephemeral ports by default.[3]Windows VistaWindows 7, and Server 2008 use the IANA range by default.[4] Windows Server 2003 uses the range 1025–5000 by default, until Microsoft security update MS08-037 from 2008 is installed, after which it uses the IANA range by default.[5] Windows Server 2008 with Exchange Server 2007 installed has a default port range of 1025–60000.[6] In addition to the default range, all versions of Windows since Windows 2000 have the option of specifying a custom range anywhere within 1025–65535.[7][8]

Linux

Linux allows you to view and change the ephemeral port range by simply using the file /proc/sys/net/ipv4/ip_local_port_range.  For example, this shows the default configuration on a kernel 2.2 system:

$ cat /proc/sys/net/ipv4/ip_local_port_range 
1024 4999

0
0

猜你在找
【直播】机器学习&数据挖掘7周实训--韦玮
【套餐】系统集成项目管理工程师顺利通关--徐朋
【直播】3小时掌握Docker最佳实战-徐西宁
【套餐】机器学习系列套餐(算法+实战)--唐宇迪
【直播】计算机视觉原理及实战--屈教授
【套餐】微信订阅号+服务号Java版 v2.0--翟东平
【直播】机器学习之矩阵--黄博士
【套餐】微信订阅号+服务号Java版 v2.0--翟东平
【直播】机器学习之凸优化--马博士
【套餐】Javascript 设计模式实战--曾亮
查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:123009次
    • 积分:2575
    • 等级:
    • 排名:第14228名
    • 原创:99篇
    • 转载:244篇
    • 译文:0篇
    • 评论:0条