TCP/IP Animation , PC port
PC portPC port is window for a PC. In the data communication, Both PC uses any port. The receiver PC assigns to various PC port according to the data contents. For example, it assigns web access data to No.80 or No.443 port and assigns received email to No.25 or No.587 port. At the every port, the application decided for each port does with the data. Meanwhile the sender port is generally decided by sender PC among the port which isn't defined usage.The port No. is recorded on TCP header or UDP header.*Well-known port(0-1023)Usage of the some ports are defined all over the world. They are called 'Well-known port'.*Other ports for common usage(1024-49151)Besides them, there are some cases that some ports are used for common usage.*Dynamic port(49152-65535)If PC needn't use the port for defined usage, it uses dynamic port which is free to use.If the communication starts, the state of port changes variously. But the other communication can use the same port at the initial state.(Even if in one communication 80 port of server becomes 'CLOSED', the other communication can connect to the 80 port at 'LISTENING' state.)
View websiteViewing website with browser1.PC : Accesses the website 'http://www.ogumo.co.jp'. (SYN) Requests TCP connection.2.Server port:80 : (LISTENING)3.PC port:53625 : (SYN_SENT)4.Server : (ACK) OK.(SYN) I Request TCP connection, too.5.Server port:80 : (SYN_RECEIVED)6.PC : (ACK) OK.7.Server : The connection is established.8.PC : The connection is established.9.PC port:53625 : (ESTABLISHED)10.Server port:80 : (ESTABLISHED)11.PC : (PSH) Requests the website data.12.Server : (ACK)+(PSH) Sends the website data.13.PC : (ACK) Got the website data.14.PC : (FIN) Finishes viewing the website.15.PC port:53625 : (FIN_WAIT_1)16.Server : Received finish notice.17.Server port:80 : (CLOSE_WAIT)18.Server : (ACK) OK.19.PC port:53625 : (FIN_WAIT_2)20.Server : (FIN) Finishes the connection, too.21.Server port:80 : (LAST_ACK)22.PC : (ACK) OK.23.PC port:53625 : (TIME_WAIT)24.Server : The connection has finished.25.Server port:80 : (CLOSED)26.Server port:80 : (LISTENING)27.PC : The communication has finished.28.PC port:53625 : (CLOSED)View website (multiple)Viewing the same website with multiple browser1.PC : Accesses the website 'http://www.ogumo.co.jp'. (SYN) Requests TCP connection.2.Server port:80 : (LISTENING)3.PC port:51997 : (SYN_SENT)4.Server : (ACK) OK.(SYN) I Request TCP connection, too.5.Server port:80 : (SYN_RECEIVED)6.PC : (ACK) OK.7.Server : The connection is established.8.PC : The connection is established.9.PC port:51997 : (ESTABLISHED)10.Server port:80 : (ESTABLISHED)11.PC : (PSH) Requests the website data.12.Server : (ACK)+(PSH) Sends the website data.13.PC : (ACK) Got the website data.14.PC : Accesses the same website with the same browser. (SYN) Requests TCP connection.15.Server port:80 : (LISTENING)16.PC port:53625 : (SYN_SENT)17.Server : (ACK) OK.(SYN) I Request TCP connection, too.18.Server port:80 : (SYN_RECEIVED)19.PC : (ACK) OK.20.Server : The connection is established.21.PC : The connection is established.22.PC port:53625 : (ESTABLISHED)23.Server port:80 : (ESTABLISHED)24.PC : (PSH) Requests the website data.25.Server : (ACK)+(PSH) Sends the website data.26.PC : (ACK) Got the website data.27.PC : (FIN) Finishes viewing the website.28.PC port:51997 : (FIN_WAIT_1)29.Server : Received finish notice.30.Server port:80 : (CLOSE_WAIT)31.Server : (ACK) OK.32.PC port:51997 : (FIN_WAIT_2)33.Server : (FIN) Finishes the connection, too.34.Server port:80 : (LAST_ACK)35.PC : (ACK) OK.36.PC port:51997 : (TIME_WAIT)37.Server : The connection has finished.38.Server port:80 : (CLOSED)39.Server port:80 : (LISTENING)40.PC : The connection has finished.41.PC port:51997 : (CLOSED)42.PC : (FIN) Finishes viewing the website.43.PC port:53625 : (FIN_WAIT_1)44.Server : Received finish notice.45.Server port:80 : (CLOSE_WAIT)46.Server : (ACK) OK.47.PC port:53625 : (FIN_WAIT_2)48.Server : (FIN) Finishes the connection, too.49.Server port:80 : (LAST_ACK)50.PC : (ACK) OK.51.PC port:53625 : (TIME_WAIT)52.Server : The connection has finished.53.Server port:80 : (CLOSED)54.Server port:80 : (LISTENING)55.PC : The communication has finished.56.PC port:53625 : (CLOSED)Send emailSending email1.PC : Wants to send email. (SYN) Requests TCP connection.2.Server port:25 : (LISTENING)3.PC port:53625 : (SYN_SENT)4.Server : (ACK) OK.(SYN) I Request TCP connection, too.5.Server port:25 : (SYN_RECEIVED)6.PC : (ACK) OK.7.Server : The connection is established.8.PC : The connection is established.9.PC port:53625 : (ESTABLISHED)10.Server port:25 : (ESTABLISHED)11.PC : (PSH) Sends the email.12.Server : (ACK) Received the new email.13.Server : Sends the email to receiver's SMTP server. (SYN) Requests TCP connection.14.External server port:25 : (LISTENING)15.Server port:51505 : (SYN_SENT)16.External server : (ACK) OK.(SYN) I Request TCP connection, too.17.External server port:25 : (SYN_RECEIVED)18.Server : (ACK) OK.19.Server : The connection is established.20.External server : The connection is established.21.External server port:25 : (ESTABLISHED)22.Server port:51505 : (ESTABLISHED)23.Server : (PSH) Sends the email to receiver's SMTP server.24.Server port:25 : (LISTENING)25.PC port:53625 : (CLOSED)26.Server : The email has been sent.27.Server : (FIN) Finishes the connection.28.Server port:51505 : (FIN_WAIT_1)29.External server : Received finish notice.30.External server port:25 : (CLOSE_WAIT)31.External server : (ACK) OK.32.Server port:51505 : (FIN_WAIT_2)33.External server : (FIN) Finishes the connection, too.34.External server port:25 : (LAST_ACK)35.Server : (ACK) OK.36.Server port:51505 : (TIME_WAIT)37.External server : The connection has finished.38.External server port:25 : (CLOSED)39.External server port:25 : (LISTENING)40.Server : The communication has finished.41.Server port:51505 : (CLOSED)Send email (AUTH)Sending email with authentication (SMTP-AUTH)1.PC : (SYN) Requests TCP connection.2.Server port:587 : (LISTENING)3.PC port:53625 : (SYN_SENT)4.Server : (ACK) OK.(SYN) I Request TCP connection, too.5.Server port:587 : (SYN_RECEIVED)6.PC : (ACK) OK.7.Server : The connection is established.8.PC : The connection is established.9.PC port:53625 : (ESTABLISHED)10.Server port:587 : (ESTABLISHED)11.PC : (PSH) Sends ID and password before sending email.12.Server : (ACK)+(PSH) The user was identified.13.PC : (ACK)+(PSH) Sends the email.14.Server : (ACK) Received the new email.15.Server : Sends the email to receiver's SMTP server. (SYN) Requests TCP connection.16.External server port:25 : (LISTENING)17.Server port:51505 : (SYN_SENT)18.External server : (ACK) OK.(SYN) I Request TCP connection, too.19.External server port:25 : (SYN_RECEIVED)20.Server : (ACK) OK.21.Server : The connection is established.22.External server : The connection is established.23.External server port:25 : (ESTABLISHED)24.Server port:51505 : (ESTABLISHED)25.Server : (PSH) Sends the email to receiver's SMTP server.26.Server port:587 : (LISTENING)27.PC port:53625 : (CLOSED)28.Server : The email has been sent.29.Server : (FIN) Finishes the connection.30.Server port:51505 : (FIN_WAIT_1)31.External server : Received finish notice.32.External server port:25 : (CLOSE_WAIT)33.External server : (ACK) OK.34.Server port:51505 : (FIN_WAIT_2)35.External server : (FIN) Finishes the connection, too.36.External server port:25 : (LAST_ACK)37.Server : (ACK) OK.38.Server port:51505 : (TIME_WAIT)39.External server : The connection has finished.40.External server port:25 : (CLOSED)41.External server port:25 : (LISTENING)42.Server : The communication has finished.43.Server port:51505 : (CLOSED)Send webmailSending webmail1.PC : (SYN) Requests TCP connection to the webmail site.2.Server port:80 : (LISTENING)3.PC port:53625 : (SYN_SENT)4.Server : (ACK) OK.(SYN) I Request TCP connection, too.5.Server port:80 : (SYN_RECEIVED)6.PC : (ACK) OK.7.Server : The connection is established.8.PC : The connection is established.9.PC port:53625 : (ESTABLISHED)10.Server port:80 : (ESTABLISHED)11.PC : (PSH) Accesses the webmail site.12.Server : (ACK)+(PSH) Returns the webmail data.13.PC : (ACK)+(PSH) Creates the data of email and sends.14.Server : (ACK) Received the new email.15.Server : (PSH) Passes the email to the local or internal SMTP server.(omit connection)16.Server port:25 : (ESTABLISHED)17.Server : Sends the email to receiver's SMTP server. (SYN) Requests TCP connection.18.External server port:25 : (LISTENING)19.Server port:51505 : (SYN_SENT)20.External server : (ACK) OK.(SYN) I Request TCP connection, too.21.External server port:25 : (SYN_RECEIVED)22.Server : (ACK) OK.23.Server : The connection is established.24.External server : The connection is established.25.External server port:25 : (ESTABLISHED)26.Server port:51505 : (ESTABLISHED)27.Server : (PSH) Sends the email to receiver's SMTP server.28.Server : The email has been sent.29.Server : (FIN) Finishes the connection.30.Server port:51505 : (FIN_WAIT_1)31.External server : Received finish notice.32.External server port:25 : (CLOSE_WAIT)33.External server : (ACK) OK.34.Server port:51505 : (FIN_WAIT_2)35.External server : (FIN) Finishes the connection, too.36.External server port:25 : (LAST_ACK)37.Server : (ACK) OK.38.Server port:51505 : (TIME_WAIT)39.External server : The connection has finished.40.External server port:25 : (CLOSED)41.External server port:25 : (LISTENING)42.Server : The communication has finished.43.Server port:51505 : (CLOSED)Receive email (POP)Receiving email with simple function1.Server : (PSH) Email is sent from the external SMTP server.2.Server port:25 : (ESTABLISHED)3.Server : (ACK) The email was stored.(Finishing connection is left out.)4.Server port:25 : (LISTENING)5.PC : (SYN) Requests TCP connection.6.Server port:110 : (LISTENING)7.PC port:53625 : (SYN_SENT)8.Server : (ACK) OK.(SYN) I Request TCP connection, too.9.Server port:110 : (SYN_RECEIVED)10.PC : (ACK) OK.11.Server : The connection is established.12.PC : The connection is established.13.PC port:53625 : (ESTABLISHED)14.Server port:110 : (ESTABLISHED)15.PC : (ACK)+(PSH) In order to confirm the email box, accesses with ID and password.16.Server : (ACK)+(PSH) Permits login and sends the stored new email.17.PC : (ACK) Received the new email.18.PC : All email is received. (FIN) Finishes the connection.19.PC port:53625 : (FIN_WAIT_1)20.Server : Received finish notice.21.Server port:110 : (CLOSE_WAIT)22.Server : (ACK) OK.23.PC port:53625 : (FIN_WAIT_2)24.Server : (FIN) Finishes the connection, too.25.Server port:110 : (LAST_ACK)26.PC : (ACK) OK.27.PC port:53625 : (TIME_WAIT)28.Server : The connection has finished.29.Server port:110 : (CLOSED)30.Server port:110 : (LISTENING)31.PC : The communication has finished.32.PC port:53625 : (CLOSED)Receive email (IMAP)Receiving email with advanced function1.Server : (PSH) Email is sent from the external SMTP server.2.Server port:25 : (ESTABLISHED)3.Server : (ACK) The email was stored.(Finishing connection is left out.)4.Server port:25 : (LISTENING)5.PC : (SYN) Requests TCP connection.6.Server port:143 : (LISTENING)7.PC port:53625 : (SYN_SENT)8.Server : (ACK) OK.(SYN) I Request TCP connection, too.9.Server port:143 : (SYN_RECEIVED)10.PC : (ACK) OK.11.Server : The connection is established.12.PC : The connection is established.13.PC port:53625 : (ESTABLISHED)14.Server port:143 : (ESTABLISHED)15.PC : (ACK)+(PSH) In order to confirm the email box, accesses with ID and password.16.Server : (ACK)+(PSH) Permits login and sends the email that the user selects.17.PC : (ACK) Received the email.18.PC : (FIN) Finishes the connection.19.PC port:53625 : (FIN_WAIT_1)20.Server : Received finish notice.21.Server port:143 : (CLOSE_WAIT)22.Server : (ACK) OK.23.PC port:53625 : (FIN_WAIT_2)24.Server : (FIN) Finishes the connection, too.25.Server port:143 : (LAST_ACK)26.PC : (ACK) OK.27.PC port:53625 : (TIME_WAIT)28.Server : The connection has finished.29.Server port:143 : (CLOSED)30.Server port:143 : (LISTENING)31.PC : The communication has finished.32.PC port:53625 : (CLOSED)Receive webmailReceiving webmail1.Server : (PSH) Email is sent from the external SMTP server.2.Server port:25 : (ESTABLISHED)3.Server : (ACK) The email was stored.(Finishing connection is left out.)4.Server port:25 : (LISTENING)5.PC : (SYN) Requests TCP connection to the webmail site.6.Server port:80 : (LISTENING)7.PC port:53625 : (SYN_SENT)8.Server : (ACK) OK.(SYN) I Request TCP connection, too.9.Server port:80 : (SYN_RECEIVED)10.PC : (ACK) OK.11.Server : The connection is established.12.PC : The connection is established.13.PC port:53625 : (ESTABLISHED)14.Server port:80 : (ESTABLISHED)15.PC : (ACK)+(PSH) Accesses the webmail site.16.Server : (PSH) Confirms the email box.(omit connection)17.Server port:110 : (ESTABLISHED)18.Server : (ACK)+(PSH) Gets email from the local or internal POP server.19.Server : (ACK)+(PSH) Returns the received email data.20.PC : (ACK) Received the new email.FTP (active)Sending a file with FTP active mode1.PC : (SYN) Requests FTP control connection.2.Server port:21 : (LISTENING)3.PC port:53625 : (SYN_SENT)4.Server : (ACK) OK.(SYN) I Request the TCP connection, too.5.Server port:21 : (SYN_RECEIVED)6.PC : (ACK) OK.7.Server : The connection is established.8.PC : The connection is established.9.PC port:53625 : (ESTABLISHED)10.Server port:21 : (ESTABLISHED)11.Server : (SYN) Requests FTP data connection through PC firewall.12.PC port:51997 : (LISTENING)13.Server port:20 : (SYN_SENT)14.Server : (ACK) OK.(SYN) I Request the TCP connection, too.15.PC port:51997 : (SYN_RECEIVED)16.PC : (ACK) OK.17.Server : The connection is established.18.PC : The connection is established.19.Server port:20 : (ESTABLISHED)20.PC port:51997 : (ESTABLISHED)21.PC : FTP data connection OK.22.Server : (PSH) Sends file data.23.PC : (ACK) Received.24.PC : The file is downloaded. (FIN) Finishes the connection.25.PC port:51997 : (FIN_WAIT_1)26.Server : Received finish notice.27.Server port:20 : (CLOSE_WAIT)28.Server : (ACK) OK.29.PC port:51997 : (FIN_WAIT_2)30.Server : (FIN) Finishes the connection, too.31.Server port:20 : (LAST_ACK)32.PC : (ACK) OK.33.PC port:51997 : (TIME_WAIT)34.Server : The connection has finished.35.Server port:20 : (CLOSED)36.Server port:20 : (LISTENING)37.PC : The connection has finished.38.PC port:51997 : (CLOSED)39.PC : (FIN) Finishes FTP.40.PC port:53625 : (FIN_WAIT_1)41.Server : Received finish notice.42.Server port:21 : (CLOSE_WAIT)43.Server : (ACK) OK.44.PC port:53625 : (FIN_WAIT_2)45.Server : (FIN) Finishes the connection, too.46.Server port:21 : (LAST_ACK)47.PC : (ACK) OK.48.PC port:53625 : (TIME_WAIT)49.Server : The connection has finished.50.Server port:21 : (CLOSED)51.Server port:21 : (LISTENING)52.PC : The communication has finished.53.PC port:53625 : (CLOSED)FTP (passive)Sending a file with FTP passive mode1.PC : (SYN) Requests FTP control connection.2.Server port:21 : (LISTENING)3.PC port:53625 : (SYN_SENT)4.Server : (ACK) OK.(SYN) I Request the TCP connection, too.5.Server port:21 : (SYN_RECEIVED)6.PC : (ACK) OK.7.Server : The connection is established.8.PC : The connection is established.9.PC port:53625 : (ESTABLISHED)10.Server port:21 : (ESTABLISHED)11.PC : (SYN) Requests FTP data connection.12.Server port:51505 : (LISTENING)13.PC port:51997 : (SYN_SENT)14.Server : (ACK) OK.(SYN) I Request the TCP connection, too.15.Server port:51505 : (SYN_RECEIVED)16.PC : (ACK) OK.17.Server : The connection is established.18.PC : The connection is established.19.PC port:51997 : (ESTABLISHED)20.Server port:51505 : (ESTABLISHED)21.PC : FTP data connection OK.22.Server : (PSH) Sends file data.23.PC : (ACK) Received.24.PC : The file is downloaded. (FIN) Finishes the connection.25.PC port:51997 : (FIN_WAIT_1)26.Server : Received finish notice.27.Server port:51505 : (CLOSE_WAIT)28.Server : (ACK) OK.29.PC port:51997 : (FIN_WAIT_2)30.Server : (FIN) Finishes the connection, too.31.Server port:51505 : (LAST_ACK)32.PC : (ACK) OK.33.PC port:51997 : (TIME_WAIT)34.Server : The connection has finished.35.Server port:51505 : (CLOSED)36.Server port:51505 : (LISTENING)37.PC : The connection has finished.38.PC port:51997 : (CLOSED)39.PC : (FIN) Finishes FTP.40.PC port:53625 : (FIN_WAIT_1)41.Server : Received finish notice.42.Server port:21 : (CLOSE_WAIT)43.Server : (ACK) OK.44.PC port:53625 : (FIN_WAIT_2)45.Server : (FIN) Finishes the connection, too.46.Server port:21 : (LAST_ACK)47.PC : (ACK) OK.48.PC port:53625 : (TIME_WAIT)49.Server : The connection has finished.50.Server port:21 : (CLOSED)51.Server port:21 : (LISTENING)52.PC : The communication has finished.53.PC port:53625 : (CLOSED)TelnetManipulate remote PC as a Network Virtual Terminal1.PC : Wants to login to the remote PC. (SYN) Requests TCP connection.2.Remote PC port:23 : (LISTENING)3.PC port:50944 : (SYN_SENT)4.Remote PC : (ACK) OK.(SYN) I Request TCP connection, too.5.Remote PC port:23 : (SYN_RECEIVED)6.PC : (ACK) OK.7.Remote PC : The connection is established.8.PC : The connection is established.9.PC port:50944 : (ESTABLISHED)10.Remote PC port:23 : (ESTABLISHED)11.PC : (ACK)+(PSH) Logins to the remote PC.12.Remote PC : (ACK)+(PSH) Login OK. Sends the remote PC data.13.PC : (ACK)+(PSH) In order to manipulate the remote PC, sends command with keyboard.14.Remote PC : (ACK)+(PSH) Sends the response of the remote PC.15.PC : (ACK)+(PSH) In order to manipulate the remote PC, sends command with keyboard.16.Remote PC : (ACK)+(PSH) Sends the response of the remote PC.17.PC : (ACK) OK.18.PC : (FIN) Finishes Telnet.19.PC port:50944 : (FIN_WAIT_1)20.Remote PC : Received finish notice.21.Remote PC port:23 : (CLOSE_WAIT)22.Remote PC : (ACK) OK.23.PC port:50944 : (FIN_WAIT_2)24.Remote PC : (FIN) Finishes the connection, too.25.Remote PC port:23 : (LAST_ACK)26.PC : (ACK) OK.27.PC port:50944 : (TIME_WAIT)28.Remote PC : The connection has finished.29.Remote PC port:23 : (CLOSED)30.Remote PC port:23 : (LISTENING)31.PC : The communication has finished.32.PC port:50944 : (CLOSED)DNSConverting target URI to global IP address, before accessing website1.PC : Needs to convert URI 'https://www.ogumo.co.jp' to global IP address.2.PC : Asks DNS server about the IP address with UDP.UDP needn't establish connection.3.Server : Asks DNS root server about the IP address of the domain.4.Server : Got IP address of subordinate DNS server in order to ask about IP address of the domain.5.Server : Asks subordinate DNS server about the IP address of the domain.6.Server : Got IP address of the domain. Asks the DNS server of the domain about its web server address.7.Server : Received IP address '183.181.83.114'.8.PC : Received IP address '183.181.83.114'.DHCPWhen a PC connects to LAN, private IP address is assigned.1.PC : Searches DHCP server with ARP packet 'DHCP_DISCOVER' by broadcast.2.Server : Tells that DHCP server exists, with ARP packet 'DHCP_OFFER' by broadcast.3.PC : Got ARP packet 'DHCP_OFFER'.4.PC : Requests IP address with ARP packet 'DHCP_REQUEST' by broadcast.5.Server : Assigns private IP address '192.168.0.2'. And sends it with other settings.6.PC : Got private IP address '192.168.0.2' and other setting. PC can access network.
|