TCP/UDP 端口
TCP 和 UDP 都是 IP 層的傳輸協(xié)議,是 IP 與上層之間的處理接口。TCP 和 UDP 協(xié)議端口號被設計來區(qū)分運行在單個設備上的多重應用程序的 IP 地址。
由于同一臺機器上可能會運行多個網(wǎng)絡應用程序,所以計算機需要確保目標計算機上接收源主機數(shù)據(jù)包的軟件應用程序的正確性,以及響應能夠被發(fā)送到源主機的正確應用程序上。該過程正是通過使用TCP 或 UDP 端口號來實現(xiàn)的。在 TCP 和 UDP 頭部分,有“源端口”和“目標端口”段,主要用于顯示發(fā)送和接收過程中的身份識別信息。IP 地址和端口號合在一起被稱為“套接字”。
IETF IANA 定義了三種端口組:公認端口(Well Known Ports)、注冊端口(RegisteredPorts)以及動態(tài)和/或私有端口(Dynamic and/or Private Ports) 。
公認端口(Well Known Ports)從0到1023。 注冊端口(RegisteredPorts)從1024到49151。 動態(tài)和/或私有端口(Dynamic and/or Private Ports)從49152到65535。
部分TCP/UDP端口
端口號 協(xié)議 服務名稱 別名 注釋
7 TCP echo Echo
7 UDP echo Echo
9 TCP discard sink null Discard
9 UDP discard sink null Discard
13 TCP daytime Daytime
13 UDP daytime Daytime
17 TCP qotd quote Quote of the day
17 UDP qotd quote Quote of the day
19 TCP chargen ttytst source Character generator
19 UDP chargen ttytst source Character generator
20 TCP ftp-data File Transfer
21 TCP ftp FTP Control
23 TCP telnet Telnet
25 TCP smtp mail Simple Mail Transfer
37 TCP time Time
37 UDP time Time
39 UDP rlp resource Resource Location Protocol
42 TCP nameserver name Host Name Server
42 UDP nameserver name Host Name Server
43 TCP nicname whois Who Is
53 TCP domain Domain Name
53 UDP domain Domain Name Server
67 UDP bootps dhcps Bootstrap Protocol Server
68 UDP bootpc dhcpc Bootstrap Protocol Client
69 UDP tftp Trivial File Transfer
70 TCP gopher Gopher
79 TCP finger Finger
80 TCP http www,http World Wide Web
88 TCP kerberos krb5 Kerberos
88 UDP kerberos krb5 Kerberos
101 TCP hostname hostnames NIC Host Name Server
102 TCP iso-tsap ISO-TSAP Class 0
107 TCP rtelnet Remote Telnet Service
109 TCP pop2 postoffice Post Office Protocol - Version 2
110 TCP pop3 postoffice Post Office Protocol - Version 3
111 TCP sunrpc rpcbind portmap SUN Remote Procedure Call
111 UDP sunrpc rpcbind portmap SUN Remote Procedure Call
113 TCP auth ident tap Authentication Sevice
117 TCP uucp-path UUCP Path Service
119 TCP nntp usenet Network News Transfer Protocol
123 UDP ntp Network Time Protocol
135 TCP epmap loc-srv DCE endpoint resolution
135 UDP epmap loc-srv DCE endpoint resolution
137 TCP netbios-ns nbname NETBIOS Name Service
137 UDP netbios-ns nbname NETBIOS Name Service
138 UDP netbios-dgm nbdatagram NETBIOS Datagram Service
139 TCP netbios-ssn nbsession NETBIOS Session Service
143 TCP imap imap4 Internet Message Access Protocol
158 TCP pcmail-srv repository PC Mail Server
161 UDP snmp snmp SNMP
162 UDP snmptrap snmp-trap SNMP TRAP
170 TCP print-srv Network PostScript
179 TCP bgp Border Gateway Protocol
194 TCP irc Internet Relay Chat Protocol
213 UDP ipx IPX over IP
389 TCP ldap Lightweight Directory Access Protocol
443 TCP S-HTTP MCom
443 UDP S-HTTP MCom
445 TCP Microsoft CIFS
445 UDP Microsoft CIFS
464 TCP kpasswd Kerberos (v5)
464 UDP kpasswd Kerberos (v5)
500 UDP isakmp ike Internet Key Exchange (IPSec)
512 TCP exec Remote Process Execution
512 UDP biff comsat Notifies users of new mail
513 TCP login Remote Login
513 UDP who whod Database of who‘s logged on,average load
514 TCP cmd shell Automatic Authentication
514 UDP syslog
515 TCP printer spooler Listens for incoming connections
517 UDP talk Establishes TCP Connection
518 UDP ntalk
520 TCP efs Extended File Name Server
520 UDP router router routed RIPv.1,RIPv.2
525 UDP timed timeserver Timeserver
526 TCP tempo newdate Newdate
530 TCP,UDP courier rpc RPC
531 TCP conference chat IRC Chat
532 TCP netnews readnews Readnews
533 UDP netwall For emergency broadcasts
540 TCP uucp uucpd Uucpd
543 TCP klogin Kerberos login
544 TCP kshell krcmd Kerberos remote shell
550 UDP new-rwho new-who New-who
556 TCP remotefs rfs rfs_server Rfs Server
560 UDP rmonitor rmonitord Rmonitor
561 UDP monitor
636 TCP ldaps sldap LDAP over TLS/SSL
749 TCP kerberos-adm Kerberos administration
749 UDP kerberos-adm Kerberos administration