to talk over sockets they generally standardize both message formats and socket port numbersmessage formats provide structure for the bytes exchanged over sockets during conversations port numbers are reserved numeric identifiers for the underlying sockets over which messages are exchanged raw sockets are still commonly used in many systemsbut it is perhaps more common (and generally easierto communicate with one of the standard higher-level internet protocols as we'll seepython provides support for standard protocolswhich automates most of the socket and message formatting details port number rules technically speakingsocket port numbers can be any -bit integer value between and , howeverto make it easier for programs to locate the standard protocolsport numbers in the range of to are reserved and preassigned to the standard higher-level protocols table - lists the ports reserved for many of the standard protocolseach gets one or more preassigned numbers from the reserved range table - port numbers reserved for common protocols protocol common function port number python module http web pages http clienthttp server nntp usenet news nntplib ftp data default file transfers ftplib ftp control file transfers ftplib smtp sending email smtplib pop fetching email poplib imap fetching email imaplib finger informational / ssh command lines /athird party telnet command lines telnetlib clients and servers to socket programmersthe standard protocols mean that port numbers to are off-limits to scriptsunless they really mean to use one of the higher-level protocols this is both by standard and by common sense telnet programfor instancecan start dialog with any telnet-capable machine by connecting to its port without preassigned port numberseach server might install telnet on different port similarlywebsites listen for page requests from browsers on port by standardif they did notplumbing the internet