Common Ports Cheat Sheet: The Ultimate List

Common Ports Cheat Sheet

Perhaps you’re angsty that you’ve forgotten what a certain port number meant. Rest assured, you don’t have to remember all 65,535 port numbers. With so much information to remember, it’s understandable if you forget a common port. That’s why we put together this cheat sheet of common network ports for you.

A crucial domain of expertise in IT-related certifications such as Cisco Certified Network Associate (CCNA) and those of CompTIA is port numbers and associated services , which this common ports and protocols cheat sheet covers. If you want to remember a port number or protocol, this cheat sheet will help everyone, from students to professionals.

Get a copy of this common ports cheat sheet here to keep on your desk. When you're ready, scroll below to find the port you’re looking for.

Common Ports Cheat Sheet Search

Search our Common Ports cheat sheet to find the right cheat for the term you're looking for. Simply enter the term in the search bar and you'll receive the matching cheats available.

Common Ports and Protocols Cheat Sheet

The following tables cover services (and malware) that use common TCP ports and some UDP or SCTP ports.

Well-known/System Ports: 0 – 1023

Registered ports: 1024 – 49151, dynamic/private ports: 49152 – 65535.

You may use these ports for custom applications free from concerns that it may clash with existing processes.

The Most Common Ports for Exams

If you’re studying for IT certifications such as CCNA , focus on these ports:

We hope that you found this cheat sheet useful. Familiarity with ports and protocols is vital to building secure applications and troubleshooting problems on computer networks. Whether you're studying or working, this cheat sheet of common network ports will help you in academic and professional settings.

For further resources, or if you’re curious about how ports and protocols fit into cyber security, look into network security courses available with our StationX Accelerator Program .

Frequently Asked Questions

FTP: ports 20-21; SSH/SCP: port 22; HTTP: 80; HTTPS: 443; POP3: 110; POP3 over SSL: 995; IMAP: 143; IMAP over SSL: 993. We recommend you download the graphic in Well-known/System Ports .

It depends on whether you’re referring to system ports (1024) or want to include ports registered with apps (49152) because system ports range from 0 through 1023, and registered ports span 1024 – 49151.

FTP: ports 20-21; SSH/SCP: port 22; Telnet: 23; SMTP: 25; DNS: 53; HTTP: 80; POP3: 110; IMAP: 143; HTTPS: 443.

FTP: port 21; SSH/SCP: 22; Telnet: 23; SMTP: 25; DNS: 53; POP3: 110; IMAP: 145; HTTP: 80; HTTPS: 443; MySQL: 3306; RDP: 3389; VNC: 5900.

The following are the three types of ports with corresponding port number ranges: • Well-known/System ports: 0 – 1023 • Registered ports: 1024 – 49151 • Dynamic/Private ports: 49152 – 65535

Level Up in Cyber Security: Join Our Membership Today!

Nathan House is the founder and CEO of StationX. He has over 25 years of experience in cyber security, where he has advised some of the largest companies in the world. Nathan is the author of the popular "The Complete Cyber Security Course", which has been taken by over half a million students in 195 countries. He is the winner of the AI "Cyber Security Educator of the Year 2020" award and finalist for Influencer of the year 2022.

Related Articles

Nmap cheat sheet 2024: all the commands & flags.

The one downside to a tool as robust and powerful […]

Read More »

Linux Command Line Cheat Sheet: All the Commands You Need

You may need to open a compressed file, but you've […]

Wireshark Cheat Sheet: All the Commands, Filters & Syntax

Wireshark is arguably the most popular and powerful tool you […]

The Only IPv4 Subnetting Cheat Sheet You’ll Ever Need

Our beginner networking students often describe IPv4 subnetting as the […]

' src=

Nathan, thank you for supplying this sheet. It comes in handy when you’re trying to remember what a particular port is used by.

Our pleasure.

' src=

Thank you, Nathan

' src=

This is a great single point to reference all default ports. Thank you!!!

' src=

Very good, it will be in front of me!

' src=

Ports on computers are required for networking, and without them, the computer would be completely isolated and it would be unable to communicate with other devices. So thank you for proving this list of the Common TCP and UDP Port numbers.

' src=

After resetting my router cause the password got changed and all the setting were changed to gain access to my computer. I spent about 20 minutes setting up the router. It appears the router never got set up from the cable company when it was installed. So if you have not done so lately check your router and settings.

' src=

Cool, Thanks for sharing!!

' src=

Sorry Nathan, i did not leave a comment for this “Common Ports” Chart last-week. I am glad i signed up to your news letter you are a good researcher. thank you for sharing with us all..

' src=

Nathan, I must thank you for these cheat sheets! They’ve been great on my learning and certification journey!

Thank you too!

' src=

Really really useful.Thanks a lot!!

' src=

Session expired

Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.

14 common network ports you should know

An introduction to GNU Screen

Opensource.com

The physical ports on your computer allow communicate with peripheral devices such as your keyboard and mouse and to connect with internet devices via Ethernet cables.

The Linux Terminal

  • Top 7 terminal emulators for Linux
  • 10 command-line tools for data analysis in Linux
  • Download Now: SSH cheat sheet
  • Advanced Linux commands cheat sheet
  • Linux command line tutorials

Witin computer networking, ports serve a similar purpose. When a computer system seeks to connect to another computer, the port serves as a communication endpoint. It is also possible for different services running on the same computer to expose various ports and communicate with one another using these ports. In simple terms, if a software application or service needs to communicate with others, it will expose a port. Ports are identified with positive 16-bit unsigned integers, ranging from 0 to 65535. Other services use this port number to communicate with the service or app. Port numbers are divided into three ranges: well-known ports, registered ports, and dynamic or private ports.

Well-known ports (also known as system ports ) are numbered from 0 through 1023. For example, to connect to the host example.com via SSH, I would use this command:

In this example, -v stands for verbose, and you should see output similar to this:

As shown, SSH is trying to connect to example.com using port number 22. You may use the -p option to specify another port number; otherwise, SSH will default to 22.

The Internet Assigned Numbers Authority (IANA) has assigned port numbers to commonly used services like SSH, FTP, HTTP, HTTPS, and others. Here are some of the most common ones:

In my work, I most commonly come across ports 80, 443, 20, 21, 22, 23, 25, and 53. Knowing these ports can help you work more efficiently.

What ports do you use the most, and why?

Learn more about Linux networking

people on top of a connected globe

How to configure networking in Linux

Connecting your Linux computer to a network is pretty straightforward, except when it is not. In this article I discuss the main network configuration files for Red Hat-based…

5 sys admin horror stories

An introduction to Linux network routing

In June when I discussed basic network configuration , one thing I did not talk about then is routing. This article provides a very brief introduction to routing for Linux…

A Linux networking guide to CIDR notation and configuration

One of the key concepts in network routing that any Linux professional should be familiar with is network notation. This article was inspired by a request from a reader of my…

User profile image.

Related Content

GNOME

  • iPhone 15 Plus vs. Pro Max
  • 3 Key Tech Trends to Watch in 2024

Port Numbers Used for Computer Networks

TCP and UDP ports explained

  • Massachusetts Institute of Technology
  • University of Illinois

port numbers in network

In This Article

Jump to a Section

What Is a Port Number in Networking?

How port numbers work, when you may need to take action with port numbers, open and closed ports.

In computer networking , port numbers are part of the addressing information used to identify the senders and receivers of messages. They are associated with TCP/IP network connections and might be described as an add-on to the IP address .

Port numbers allow different applications on the same computer to share network resources simultaneously. Home network routers and computer software work with these ports and sometimes support configuring port number settings.

Networking ports are software-based and unrelated to physical ports that network devices have for plugging in cables.

Hero Images / Getty Images

Port numbers relate to network addressing . In TCP/IP networking, both TCP and UDP use a set of ports that work together with IP addresses.

These port numbers work like telephone extensions. Just as a business telephone switchboard can use the main phone number and assign each employee an extension number, a computer can have a main address and a set of port numbers to handle incoming and outgoing connections.

In the same way that all employees within a building can use one phone number, one IP address can be used to communicate with various applications behind one router. The IP address identifies the destination computer, and the port number identifies the specific destination application.

This is true whether it's a mail application, file transfer program, or web browser. When you request a website from a web browser, the browser communicates over port 80 for HTTP . Then, the data is sent back over the same port and displays in the program that supports that port (the web browser).

In both TCP and UDP, port numbers start at 0 and go up to 65535. The lower ranges are dedicated to common internet protocols such as port 25 for SMTP and port 21 for FTP.

To find the specific values used by certain applications, view a list of ​ the most popular TCP and UDP port numbers . For Apple software, view the TCP and UDP ports used by Apple software products .

The network hardware and the software automatically process port numbers. Casual users of a network do not see these port numbers and don't need to take any action involving their operation. Individuals can, however, encounter network port numbers in certain situations.

Network administrators may need to set up port forwarding to allow the port numbers of specific applications to pass through a firewall . On home networks, a broadband router supports port forwarding on its configuration screens. A common application of homeport forwarding is for online games that use non-standard ports that the router's built-in firewall blocks.

Network programmers sometimes need to specify port numbers in their code, such as in socket programming.

A website URL will sometimes require a specific TCP port number to be included. For example, http://localhost:8080/ uses TCP port 8080 rather than the default port 80. This is usually seen in software development environments more than in mainstream consumer usage.

Network security enthusiasts also frequently discuss the port number used as a key aspect of attack vulnerabilities and protections. Ports can be classified as either open or closed. Open ports have an associated application that listens for new connection requests, and closed ports do not.

A process called network port scanning detects test messages at each port number to identify which ports are open. Network professionals use port scanning as a tool to measure exposure to attackers and often lock down networks by closing non-essential ports. Hackers, in turn, use port scanners to probe networks for open ports that may be exploitable.

You can use the netstat command in Windows to see information regarding active TCP and UDP connections.

Get the Latest Tech News Delivered Every Day

  • What Is Port 0 Used For?
  • An Overview of Socket Programming for Computer Networking
  • The Most Popular TCP and UDP Port Numbers
  • Understanding Transmission Control Protocol/Internet Protocol (TCP/IP)
  • How to Set Up Port Forwarding
  • Computer Ports: Usage & Role in Networking
  • Xbox Network TCP and UDP Port Numbers
  • 5 Computer Networking Trends for 2024 and Beyond
  • TCP Port Number 21 and How It Works With FTP
  • How to Use the Netstat Command on Mac
  • TCP vs. UDP
  • How to Open a Port on a Windows or Mac Firewall
  • How to Check If a Port Is Open in Windows 10
  • Functions and Features of Routers for Home Computer Networks
  • Computer Networking Tutorial - Internet Protocol
  • List of TCP Ports and UDP Ports (Well-Known)

CBT IT Certification Training

Unlimited IT Certification Courses via Streaming Video

Remember me

  • Lost your password?

Enter your username or email:

  • Back to login

Port Numbers and Network Protocols

  • Identify common TCP and UDP default port numbers
  • Explain the function of common networking protocols
  • Summarize DNS concepts and its components

We will analyze some of the most common Application Layer services that a network engineer will encounter on a daily basis, as well as learn the well-known default port numbers assigned to those application services. The objectives are to identify common TCP and UDP protocols, analyze their functionality, and learn the most common port numbers. The information presented in this chapter is very useful in various fields of computer networking and will assist in troubleshooting networks.

You configure and troubleshoot port numbers and services in our Cisco CCNA lab and video course .

Back to book index.

The most common protocols, organized by the TCP/IP layer they operate at, are presented in Table 5.1 below:

Table 5.1 – TCP/IP Layers and Their Protocols

We will analyze each of these protocols, starting with application protocols and continuing with management and networking protocols.

Port Numbers

Port numbers are assigned to different protocols and services so that a user will know how and what to access at the other end and to identify specific applications. They are also used to track the session associated with that protocol. As explained in Chapter 1, the TCP and UDP headers include a 16-bit source and destination port, so port numbers can be represented in the range of 0 to 65535 (the maximum decimal number that can be represented on 16 bits).

Port numbers fall into two categories:

  • Well-known port numbers
  • Temporary port numbers

Well-known port numbers are non-ephemeral ports, meaning they are permanently assigned to a protocol or a service. They can be used as a destination port by any network-enabled machine in order to reach specific protocols. A well-known port number helps to uniquely identify a Web server, for example. Even though the Web server might use a random port number, it usually uses port number 80 as a convention so other devices can know how to reach it. If the service used a non-standard port number, a client device could reach it only if it was specifically informed about the port number used. Well-known port numbers are usually those below 1024.

Temporary port numbers are ephemeral ports and are usually used as source ports in a two-way communication process. They are determined in real-time by the client workstation and are usually numbers above 1024. When the session is closed, the generated source port number disappears and a new session destined to the same service will usually use a different source port. The process of generating ephemeral port numbers is done automatically by the TCP/IP stack on the devices and it uses sequential or random port numbers. The allocation process of the unique source ports is accomplished at the Application Layer.

Even though the same port number can be used in both TCP and UDP, the services they identify can be completely different. For example, TCP port 80 identifies a different service/protocol than UDP port 80 does.

Do not confuse port numbers with protocol numbers. Port numbers uniquely identify network protocols, while protocol numbers identify Layer 3 protocols, for example:

  • TCP is protocol number 6
  • UDP is protocol number 17
  • ICMP is protocol number 1
  • IGMP is protocol number 2

Application Protocols

The most common application protocols are as follows:

  • E-mail protocols (SMTP, POP3, IMAP)

Hypertext Transfer Protocol (HTTP) is the primary protocol used across the Internet between a browser and a Web server, which is a process known as Web browsing.

When a client PC (Web browser) makes a request, the type of request will determine the destination port number used. Websites are often listening on TCP port 80, a well-known port identifying the HTTP protocol, and they respond to request packets using TCP 80 as the source port, as depicted in Figure 5.1 below. This makes life easier for Web clients because if there were no standards regarding this approach, the communication between users and servers would be random.

HTTP Flow Diagram

Figure 5.1 – HTTP Flow Diagram

Anytime a Web browser wants to contact a Web server, it knows that the default port at the Application Layer that is used by the server to listen for traffic is TCP port 80.

Considering the traffic flow described above and moving down the protocol stack, you have the following information presented at each layer:

  • Application Layer: HTTP (port 80)
  • Transport Layer: TCP (HTTP uses TCP as the underlying protocol)
  • Internet Layer: IP (the HTTP request is destined to the IP address of the Web server)
  • Layer 2: whatever frame types are appropriate for the network type used (often Ethernet)
  • Layer 1: the actual bits being sent to the directly connected switch by the client machine

As a practical example, if you type the address www.cisco.com into a browser and make a packet capture of that particular interface, you will see the following:

HTTP Packet Capture

Figure 5.2 – HTTP Packet Capture  

If you analyze the captured packet, you can see some interesting information that confirms the traffic flow information above:

  • TCP is used as the protocol for Layer 4, because this is the protocol HTTP is based on at that particular layer.
  • The destination port in the TCP header is port 80, identifying HTTP. So at Layer 4, you will find specific information regarding Application Layer data.
  • The source port in the TCP header is a unique random high port number that was unused at that time. A unique port number is used for each connection opened by the client toward the server so that the server can individually respond to each request by sending a reply back to the specific port number (identifying each request).

While HTTP is one of the most commonly used protocols on the Internet today, it is not secure, as it sends traffic without encryption on the network. Without any protection, an intruder might capture the packets and easily read the conversation. The HTTP Secure (HTTPS) protocol was developed to overcome these security issues by ensuring a secure encrypted connection between the Web client and the Web server, as shown in Figure 5.3 below:

HTTPS Flow Diagram

Figure 5.3 – HTTPS Flow Diagram  

HTTPS uses a different port than HTTP by default: TCP port 443 instead of TCP port 80. This can be examined in the packet capture presented in Figure 5.4 below:

HTTPS Packet Capture

Figure 5.4 – HTTPS Packet Capture  

The encryption used by the HTTPS protocol is accomplished using the Transport Layer Security/Secure Sockets Layer (TLS/SSL) mechanism. SSL was created by Netscape and this evolved into TLS, which is the updated IETF (Internet Engineering Task Force) version of SSL. HTTPS encryption is still called generic SSL, even though TLS is used as the underlying mechanism.

E-mail Protocols

The most common protocols used for sending and receiving e-mail traffic are as follows:

  • SMTP (Simple Mail Transfer Protocol): TCP port 25
  • POP3 (Post Office Protocol): TCP port 110
  • IMAP (Internet Message Access Protocol): TCP port 143

POP3 and IMAP (currently at version 4) are used for receiving e-mail. POP3 was designed for intermittent connectivity, and is used for retrieving e-mails only on request or automatically at a pre-configured interval.

IMAP is a more evolved protocol that was developed in the last few years, as it offers more functionality and flexibility. It can manage all e-mail messages directly on the mail server, unlike POP3 which must download the messages in order to manage them locally. IMAP offers access to e-mails from everywhere, not just on the local workstation, and it can also transparently synchronize the local e-mail client with the e-mail server. Although IMAP offers extra functionality, all of these features make IMAP use more resources on the server.

Unlike POP3 and IMAP, SMTP is used to push (send) e-mails to a server, as well as for transferring e-mails between servers. SMTP offers advanced security features, including encryption.

Being familiar with the protocols used by e-mail applications can help a network engineer in many situations, including with tasks that involve filtering e-mail traffic. This can be accomplished by blocking the well-known e-mail ports using access control lists or other filters, but it doesn’t prevent situations in which the applications use non-standard ports.

File Transfer Protocol (FTP) is, just as the name says, a protocol that allows users to transfer files between the file systems of multiple devices, offering many functionalities in this regard. FTP is an advanced file transfer protocol and it works based on a client-server architecture, as illustrated in Figure 5.5 below:

FTP Flow Diagram

Figure 5.5 – FTP Flow Diagram  

A user who wants to access an FTP server usually uses a dedicated FTP client application that initiates a connection to the server. The FTP client sends a session request on port 21, and after the session to the server is initialized data is transferred using port 20. A unique particularity of FTP is that it uses two port numbers:

  • TCP port 20: FTP data
  • TCP port 21: FTP control (sends commands to the server)

The image in Figure 5.6 below depicts an FTP control packet capture. Notice that it uses TCP port 21 at the Application Layer.

FTP Packet Capture

Figure 5.6 – FTP Packet Capture  

Other features offered by FTP include authentication based on username and password and advanced file management functionality on remote devices (e.g., list, delete, and other commands).

Trivial File Transfer Protocol (TFTP) is similar to FTP but it lacks its complexity and security enhancements. TFTP is an unreliable file transfer protocol that functions over UDP port 69. Unlike FTP, which uses TCP to ensure a connection-oriented session with packet tracking, sequence numbers, and acknowledgements, TFTP does not ensure the proper delivery of packets.

Because it does not use packet tracking or have the complexity of FTP, TFTP is an Application Layer service that provides less overhead but also less reliability. Some other important differences from FTP include the following:

  • TFTP provides only read and write functionality
  • TFTP does not provide authentication so it is not suitable for production environments

VoIP-Related Protocols

Voice over IP (VoIP) involves moving telephone traffic over an IP infrastructure. Voice packets are digitized and then sent on the IP network. VoIP communications have some particularities that require specific protocols to handle different aspects of the process. In this regard, two protocols are of interest:

  • SIP (Session Initiation Protocol)
  • RTP (Real-time Transport Protocol)

SIP and RTP are used for completely different aspects of VoIP transmission. SIP is a VoIP signaling protocol that is used to build and terminate media calls, while RTP is used to digitize voice packets and carry the media stream to the other side.

SIP can be used by a phone so that when the user initiates a call, it can logically connect to the other phone to open the conversation. This Application Layer protocol has been designed to run independent of the underlying Transport Layer, meaning it can run on either TCP or UDP.

After the call setup process is over, conversation streaming happens over UDP because of the low overhead, which is suitable for delay-sensitive traffic such as VoIP. The protocol that makes this happen is RTP, as it was designed for the actual delivery of the voice packets over the network.

Management Protocols

The most common management protocols are as follows:

Domain Name System (DNS) is a protocol that translates names into IP addresses. Whenever a client wants to interact with a Web server on the Internet, it will identify it by using a name (e.g., cisco.com) because names are easy to remember when compared to complex and random IP addresses. However, in order to communicate with the Web server, the client must have its IP address, and this is where the DNS service comes into play by translating the name into a Layer 3 address.

DNS Basic Functionality

Figure 5.7 – DNS Basic Functionality  

As depicted in Figure 5.7 above, when a DNS server receives a query from a client containing a name, it returns an IP address. The client computer knows where to send the DNS request because it is configured with a DNS server address, which is either entered manually or received via DHCP. After the client receives the IP address associated with the website it wants to communicate with, the connection is initialized and the Web server can be accessed. The DNS server listens for requests on port 53 (both TCP and UDP). UDP port 53 is used for normal DNS lookups and queries and TCP port 53 is used for zone transfers between DNS servers.

A standard DNS query is depicted in the packet capture below, in which you can see both the UDP port number at the Transport Layer and the actual query details at the Application Layer:

DNS Query

Figure 5.8 – DNS Query  

Such a query is respond to by the server using a DNS reply similar to the one presented in the packet capture below, in which you can see the actual list of IP addresses returned for the specific website name:

DNS Reply

Figure 5.9 – DNS Reply  

DNS functions over UDP, so if no response is received in a timely manner, another DNS query will be sent. A TCP request is eventually sent out if no response is forthcoming.

To test DNS functionality on a Windows machine, you can use one of the two methods exemplified below:

  • Issue a ping command to the specific website from the command prompt. The website name will automatically be translated into the associated IP address, as depicted in the screenshot below:

Windows DNS Query Test (ping Command)

Figure 5.10 – Windows DNS Query Test ( ping Command)

  • Issue an nslookup command from the command prompt. This will return comprehensive details about the DNS records associated with the specific website, which can be seen in the screenshot below:

Windows DNS Query Test (nslookup Command)

Figure 5.11 – Windows DNS Query Test ( nslookup Command)

DNS Servers

The DNS service doesn’t work using a single server because it would not be capable of managing all the name-to-IP mappings on the Internet. Instead, DNS uses a collection of servers that work together to provide name-to-IP resolution. This collection of servers is organized hierarchically using a distributed database composed of multiple DNS servers, which include the following:

  • Root servers
  • Top-level domain (TLD) servers
  • Authoritative servers
  • Resolving servers

Usually, a client sends a query to a resolving DNS server first. As DNS servers do not have all the name-to-IP bindings, they use a hierarchical structure to communicate between each other and find the information they need. For example, when a client sends a DNS query for www.cisco.com, the following process occurs:

  • The client PC sends the request to the resolving DNS server (the IP address of this server is configured on the PC).
  • The resolving DNS server does not have the required information, so it forwards the request to the root server (superior in hierarchy).
  • The root server redirects the request to the servers responsible for the .com domains (top-level domain DNS servers).
  • The DNS request arrives at the top-level domain DNS server, which forwards it to the authoritative DNS server that specifically handles the cisco.com domain.
  • The authoritative DNS server for the cisco.com domain provides the resolving server with the final answer.
  • The resolving server caches the information to provide a direct response to future queries.

A simplified DNS hierarchy diagram is depicted in Figure 5.12 below:

DNS Hierarchy

Figure 5.12 – DNS Hierarchy  

A generic DNS query flows over the path as follows: root name server à TLD server à authoritative server. The authoritative servers contain manually configured IP addresses that represent internal server or services names.

From a dimension standpoint, the Internet currently has around 13 root server clusters, 200 generic top-level domains (gTLDs), and 248 country code TLDs (ccTLDs). The most important reasons for using such a hierarchical distributed DNS server structure are redundancy and fault tolerance.

Combining every element presented by each level in the hierarchical DNS structure results in a Fully Qualified Domain Name (FQND), for example, www.cisco.com or mail.yahoo.com. The FQDN identifies a unique service or server.

DNS Records

DNS servers contain entries called resource records, also known as DNS records. All this information forms a database that contains naming, IP addresses, and other details. There are more than 30 DNS record types, but the most commonly used are the following:

  • A record: This type represents a standard IPv4 address and is the most commonly used DNS record on the Internet.
  • AAAA record: This type represents an IPv6 address (four As because the IPv6 address is four times larger than an IPv4 address: 128 bits vs. 32 bits). AAAA records allow for the use of the same DNS server for storing both IPv4 and IPv6 information, which is simpler than having dedicated DNS servers for IPv4 and IPv6 translations.
  • CNAME record: CNAME stands for canonical name and this type of record represents an alias of an existing record (i.e., additional names associated to a host). This is used when you have a single physical server but multiple associated services. For example, a single device might be a mail, a Web, and an ftp server for a small company. Instead of having multiple entries for these services, you can just refer them to a single server. This is useful if you have to change the record in the future because you can do this in a single place instead of affecting multiple entries.
  • MX record: MX stands for mail exchange and this type of record determines the host name for an e-mail server (not the IP address). It is often used by e-mail servers looking for other e-mail servers in order to communicate and send messages.
  • NS record: The name server (NS) record is used when you have multiple internal DNS servers in an organization and you want to designate where they are located.
  • PTR record: PTR stands for pointer record and, unlike a normal DNS lookup, it is useful if you want to perform a reverse lookup from an IP address in order to find the domain name. PTR records are the reverse of A or AAAA records.

Dynamic DNS

Dynamic DNS (DDNS) is a technique used in situations in which the IP addresses associated with specific names are often modified to prevent a denial of service to those services. If an IP address of a Web server changes, the server will not respond when identified by name because the name-to-IP binding is broken. In order to fix such situations, DDNS updates the DNS server records using a secure, automated process.

Dynamic DNS can be used by both large enterprises and home users. Enterprises might require DDNS because they use DHCP, which prevents servers of interest from having the same IP address over a long period of time. Dynamic DNS functionality is built into the Windows Active Directory and allows the domain’s controllers to register with the DNS and other computers in the domain to find AD services by issuing queries.

From a home-user perspective, DDNS functionality might be needed if the ISP allocates dynamic IP addresses, thus preventing the user from accessing home resources from other locations. An internal device cannot be identified if the public IP address keeps changing, so DDNS solves this issue by having a software application on the device automatically report the new IP to a central DDNS server on the Internet. The public third-party DDNS server creates an entry for each new IP address and this can be accessed at any point in time to access the home network.

The Dynamic Host Configuration Protocol (DHCP) is a network protocol used by hosts to automatically obtain an IP address and other parameters (e.g., gateway, DNS server, etc.). DHCP is an evolution from the old BOOTP protocol, which was also used for allocating IP addresses but had very limited functionality.

DHCP uses UDP as its Transport Layer protocol and it has a couple of well-known ports associated with it:

  • UDP port 67 (on which the server is listening)
  • UDP port 68 (used by clients)

DHCP allows a computer to make a request for an IP address when it boots up (or at a later moment). A DHCP server that listens on the well-known port responds with a specific IP address (i.e., a DHCP Offer). The client accepts this and the server sends back an acknowledgement to confirm the allocation. The entire DHCP conversation contains two packets coming from the client side and two packets coming from the server side, as depicted in Figure 5.13 below:

DHCP Process

Figure 5.13 – DHCP Process  

Going into more detail on the conversation between the client and the server, the following sequence of events is involved in the DHCP allocation process:

  • Layer 2 Broadcast destination address of FF:FF:FF:FF:FF:FF; the local switch forwards this frame to all other ports so any device on the network will receive it
  • Layer 3 destination port: UDP 67 (bootps, DHCP servers are listening on this port)
  • Layer 3 source port: UDP 68 (bootpc)
  • The DHCP server responds with a DHCP Offer packet, which includes the proposed IP address, using 67 as the source port and 68 as the destination port.
  • The client accepts the offer with a DHCP Request packet.
  • The server confirms the allocation by issuing a DHCP Acknowledgement packet. It also sends other details like the default gateway address and the DNS server address. All of these parameters are called options and the client receives them from the server as part of the DHCP conversation.

If a Windows client cannot find a DHCP server, it uses an Automatic Private IP Addressing (APIPA) address (e.g., 169.x.y.z), and it cannot communicate with any other device on the network.

Remote Access Protocols

Remote access protocols allow the remote management of network devices, meaning they can obtain console (command line interface) access. This can be done via either an unsecure communication channel, using the Telnet protocol, or a secure communication channel, using the SSH (Secure Shell) protocol. Using either of these two protocols can generate a session at the Application Layer toward a network device, which uses a software client on the management workstation to control the network device that is acting as a Telnet or SSH server.

One of the most commonly used Telnet and SSH software client is a free software utility called PuTTY, which allows a user to initiate a Telnet or SSH session with a network device and obtain control of the command line interface (CLI). The packet capture screenshots presented below illustrate a Telnet and a SSH session initiated by a client, respectively:

Telnet Session (Client to Server)

Figure 5.14 – Telnet Session (Client to Server)

SSH Session (Client to Server)

Figure 5.15 – SSH Session (Client to Server)  

From the packet captures presented above, you can see that both Telnet and SSH are considered Application Layer services that require TCP at the Transport Layer and they use the following ports:

  • Telnet: TCP port 23
  • SSH: TCP port 22

The source port in both cases is a random unallocated port on the client machine. When the session is over, the source port number disappears and the next session will probably use a different one. Analyzing the SSH packet capture, you can also see details regarding the applications used (PuTTY) in the Application Layer information field.

The reverse packet, coming from the server (the managed device) toward the client, will use the high port number as the destination and TCP port 23 or 22 as the source port. This is exemplified only for Telnet in the packet capture screenshot presented In Figure 5.16 below (SSH follows an identical logic):

Telnet Session (Server to Client)

Figure 5.16 – Telnet Session (Server to Client)  

The problem with using Telnet is that all traffic is sent in clear text (unencrypted) over the wire, so it represents a major security risk as a possible attacker could capture the configuration sent/received from the network device. For this reason, SSH should be used instead of Telnet in production environments. SSH provides the same functionality, with the additional feature of encrypting the data.

Network Time Protocol (NTP) is a protocol used by network devices to synchronize time across the network infrastructure. With NTP, hosts and network devices can make periodic requests to an NTP server (destination port UDP 123) in order to synchronize their internal clocks. Even though the hosts use an unreliable protocol at the Transport Layer, they are still expecting time-related information from the server over UDP.

Most computers have information about NTP servers by default from the factory. Many free public NTP servers are available on the Internet at the moment, but the most exact servers from a time accuracy perspective are GPS-based machines.

Remote Desktop Protocol (RDP) is a well-known application that runs on TCP port 3389 and allows users to remotely connect and manage a computer. If the RDP service is running on a remotely managed machine, you can run a remote desktop application on the client PC, which makes a request to the RDP server (managed machine) to establish a connection.

Simple Network Management Protocol (SNMP) is an Application Layer protocol that runs over UDP port 161 and is used by network administrators to gather statistics and control network devices. SNMP is used to share management information between network devices, usually between a management workstation and routers, switches, or other devices. SNMP has two components:

  • The SNMP server (manager), which is usually a dedicated workstation
  • The SNMP agent, which is usually a service on the managed network device

SNMP has evolved during the years and has now reached version 3 (SNMPv3). Network designers and engineers should demand that every environment use SNMPv3, not the older, unsecure SNMP versions (1 and 2), because of the advanced security features it presents. SNMP is used by network administrators and engineers to:

  • Control network performance
  • Troubleshoot
  • Plan scalable enterprise solutions and intelligent services

SNMP accesses detailed information in Management Information Bases (MIBs) and it uses SNMP agents. The MIB is an object-oriented hierarchical database system stored locally on the network device. An MIB entry example is 1.3.6.1.2.1.2.2.1.20.0, with 1 being the root of the MIB tree and 0 being the final leaf.

The SNMP agent is used to send and receive information from the device to the Network Management Station (NMS), and vice versa. In order to do that, different types of SNMP messages are used. The NMS will run some kind of network management software that retrieves and displays the SNMP information in a graphical user interface (GUI) format. The information displayed is used for control, troubleshooting, and planning.

Another SNMP concept is represented by community strings, which are the access control method. A community is basically a password that controls which group of people has access to certain information on the device.

Using SNMP, the administrator can gather reports from the network device regarding parameters like CPU utilization, memory utilization, and interface bandwidth utilization. The managed device contains the SNMP agent and the MIB that stores all the information. Different types of messages are used to relay information from the NMS to/from the managed device (i.e., the monitored device). This is illustrated in Figure 5.17 below:

SNMP Messages

Figure 5.17 – SNMP Messages  

The first message is called Get Request. This is sent to the managed device when the NMS wants to get a specific MIB variable from the SNMP agent that runs on that device. The Get Next Request is used to return the next object in the list after the Get Request message returns a value. The Get Bulk message works only in SNMPv3 environments and it can be used to retrieve a big chunk of data (e.g., an entire table); it also reduces the need to use many Get Request and Get Next Request messages. This reduces overhead on bandwidth utilization on the link.

The Set Request message is also sent by the NMS and is used to set an MIB variable on the agent. The Get Response message is the response from the SNMP agent to the NMS Get Request, Get Next Request, or Get Bulk messages.

A Trap is used by the SNMP agent to transmit unsolicited alarms to the NMS when certain conditions occur (e.g., device failure, state change, or parameter modifications). Different thresholds can be configured on the managed device for different parameters (like disk space, CPU utilization, memory utilization, and bandwidth utilization) and Traps are sent when the defined thresholds are reached. SNMPv3 introduced another message called Inform Request. This is similar to a Trap message and is what a managed device will send to the NMS as an acknowledgement to other messages.

Multiple SNMP versions were developed since SNMP was created, as follows:

  • SNMPv1: the initial implementation of the SNMP protocol, which offer limited security via community strings
  • SNMPv2c: the revised SNMP version, which includes multiple enhancements but still has limited security functionality via community strings
  • SNMPv3: the latest SNMP version, which offers advanced security features, including authentication and encryption; this is the recommended version to be used in production environments

SNMPv3 provides three security levels:

  • NoAuthNoPriv: no authentication and no privacy mechanisms
  • AuthNoPriv: authentication (MD5, SHA) but no privacy mechanisms
  • AuthPriv: the highest level of security; uses authentication (MD5, SHA) and privacy (e.g., DES).

Internet Control Message Protocol (ICMP) is a maintenance protocol that operates at Layer 3 and sends control messages over the network. ICMP is identified as protocol number 1 in the Layer 3 header and it can transmit multiple message types to accomplish different maintenance tasks.

While ICMP has many different functions, the main one is sending Echo Requests to a machine to verify that it is up and running. If the specific machine is operating, it will send an ICMP Echo Reply message back to the source, confirming its availability. This process, also known as a ping, is shown below in Figure 5.18:

ICMP Echo Request and Echo Reply

Figure 5.18 – ICMP Echo Request and Echo Reply  

Figure 5.19 below illustrates an Echo Request packet capture:

ICMP Echo Request

Figure 5.19 – ICMP Echo Request  

Figure 5.20 below illustrates a reply to the Echo Request:

ICMP Echo Reply

Figure 5.20 – ICMP Echo Reply  

Another ICMP function is determining whether you are trying to access a destination that is not reachable using Destination Unreachable messages. The most commonly used ICMP message types include the following:

  • Type 0: Echo Reply
  • Type 3: Destination Unreachable
  • Type 5: Redirect
  • Type 8: Echo Request
  • Type 11: Time Exceeded
  • Type 30: Traceroute

The Internet Group Management Protocol (IGMP) is used in environments that run Multicast traffic, like video streaming or audio content. IGMP allows Multicast users to subscribe or disconnect from a Multicast stream. In order to understand Multicast protocols, network devices like switches and routers must be Multicast-enabled and properly configured.

Networking Protocols

The most common networking protocols are as follows:

TCP and UDP functionality has already been analyzed, so we will focus on the ARP protocol in this section.

Address Resolution Protocol (ARP) is a network protocol that allows hosts to learn the Layer 2 address of a device it wants to communicate with by sending a query based on the Layer 3 address of the specific device.

When a host wants to communicate on the network, it does this by having Layer 3 information about the destination device (this may have been learned from a DNS query). In order to send the packet over the communication channel, the host/PC must first use the local Layer 2 address of the destination device and it does this by sending an ARP Request, as follows:

  • The PC determines it needs to know the Layer 2 address of a network device (usually the default gateway, which is often a router).
  • The PC broadcasts an ARP Request on the wire.
  • The switch receives the Broadcast ARP packet and forwards it to all other ports.
  • The destination device (router) receives the message, identifies itself in the Destination field, and sends an ARP Reply with its Layer 2 address.
  • The PC now knows the router MAC address so it can properly encapsulate Unicast frames toward that device.

Figure 5.21 below exemplifies the ARP Request/Reply behavior:

ARP Process

Figure 5.21 – ARP Process  

As depicted in Figure 5.21 above, the process starts with the source device sending a Broadcast ARP Request packet, which contains the IP address of the destination device. The destination device sends a Unicast response back to the source, which contains its own source MAC address, thus offering the missing information.

The most common protocols, organized by the TCP/IP layer they operate at, are presented in Table 5.2 below:

Table 5.2 – TCP/IP Layers and Their Protocols

Port numbers are assigned to different protocols and services so that a user will know how and what to access at the other end and to identify specific applications. They are also used to track the session associated with that protocol.

Well-known port numbers are non-ephemeral ports, meaning they are permanently assigned to a protocol or a service. They can be used as a destination port by any network-enabled machine to reach specific protocols. Temporary port numbers are ephemeral ports that are usually used as source ports in a two-way communication process. They are determined in real-time by the client workstation and are usually numbers above 1024.

Common network port numbers.

Configure port numbers and protocols in our 101 Labs – CompTIA Network+ book.

comptia network+ lab book - 101 labs

This site has been created to help you make the best out of your IT career. Whether you are trying to get your first job, get promoted, or start your own IT business, we have a course for you.

MOST POPULAR

  • Live Cisco Rack Training
  • Members Training
  • Member Bonuses

Secure Site

website security

Insert/edit link

Enter the destination URL

Or link to existing content

Logo

  • CCNA 200-301
  • CCNA 200-301 Labs
  • CCNP 350-401 ENCOR
  • CCNP 350-401 ENCOR Labs
  • CCNP 300-410 ENARSI
  • CCIE Enterprise Infrastructure
  • Cisco Packet Tracer Lab Course
  • NRS II IRP Course
  • NRS II MPLS Course
  • NRS II Service Architecture
  • Nokia Configuration Course
  • Nokia SRC Program
  • JNCIA Junos
  • HCIA (HCNA)
  • HCIA Configuration Course
  • What is Huawei R&S Certification?
  • Huawei ICT Certifications
  • Python Course
  • IPv6 Course
  • IP Multicast Course
  • NRS I Configuration Course
  • Cisco Packet Tracer How To Guide
  • Online Courses
  • Udemy Courses
  • CCNA Flashcard Questions
  • Protocol Cheat Sheets
  • Subnetting Cheat Sheet
  • Linux Cheat Sheet
  • Python Cheat Sheet
  • CLI Commands Cheat Sheets
  • Miscellaneous Cheat Sheets
  • Cisco Packet Tracer Labs
  • Cisco GNS3 Labs
  • Huawei eNSP Labs
  • Nokia GNS3 Labs
  • Short Config Videos
  • Network Tools
  • IPCisco on Social Media
  • Network Engineer Interview Questions
  • Personality Interview Training
  • Sign In/Up | Members
  • Lost password
  • Sign In/Sign Up
  • ENROLL HERE

Logo

  • Network Ports

network-ports-ipcisco.com

In computer networking, there are network port numbers used for various applications. The range of these network ports are from 0 to 65535 . There are three different port types used networking. These network port types are given below:

  • Well-known Ports (0 – 1024)
  • Registered Ports (1024 – 49151)
  • Dynamic Ports (49152 – 65565)

Some of these port numbers are well-known ports. These well-known ports are the reserved ports between 0 and 1024 . The full list of these network port numbers are given in RFC 1700. IANA (Internet Assigned Numbers Authority) assigns these well-known ports.

The other network   ports are registered ports between 1024 and 49151 . These portsa re assigned by IANA for specific services.

The last part of ports in networking are dynamic ports. Daynamic ports are the ports from 49152 to 65565 . These ports in networking are not registered with IANA.

TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) uses these well-known ports. Only one port is required for full-duplex, bidirectional traffic. Beside SCTP (Stream Control Transmission Protocol) and DCCP (Datagram Congestion Control Protocol) use these ports.

You can download the Cheat Sheet about Well-known network ports.

Table of Contents

Well Known Ports in Networking

Well-known network ports are from 0 to 1024 . These port numbers are given by IANA (Internet Assigned Numbers Authority) . And the full list of these port numbers are in RFC 1700.

Some of these  well-known ports are used by TCP and some of them are used UDP. These TCP and UDP ports are also asked in many network engineering technical interviews as interview questions . So, what are these ports in networking?

Well-known TCP ports are the network ports used by the applications that works with TCP as transport protocol. So, what are these applications that uses well-known TCP ports ?

For example, FTP (File Transport Protocol) is one of the applications that uses TCP ports. The FTP ports are TCP port 20 and TCP port 21 . The other applcation that uses TCP as transport protocol is Telnet. Telnet uses TCP port 23 .

Well-known UDP ports are the network ports used by the applications that works with UDP as transport protocol. So, what are these applications that uses well-known UDP ports ?

For example TFTP (Trivial File Transport Protocol) is one of the applciations that uses UDP ports. UDP port 69 is used by TFTP. Another example that uses UDP as transport protocol is SNMP. SNMP uses UDP port 161 for SNMP and UDP port 162 for SNMP trap messages.

Below, you can find all the wellknown ports used by the applications that uses TCP & UDP network ports .

Registered Network Ports

Registered networking ports start from port 1024 to 49151. IANA (Internet Assigned Numbers Authority)  assigns these registerd network ports. Below, you can find these registered networking ports

Dynamic Networking Ports

Registered networking ports are the ports from 49152 to 65565.  These ports can be used locally or dynamically by the applications. They are not assigned by IANA.

Network Ports Practice

Quesitons for networking ports, question 1: which network port range is reserved as well-known ports.

a) 0 – 1024

b) 1024 – 49151

c) 49152 – 65565

Question 2: Which network port range is reserved as Registered Ports ?

Question 3: which network port range is reserved as dynamic ports , question 4: network port numbers are assigned by …., question 5: which ones are the default network ports for ftp .

a) UDP 20, 21

b) TCP 20, 21

c) UDP 22,23

d) TCP 22,23

Question 6: Which ones are the default SNMP Ports?

a) UDP 157, 158

b) TCP 157, 158

c) UDP 161, 162

d) TCP 161, 162

Question 7: What is the default Telnet port?

Question 8: which ones are the default tftp port, question 9: tcp port 25 is the default network port of …., question 10: udp port 123 is the default network port of …..

Answers: 1) a     2) b    3) c    4) b    5) b    6) c    7) d     8) a   9) d   10) c

port numbers in network

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

CCNP Enterprise 350-401 ENCOR

  • IPv4 Subnetting
  • Private IPv4 Address Ranges
  • APIPA Addresses
  • IPv4 Addressing
  • IPv6 Addressing
  • IPv6 Link Local Addresses
  • IPv6 Neighbour Discovery Protocol
  • IPv6 Floating Static Routing
  • IPv6 Address Types
  • IPv6 Configuration Example on Packet Tracer

ICMP and ARP

  • Ping Command
  • Gratuitous ARP
  • ICMP (Internet Control Message Protocol)
  • Address Resolution Protocol (ARP)

Routing Fundamentals

  • IPv6 Static Route Configuration on Cisco IOS
  • Policy Based Routing (PBR)
  • Static Route Configuration on Cisco Routers
  • IPv6 Routing Protocols
  • Dynamic Routing Protocols
  • IP and Layer 3 Overview
  • RIPng Configuration Example on Cisco IOS
  • RIP Configuration With Packet Tracer
  • RIPng (RIP Next Generation)
  • Routing Information Protocol (RIP)
  • EIGRP (Enhanced Interior Gateway Routing Protocol)
  • EIGRP Tables
  • EIGRP Packet Types and Neighbourship
  • Key Configurations on EIGRP
  • EIGRP Configuration With Packet Tracer
  • EIGRP for IPv6
  • EIGRP For IPv6 Configuration On Cisco IOS
  • OSPF Virtual-Link Configuration On Packet Tracer
  • OSPF Passive Interface
  • LSDB (Link State Database)
  • OSPF Area Border Router (ABR) and ASBR
  • OSPF Cost and Shortest Path First
  • OSPF NSSA and Totally NSSA on Cisco Packet Tracer
  • OSPF Stub Area and Totally-Stub Area on Cisco Packet Tracer
  • OSPF External Routes on Cisco Packet Tracer
  • OSPF Standard Area and Backbone Area on Cisco Packet Tracer
  • OSPFv3 Configuration Example on Cisco IOS
  • OSPFv3 (Open Shortest Path First Version 3)
  • Cisco Single Area OSPF Configuration
  • Other OSPF Key Points
  • OSPF Network Types
  • OSPF Area Types
  • OSPF LSA Types
  • OSPF Packet Types
  • OSPF Adjacency
  • OSPF(Open Shortest Path First) Overview
  • BGP Next Hop Self Command
  • BGP Multi Hop Command
  • BGP Neighbor Update-Source
  • Cisco eBGP Configuration on GNS3
  • BGP Route Reflector
  • Cisco BGP Route Reflector Configuration on GNS3
  • BGP Path Attributes - MED
  • BGP Path Attributes - Origin
  • BGP Path Attributes - AS Path
  • BGP Path Attributes - Local Preference
  • BGP Path Attributes - Weight
  • BGP Configuration Example on Packet Tracer
  • BGP AD and BGP Path Attributes
  • IBGP and EBGP
  • BGP Peers, BGP Sessions, BGP Messages
  • BGP (Border Gateway Protocol)

Layer 2 Technologies

  • PPPoE Configuration With Packet Tracer
  • Metro Ethernet Overview
  • Frame-Relay Configuration with both Inverse-ARP and Frame-Relay Map
  • Frame Relay Point-to-Point Configuration
  • Multipoint Frame Relay Configuration
  • Point-to-Point Protocol over Ethernet (PPPoE)
  • HDLC and PPP
  • PPP Configuration on Cisco

VPN Technologies

  • VPN Types and Protocols of VPN

DHCP and DNS

  • Cisco DHCP Relay Agent Configuration with GNS3
  • Stateless Address Auto Configuration
  • DHCPv6 Overview

EtherChannels

  • Etherchannel Cisco PAgP Configuration on GNS3
  • PAgP Configuration Example
  • LACP Configuration on Cisco IOS
  • Link Aggregation Control Protocol
  • PAT Configuration with Packet Tracer
  • NAT (Network Address Translation)
  • Static NAT Configuration with Packet Tracer
  • Dynamic NAT Configuration with Packet Tracer

Access Lists

  • Extended ACL Cisco Configuration
  • Access Control Lists for Traffic Control
  • Standard ACL Configuration With Packet Tracer
  • DHCP Snooping Configuration on Packet Tracer
  • REST API Security
  • Cisco 802.1x Configuration
  • WebAuth (Web Authentication)
  • What is DHCP Snooping?
  • Access Control Lists
  • Control Plane Policing (CoPP)
  • Basic Cisco Router Security Configuration
  • SNMP Configuration On Cisco IOS
  • SNMP – Overview

Spanning Tree

  • PVST+ and Rapid PVST+Configuration on Packet Tracer
  • PVST+ and Rapid PVST+
  • MST Configuration on Cisco
  • MST (Multiple Spanning Tree)
  • STP Operation
  • Spanning Tree Protocol
  • Rapid Spanning Tree Protocol
  • STP Portfast Configuration on Cisco Packet Tracer
  • RSTP Configuration on Cisco Packet Tracer
  • STP Configuration on Cisco Packet Tracer
  • Inter VLAN Routing Configuration on GNS3
  • Inter VLAN Routing Configuration Example
  • VTP Configuration with Packet Tracer
  • DTP and VLAN Frame Tagging Protocols
  • Inter VLAN Routing with Router on Stick Topology
  • VLANs (Virtual Local Area Networks)
  • VLAN Port Assignment and VLAN Port Types
  • VLAN Configuration on Cisco Packet Tracer

First Hop Redundancy

  • HSRP Configuration on GNS3
  • Cisco Stateful Switchover (SSO)
  • GLBP Configuration on Cisco
  • GLBP (Gateway Load Balancing Protocol)
  • VRRP Configuration on Cisco
  • VRRP (Virtual Router Redundancy Protocol)
  • First Hop Redundancy Protocols
  • QoS Policing and Shaping
  • QoS Classification and Marking

Port Monitor

  • ERSPAN Configuration on Packet Tracer
  • Remote SPAN Configuration on Packet Tracer
  • Local SPAN Configuration on Packet Tracer
  • Cisco SPAN Overview

Path Virtualization

  • IPSec Tunneling
  • Cisco IPSec VPN Configuration
  • Cisco Virtual Routing and Forwarding (VRF)
  • GRE Tunnel Overview
  • GRE Tunnel Configuration with Cisco Packet Tracer

Device Access Control

  • Cisco SSH Configuration With GNS3
  • Authentication, Authorization, Accounting
  • AAA Protocols

Multicast Protocols

  • Bidirectional PIM (BIDIR-PIM)
  • Multicast Routing
  • PIM-SM (PIM Sparse Mode)
  • PIM-SSM (Source Specific Multicast)
  • PIM-DM (PIM Dense Mode)
  • PIM (Protocol Independent Multicast)
  • IGMP Snooping
  • IGMP Configuration

Cisco SD-WAN

  • Cisco SD-WAN Verification
  • Cisco vSmart Controller Configuration
  • Cisco vBond Initial Configuration
  • Cisco SD-WAN Components
  • SD-WAN Architecture

Wireless Security

  • EAPoL (Extensible Authentication Protocol over LAN)
  • Pre-Shared Key (PSK)

Network Security Design

  • 802.1x (Port Based Network Access Control)
  • Network Security: Cisco Threat Defense
  • MACsec (Media Access Control Security)
  • Cisco TrustSec
  • MAC Authentication Bypass (MAB)

IP Services

  • Cisco NTP Configuration
  • uRPF (Unicast Reverse Path Forwarding)
  • Precision Time Protocol (PTP)
  • NTP (Network Time Protocol)

Network Assurance

  • Cisco Syslog Server Configuration with GNS3
  • Conditional debugging
  • Cisco Terminal Monitor and Cisco Logging Monitor
  • Cisco Debug Command
  • Cisco IP SLA and Configuration
  • Flexible Netflow Configuration
  • Flexible Netflow
  • Netflow and Netflow Configuration
  • Chef Overview
  • Ansible vs Puppet vs Chef
  • Ansible Overview
  • Puppet Overview
  • Data Serialization Languages: JSON, YAML, XML
  • Network Automation Tools
  • Cisco SD-Access Overview
  • Traditional Network Management versus Cisco DNA Center
  • Cisco DNA Center
  • Cisco DNA and Intent-Based Networking (IBN)
  • How Network Automation Impacts Network Management
  • REST APIs Overview

Network Virtualization

  • Cisco LISP (Locator ID Separation Protocol)
  • Virtual Switching and Virtual Switch (vSwitch)
  • Container vs Virtual Machine
  • Virtual Extensible LAN (VXLAN)
  • CAPWAP versus LWAPP
  • Wireless Roaming: Layer 2 and Layer 3 Roaming
  • LWAPP Protocol
  • CAPWAP Protocol
  • Access Point Discovery and Join Process

Other Lessons

Latest lessons.

  • Cisco Switch Configuration on Cisco Packet Tracer Part of: CCNA 200-301
  • Switch Configuration on Cisco Packet Tracer Part of: Cisco Packet Tracer Lab Course
  • REST API Security Part of: CCNP Enterprise 350-401 ENCOR
  • Network Security: Cisco Threat Defense Part of: CCNP Enterprise 350-401 ENCOR
  • IPv6 Floating Static Routing Part of: CCNP Enterprise 350-401 ENCOR
  • IPv6 Link Local Addresses Part of: CCNP Enterprise 350-401 ENCOR
  • IPv6 Neighbour Discovery Protocol Part of: CCNP Enterprise 350-401 ENCOR
  • IPv6 Configuration Example on Packet Tracer Part of: CCNP Enterprise 350-401 ENCOR
  • Private IPv4 Address Ranges Part of: CCNP Enterprise 350-401 ENCOR
  • APIPA Addresses Part of: CCNP Enterprise 350-401 ENCOR
  • More Lessons

Latest Blog Posts

how-ransomware-attack-works-ipcisco.com

WHAT YOU WILL FIND?

  • 250.000+ Students All Over The World
  • 8.000+ Questions & Answers
  • 100+ Lab Files & Cheat Sheets
  • 30+ IT/Network Courses
  • A Real Desire To Help You
  • Daily Social Media Shares
  • %100 Satisfaction
  • CISCO Courses
  • NOKIA Courses
  • HUAWEI Courses
  • JUNIPER Courses
  • PYTHON Course
  • KEY Courses
  • VIDEO Courses
  • UDEMY Courses
  • Cheat Sheets
  • Configuration Files
  • Interview Questions
  • IPCisco On Social Media
  • Pärnu mnt. 139c – 14, 11317, Tallinn, Estonia
  • [email protected]

Service Name and Transport Protocol Port Number Registry

port numbers in network

Contact Information

NetworkProGuide

Common Ports Cheat Sheet

We are reader supported. We may earn a comission if you use links on our site. Learn more.

It’s a pain trying to memorize port numbers and their corresponding service names and protocols. So, we created this concise cheat sheet of common network ports and their associated protocols and service names for you to use as a quick reference.

Feel free to print it out and hang it up or share a link to it with your colleagues and peers. Use it to speed up port identification or as a training resource for onboarding new network administrators or engineers.

Free Common Port Cheat Sheet

Preview of cheat sheet listing common ports and their associated protocols in computer networking.

Click on the network port chart above to view the printable, searchable PDF version. Scroll down below for the port list tables.

This list is by no means exhaustive. It just lists the most frequently used ports. There are a total of 65,535 TCP/UDP ports. They are divided into 3 classes:

  • Well Known Ports (1-1023) – Reserved ports registered with IANA for specific services.
  • Registered Ports (1024-49151) – Also registered with IANA but not as commonly used.
  • Dynamic/Private Ports (49152-65535) – Reserved by IANA for proprietary services or private use.

IANA (Internet Assigned Numbers Authority), in case you’re wondering, is the organization that oversees global IP address allocation and port classification.

Some common protocols that use these ports:

  • TCP (Transmission Control Protocol)
  • UDP (User Datagram Protocol) – Only one port needed for bidirectional traffic
  • SCTP (Stream Control Transmission Protocol)
  • DCCP (Datagram Congestion Control Protocol)

Common Well-known/System Ports in Computer Networking

Well-known network ports range from 0 to 1023. These ports are assigned by IANA and listed in RFC 1700 . On most systems they can only be used by system (or root) processes or by programs executed by privileged users. Some well-known ports use TCP, some use UDP, and some can be configured to use either. 

Well-known TCP ports are used by applications that rely on TCP as the transport protocol. Examples:

  • FTP (File Transport Protocol) uses TCP ports 20 and 21
  • Telnet uses TCP port 23

Well-known UDP ports are used by applications relying on UDP. Examples:

  • TFTP (Trivial File Transport Protocol) uses UDP port 69
  • SNMP uses UDP port 161 for messages and UDP port 162 for traps

Knowledge of these ports is helpful for network engineers looking for work as they are popular topics asked about in technical interviews.

Common Registered Network Ports

Registered network ports are ports in the range of 1024 to 49151 that have been officially registered with the Internet Assigned Numbers Authority (IANA) for specific services and applications.

Some key points about registered ports:

  • They come after well-known ports (0-1023) and before dynamic/private ports (49152-65535).
  • Anyone can register a port in this range with IANA for their application/service.
  • Registration ensures the port number is standardized and should not be used by other services.
  • Examples include port 3306 for MySQL, port 1521 for Oracle database, port 1723 for PPTP.
  • Not as commonly used as well-known ports, but still important for avoiding conflicts.
  • Provide an official way to allocate ports for proprietary applications and organizational services.
  • The full list of registered ports is maintained by IANA and published on their website.
  • Helpful for network administration to know what traffic these registered ports are associated with.

Common Dynamic/Private Network Ports

Dynamic/Private network ports refer to the range of ports from 49152 to 65535 that are not officially registered with IANA for any specific service or application and are available for private or temporary use. 

They can be used by applications dynamically as needed, usually for establishing temporary connections. Often they are used by client-side applications that initiate connections to servers on well-known or registered ports. 

A common example of dynamic network port use is Ephemeral Ports. These are short-lived transport layer ports used when an application on a client device makes an outgoing connection to a server. They allow a client application to use a random available port for its side of the connection which has multiple benefits from enabling multiple connections from the same client application to traversing firewalls as most firewalls are configured by default to allow connections from ephemeral ports to well-known ports.

The dynamic/private port range also provides ports for private or customized services within an organization since they are unregistered.

Top 35 Most Common Ports for Certification Exams and Interviews

Prepping for an exam or interviewing for a role in networking or a networking adjacent field? Prioritize memorizing the ports below.

In my experience, these are the ports most frequently used in certification exams and to quiz candidates in technical interviews.

Recommended Tool: SolarWinds Hybrid Cloud Observability

Screenshot showing solarwinds hco preview

  • Hybrid infrastructure, network, and application performance observability
  • Physical and virtual hosts, SD-WAN, and device monitoring
  • Automated discovery and dependency mapping
  • Historical and real-time dashboards
  • Intelligent AIOps correlation, alerting, and customizable reporting
  • No-code configuration management for networks, virtualization, servers, and applications

Try It Free Now

Avatar

Network Engineer III

I am a CCNP certified Network Engineer III who has spent the last decade elbow deep in enterprise System Administration and Networking in the local government and energy sectors. I can usually be found trying to warm up behind the storage arrays in the datacenter.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

Network Ports and Protocols and What They’re Used For

Published October 20, 2023

Reviewed by Jeff Kish, CCIE

With more than 65,000 port numbers in existence, a list of common networking ports is not only helpful, but necessary. Especially if you’re studying for a networking certification exam like the Network+ or the CCNA . Both of these exams will test your knowledge of common ports and their associated services. 

As a component of the Transport Layer ( Layer 4 in the OSI model ), TCP and UDP ports are the virtual places where network connections begin and end. Port numbers allow network-connected devices to transmit data using transmission protocols. Without port numbers, network traffic would be indecipherable.

This list of common TCP and UDP ports is by no means exhaustive, but does include ports that network administrators will be expected to use in their day-to-day role.

List of Common Ports and Protocols

Understanding tcp and udp protocols: frequently asked questions.

Ports and their affiliated numbers are used to identify specific applications and services. Port numbers are what allow apps on an IP network to communicate with the source and destination IP address and the transport protocol.

What is a Port Number?

Networking protocols use port numbers that are based on the type of packet being sent and/or received. A network host typically runs many software packages/processes, so when it receives a packet it looks to the port number to identify which process should get it.

How Do Port Numbers Work?

All network-connected devices are affiliated with a port that’s been assigned a number. These port numbers are standardized, and each is reserved for certain protocols. 

Port identification numbers are used to ensure the correct information is being sent and received. For example, one port is used to send the packet, while another port is used to receive the data.

All port numbers target a service or application and are reserved for certain protocols.

Where Do Ports Fall Into the OSI Model?

Ports are a concept of Layer 4 — the Transport Layer. Transport protocols such as TCP and UDP indicate the port that a packet should go to. 

What Are Well Known/Systems Ports?

Port numbers that fall into the category of Well Known/Systems ports include numbers between 0 and 1023. IP protocols use them for TCP, UDP, Telnet, and FTP. 

These port numbers are only used by network admins, default applications, operating systems, and services. Users do not have access to this range of ports.

What are Registered Port Numbers?

After Well Known ports is the next range of port numbers, which includes ports 1024 through 49151. This range of ports is known as “Registered ports,” because they are registered with the IANA (Internet Assigned Numbers Authority).

Unlike Well Known port numbers, Registered port numbers are used by network users. 

What Are Dynamic/Private Port Numbers?

The final range of port numbers fall between 49152 and 65535. Unlike Well Known or Registered port numbers, these ports can be used without any restriction.

I have read and understood the privacy policy and am able to consent to it.

  • Product Product
  • Browse training
  • All courses
  • Certification training
  • New training
  • Solutions Solutions
  • All Solutions
  • Resources Resources
  • Learner stories
  • Why e-learning?
  • Customer reviews
  • Ultimate Cert Guides
  • Company Company
  • Become a Trainer
  • Transparency in Coverage
  • Support Support
  • Help Center

Let's chat!

Subscribe Now

* You will receive the latest news and updates on your favorite celebrities!

Trending News

Vincent Tech Blog

40 Network Protocols with Port Numbers, Transport Protocols and Meanings 

port numbers in network

40 Network Protocol Names And Port Numbers With Their Transport Protocols And Meanings tabulated by Precious Ocansey (HND, Network Engineer).

Before going straight to the table.

Firstly, what are Network Protocols?

Network protocols are the languages and rules used during communication in a computer network. There are two major transport protocols namely;

TCP and UDP

port numbers in network

TCP   which stands for “Transmission Control Protocol”, is a suite of communication protocols used to interconnect network devices on a local network or a public network like the internet. TCP  is known as “connection-oriented” protocols as it ensures each data packet is delivered as requested. Therefore, TCP is used for transferring most types of data such as webpages and files over the Internet.

UDP which stands for “User Datagram Protocol” is part of the TCP/IP suite of protocols used for data transferring. UDP is a known as a “connectionless-oriented” protocol, meaning it doesn’t acknowledge that the packets being sent have been received. For this reason, the UDP protocol is typically used for streaming media. While you might see skips in video or hear some fuzz in audio clips, UDP transmission prevents the playback from stopping completely.

Furthermore, TCP also includes built-in error checking means TCP has more overhead and is therefore slower than UDP, it ensures accurate delivery of data between systems. Therefore TCP is used for transferring most types of data such as webpages and files over the local network or Internet. UDP is ideal for media streaming which does not require all packets to be delivered.

Port Numbers: They are the unique identifiers given to all protocol numbers so they can be accessed easily.

Below is as written  by Precious Ocansey. The 40 Network Protocols, their port numbers and their transport protocols

FREE Coupon: Complete Certificate Authority (ADCS) Server 2016 Course

How to blend ghanaian flag with an image - photoshop cs6.

port numbers in network

Related posts

Create cmak app for vpn remote users on windows server 2012 , configuring group policy on windows server 2012 (complete) , how to configure adrms windows server 2012 , 1 – introduction to ipv4 addressing , how to host website on your own pc , 10 reasons why pcs crash you must know .

port numbers in network

Good job.interesting more grace sir

Iṣẹ rere, diẹ ẹ sii oore ọfẹ

port numbers in network

ICMP does not use any port, 1 is its protocol number.

port numbers in network

Updated. Thank you

port numbers in network

IGMP does not use a transport layer protocol such as TCP or UD

port numbers in network

Leave a Reply Cancel reply

Save my name, email, and website in this browser for the next time I comment.

Notify me of follow-up comments by email.

Notify me of new posts by email.

This site uses Akismet to reduce spam. Learn how your comment data is processed .

Today's pick

How to set up a virtual machine , recon for pentesting using python (email grabbing) , fix: outdated npm packages (deprecated) in node js project , svn fix trac error: no node at revision wp plugin , setup flutter on kali, ubuntu, and any other linux distro  , build a quiz app using flutter for android and ios  , 40 network protocols with port numbers, transport protocols and meanings  , ios 14: everything you need to know about apple’s new release  , subscribe for newsletter.

* You will receive the latest news and updates on your favorite topics!

flutter version downgrade

How to Downgrade Flutter Version – FIXED 

Learn how to downgrade your flutter version to a lower version, in this article we will reduce the flutter version…

resources for playstore and apple store

Generate Resources for Android Playstore & iOS Apple Store Flutter 

In this post, we’ll generate resources for the flutter app we created in the previous post. we’ll be learning how…

flutter app

Build a Quiz App using Flutter for Android and iOS 

In this post we’ll be working with Flutter, a fast-rising Developer tool built by Google to develop an Android App,…

flutter linux

Setup Flutter on Kali, Ubuntu, and any other Linux Distro 

In this post, we’ll be learning how to set up your Flutter on Linux for development. Flutter is a fast-rising…

xcode

FIXED xcodebuild: Failed to load code for plug-in – Repeatedly Being Asked to Install Command Line Tools 

Hey there, updating your MacOS Montery Xcode can be a pin in the a$$ especially when you got Xcode working…

Username or Email Address

Remember Me

Registration is closed.

How-To Geek

How to check open tcp/ip ports in windows.

Everything that connects to the Internet uses ports in one way or another,

Hannah Stryker / How-To Geek

Read update, quick links, how do ports work, use built-in tools to see what is listening on a port, use nirsoft currports to view what is listening on a port, key takeaways.

  • Run the command "netstat -ab" in an elevated Command Prompt, PowerShell, or Terminal window to see a list of applications and their associated ports. This works in Windows 11 too.
  • Checking open ports can be done using built-in tools like Command Prompt or PowerShell, which list active ports and the associated process names or identifiers.
  • The freeware application CurrPorts by NirSoft provides an easier way to view what is listening on a port, displaying detailed information about the process and allowing for better management of ports.

Whenever an application wants to make itself accessible over the network, it claims a TCP/IP port, which means that port can't be used by anything else. So how do you check open ports to see what application is already using it?

We've tested this process and confirmed that all of the steps are up-to-date, and that they all work in Windows 11, too.

An IP address specifies a computer — or other network device — on a network. When one device sends traffic to another, the IP address is used to route that traffic to the appropriate place. Once the traffic reaches the right place, the device needs to know which app or service to send the traffic on to. That's where ports come in.

If the IP address is akin to a street address on a piece of mail, the port is something like the name of the person at that residence who gets the mail. For the most part, you don't need to worry about ports. But once in a while, you might encounter an app that's set to listen for traffic on the same port that another app already has in use. In that case, you'll need to identify the app that already has that port in use.

There are a number of ways to tell what application has a port locked, but we're going to walk you through a couple of built-in ways that use the Command Prompt , PowerShell , or the Terminal , and then show you a great freeware application that makes it even easier. All these methods should work no matter which version of Windows you use.

We've got two commands to show you. The first lists active ports along with the name of the process that's using them. Most of the time, that command will work fine. Sometimes, though, the process name won't help you identify what app or service actually has a port tied up. For those times, you'll need to list active ports along with their process identifier numbers and then look those processes up in Task Manager.

Option One: View Port Use Along with Process Names

First, you'll need to open the Command Prompt in administrator mode. Hit Start, and then type "command" into the search box. When you see "Command Prompt" appear in the results, right-click it and choose "Run as administrator," or click "Run as Administrator" on the right.

You can also use PowerShell or Terminal for this.

Enter "Command Prompt" into the Start Menu search, then right-click the "Command Prompt" result and click "Run as Administrator" or click "Run as Administrator" on the right-hand side.

At the Command Prompt, type the following text and then hit Enter:

netstat -ab

After you hit Enter, the results may take a minute or two to fully display, so be patient. Scroll through the list to find the port (which is listed after the colon to the right of the local IP address), and you'll see the process name listed under that line. If you'd like to make things a little easier, remember that you can also pipe the results of the command to a text file . You could then just search the text file for the port number you're after.

Here, for example, you can see that port 49902 is tied up by a process named picpick.exe. PicPick is an image editor on our system, so we can assume the port is actually tied up by the process that regularly checks for updates to the app.

The port 49902 is being used by the process "picpick.exe."

Option Two: View Port Use Along with Process Identifiers

If the name of the process for the port number you're looking up makes it difficult to tell what the related app is, you can try a version of the command that shows process identifiers (PIDs) rather than names. Type the following text at the Command Prompt, and then hit Enter:

netstat -aon

The column at the far right lists PIDs, so just find the one that's bound to the port that you're trying to troubleshoot.

The Process IDs associated with a given port.

Next, open up Task Manager by right-clicking any open space on your taskbar and choosing " Task Manager ." You can also hit Ctrl+Shift+Esc.

Right-click empty space on the taskbar, then click "Task Manager."

If you're using Windows 8, 10, or 11 switch to the "Details" tab in Task Manager.

In older versions of Windows, you'll see this information on the "Processes" tab. Sort the list of process by the "PID" column and find the PID associated with the port you're investigating. You might be able to tell more about what app or service has the port tied up by looking at the "Description" column.

Sort by Process ID (PID), then find the associated application.

If not, right-click the process and choose "Open file location." The location of the file will likely give you clues as to what app is involved.

Right-click the process and click "Open File Location."

When Once you're there, you can use the End Process, Open File Location, or Go to Service(s) options to control the process or stop it.

If you aren't really the Command Prompt type — or you'd rather just use a simple utility to do all this in one step — we recommend the excellent freeware CurrPorts utility by NirSoft. Go ahead and download the tool. Just make sure you get the right version (the regular version is for 32-bit Windows and the x64 version is for 64-bit Windows). It's a portable app , so you won't need to install it. Just unzip the download folder and run executable.

In the CurrPorts window, sort by the "Local Port" column, find the port you're investigating, and you can see everything — the process name, PID, port, the full path to the process, and so on.

CurrPorts by Nirsoft is can be sorted by which local port is open.

To make it even easier, double-click on any process to see every single detail in one window.

The details of a process in CurrPort.

When you've determined what app or service has the port you're investigating tied up, it's up to you how to handle it. If it's an app, you may have the option to specify a different port number. If it's a service — or you don't have the option to specify a different port number — you'll likely have to stop the service or remove the app.

  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture

Related Articles

  • Error Correction in Computer Networks
  • What is Routing?
  • IPsec (Internet Protocol Security) Tunnel and Transport Modes
  • Diffie-Hellman Key Exchange and Perfect Forward Secrecy
  • RSA Blind Signatures
  • Cryptography in Wireless Sensor Networks
  • Functions of Session Layer
  • Network Monitoring and Packet Capture Techniques
  • RARP Packet Format
  • Anycast Routing and its Applications
  • Microwaves in Computer Networks
  • What is Dynamic ARP Inspection?
  • SMTP Extensions: STARTTLS, and DANE
  • SDN for Vehicular Ad-Hoc Networks (VANETs)
  • Chosen Ciphertext Attacks on RSA
  • Differentiated Services (DiffServ) and Traffic Classification
  • What is Smart DNS?
  • What are Gateways in Computer Network?
  • Packet Sniffing and Network Analysis Tools: Wireshark, tcpdump

What is Ports in Networking?

Whenever any application in one computer sends data to another application of a different computer then it sends using IP Address and MAC Address but how does our computer know that this data is for a specific application and this data is sent by any specific application? There comes the concept of Port.

For instance, imagine your MAC Address or IP Address as the PIN code of the nearest Post Office and your house address as a Port. Whenever any parcel is sent to you it gets received by the nearest post office and then it is identified by your address where to deliver that parcel. Similarly in a computer data is first received using their IP or MAC address then it is delivered to the application whose port number is with the data packets.

Port is a logical address of a 16-bit unsigned integer that is allotted to every application on the computer that uses the internet to send or receive data.

Now every time any application sends any data, it is identified by the port that which the application sent that data and the data is to be transferred to the receiver application according to its port. We often call port as port number.

In the OSI Model ports are used in the Transport layer. In the headers of Transport layer protocols like TCP and UDP , we have a section to define port(port number). The network layer has to do nothing with ports, their protocols only care about IP Addresses.

Ports are assigned by computer i.e. operating system to different applications. Ports help computer to differentiate between incoming and outgoing traffic. Since the port is a 16-bit unsigned number it ranges from 0 to 65535.

Types of Ports

Ports are further divided into three categories:

Well Known Port

  • Registered port

Dynamic Port

  • It is from the range 0 to 1023
  • It is reserved for common and specifically used service
  • It is used by some widely adopted protocols and services like HTTP (port 80), FTP(port 21), DNS(Port 53), SSH(port 22), etc…..

Registered Port

  • It is from range 1024 to 49151
  • These are used by applications or services that are not as common
  • But it is used by those applications or services which require its specific port
  • Organizations can ask IANA(Internet Assigned Number Authority) for any specific port number within this range
  • It is from range 49152 to 65535
  • It is also known as Ephemeral or Private Port
  • It is used for those connections that are temporary or short-lived
  • It is not registered or assigned and can be used by any process

Importance of Ports

Ports have many significance. Some of them are-

  • Identification of service- Different application/services that work on the same device can be differentiated by their port numbers. For example, HTTP (Port number 80) and SMTP(port number 25) in the same computer uses different port number to ensure their data goes to the correct service
  • Efficient Data Routing- When a network device receives data from different places it uses port numbers to efficiently route those data packets to the respective application
  • Block traffic from specific applications/services- When we have to block incoming or outgoing traffic from a specific application/service then we need to install a firewall and specify the port number of that application/service. We block traffic from/to some specific applications/services when we find any potential threats from those applications/services
  • Scalability of services- Many services can run simultaneously on the same device and can be differentiated using their port number. This helps the device to scale and support many services at the same time.

Some Popular Port Numbers

Some common/Popular port numbers that are used by those applications/services which are frequently used by us-

FAQs on Ports in Networking

Q.1: what is port.

Port is a logical address of a 16-bit unsigned integer that is allotted to every application on the computer that uses the internet to send or receive data. It ranges from 0 to 65535.

Q.2: What is the Socket Address?

Socket Address is the combination of IP Address and Port Number. It is used in communication between two differnt applications/services.

Q. 3: Why Port Number is used?

Port Number or Port is used to uniquely identify any appication/services running on the same device.

Please Login to comment...

  • Geeks Premier League 2023
  • Geeks Premier League
  • 10 Best Notion Integrations to Connect Your Apps
  • 10 ChatGPT Prompts for Financial Analysts to Streamline Analysis
  • 10 Best AI Tools for Solving Math Problems Effortlessly [Free + Paid]
  • Elicit vs. Scholarcy: Which AI Extracts Better Research Insights?
  • Dev Scripter 2024 - Biggest Technical Writing Event By GeeksforGeeks

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

WyzGuys Tech Talk

Home WyzGuys Tech Talk Mnemonics and Tricks for Well-Known Port Numbers

Mnemonics and Tricks for Well-Known Port Numbers

This is a gift from LycanWolfe on reddit/r/CompTIA .  Used with permission.

I struggled memorizing these and hope these tricks I used to get them to actually stay in my brain rather than memory dump after tests help you as well :). Try making your own mnemonics as I feel the process of making ways to remember helps it stick much faster and you’ll always remember the funny way you linked things up.

File Transfer Protocol – FTP: 20-21 . “Date at 20? I was Full Time Partier until I turned 21 and got some self Control.” 20=Data 21=Control. A bit long winded but it works.

Secure Shell – SSH : 22 looks like two “S”s.

Telnet: 23 . Tell ’em Micheal Jordan (jersey number 23) hits nothing but net.

Simple Mail Transfer Protocol – SMTP: 25 . She Mailed Twenty-five Packages.

Domain Name System – DNS: 53 . Dad! No Salt! You’re 53! (sorry folks).

Dynamic Host Configuration Protocol – DHCP: 67(server), 68(client) Downtown Has Cheese Pizza where 67th Street and 68th Cross.

Hypertext Transfer Protocol – HTTP: 80 . Hold The Phone, I’ve seen a ghost. (80 is the ghost face).

Hypertext Transfer Protocol Secure – HTTPS: 443 . Think 4×4 safe and 3 is the key. Securing the safe.

Internet Mail Access Protocol – IMAP: 143 . Internet Made A P(pen pineapple pen song). Turn the numbers into letters and MAKE a P out of the 1. M=3, 4=A, 1=P. The Mnemonic helps to remind you you’re making Letters from similar shaped numbers.

Remote Desktop Protocol – RDP: 3389 Remote Dog Protocol. This one is just a play on words. Visual imagery really helps this one stick in your head. 33 sounds like REE. The 89 looks like a dogs eyes and nose to me. Picture your dog getting the remote for you.

From Bay35music

However, if you want a mnemonic phrase for the laser printing process, just remember:

P eople  C an  E at  D onuts  T o  F eel  C ontent.

Transferring

theweevil100

Remembering NTP is as easy as 123

port numbers in network

About the Author:

Your Comments

Email * (will not be published)

This site uses Akismet to reduce spam. Learn how your comment data is processed .

Networking and RabbitMQ

Clients communicate with RabbitMQ over the network. All protocols supported by the broker are TCP-based. Both RabbitMQ and the operating system provide a number of knobs that can be tweaked. Some of them are directly related to TCP and IP operations, others have to do with application-level protocols such as TLS. This guide covers multiple topics related to networking in the context of RabbitMQ. This guide is not meant to be an extensive reference but rather an overview. Some tuneable parameters discussed are OS-specific. This guide focuses on Linux when covering OS-specific subjects, as it is the most common platform RabbitMQ is deployed on.

There are several areas which can be configured or tuned. Each has a section in this guide:

  • Interfaces the node listens on for client connections
  • IP version preferences: dual stack , IPv6-only and IPv4-only
  • Ports used by clients, inter-node traffic in clusters and CLI tools
  • IPv6 support for inter-node traffic
  • TLS for client connections
  • Tuning for a large number of concurrent connections
  • High connection churn scenarios and resource exhaustion
  • TCP buffer size (affects throughput and how much memory is used per connection )
  • Hostname resolution -related topics such as reverse DNS lookups
  • The interface and port used by epmd
  • How to suspend and resume listeners to temporarily stop and resume new client connections
  • Other TCP socket settings
  • Proxy protocol support for client connections
  • Kernel TCP settings and limits (e.g. TCP keepalives and open file handle limit )
  • How to allow Erlang runtime to accept inbound connections when MacOS Application Firewall is enabled

This guide also covers a few topics closely related to networking:

Except for OS kernel parameters and DNS, all RabbitMQ settings are configured via RabbitMQ configuration file(s) .

Networking is a broad topic. There are many configuration options that can have positive or negative effect on certain workloads. As such, this guide does not try to be a complete reference but rather offer an index of key tunable parameters and serve as a starting point.

In addition, this guide touches on a few topics closely related to networking, such as

  • Hostnames, hostname resolution and DNS
  • connection lifecycle logging
  • Heartbeats (a.k.a. keepalives)
  • proxies and load balancers

VMware RabbitMQ provides an Intra-cluster Compression feature.

A methodology for troubleshooting of networking-related issues is covered in a separate guide.

Network Interfaces for Client Connections ​

For RabbitMQ to accept client connections, it needs to bind to one or more interfaces and listen on (protocol-specific) ports. One such interface/port pair is called a listener in RabbitMQ parlance. Listeners are configured using the listeners.tcp.* configuration option(s).

TCP listeners configure both an interface and port. The following example demonstrates how to configure AMQP 0-9-1 and AMQP 1.0 listener to use a specific IP and the standard port:

By default, RabbitMQ will listen on port 5672 on all available interfaces . It is possible to limit client connections to a subset of the interfaces or even just one, for example, IPv6-only interfaces. The following few sections demonstrate how to do it.

Listening on Dual Stack (Both IPv4 and IPv6) Interfaces ​

The following example demonstrates how to configure RabbitMQ to listen on localhost only for both IPv4 and IPv6:

With modern Linux kernels and Windows releases, when a port is specified and RabbitMQ is configured to listen on all IPv6 addresses but IPv4 is not deactivated explicitly, IPv4 address will be included, so

is equivalent to

Listening on IPv6 Interfaces Only ​

In this example RabbitMQ will listen on an IPv6 interface only:

In IPv6-only environments the node must also be configured to use IPv6 for inter-node communication and CLI tool connections .

Listening on IPv4 Interfaces Only ​

In this example RabbitMQ will listen on an IPv4 interface with specified IP address only:

It is possible to deactivate non-TLS connections by deactivating all regular TCP listeners. Only TLS-enabled clients will be able to connect:

Port Access ​

RabbitMQ nodes bind to ports (open server TCP sockets) in order to accept client and CLI tool connections. Other processes and tools such as SELinux may prevent RabbitMQ from binding to a port. When that happens, the node will fail to start.

CLI tools, client libraries and RabbitMQ nodes also open connections (client TCP sockets). Firewalls can prevent nodes and CLI tools from communicating with each other. Make sure the following ports are accessible:

  • 4369: epmd , a peer discovery service used by RabbitMQ nodes and CLI tools
  • 5672, 5671: used by AMQP 0-9-1 and AMQP 1.0 clients without and with TLS
  • 5552, 5551: used by the RabbitMQ Stream protocol clients without and with TLS
  • 6000 through 6500: used for stream replication
  • 25672: used for inter-node and CLI tools communication (Erlang distribution server port) and is allocated from a dynamic range (limited to a single port by default, computed as AMQP port + 20000). Unless external connections on these ports are really necessary (e.g. the cluster uses federation or CLI tools are used on machines outside the subnet), these ports should not be publicly exposed. See networking guide for details.
  • 35672-35682: used by CLI tools (Erlang distribution client ports) for communication with nodes and is allocated from a dynamic range (computed as server distribution port + 10000 through server distribution port + 10010). See networking guide for details.
  • 15672, 15671: HTTP API clients, management UI and rabbitmqadmin , without and with TLS (only if the management plugin is enabled)
  • 61613, 61614: STOMP clients without and with TLS (only if the STOMP plugin is enabled)
  • 1883, 8883: MQTT clients without and with TLS, if the MQTT plugin is enabled
  • 15674: STOMP-over-WebSockets clients (only if the Web STOMP plugin is enabled)
  • 15675: MQTT-over-WebSockets clients (only if the Web MQTT plugin is enabled)
  • 15692, 15691: Prometheus metrics, without and with TLS (only if the Prometheus plugin is enabled)

It is possible to configure RabbitMQ to use different ports and specific network interfaces .

How to Temporarily Stop New Client Connections ​

Starting with RabbitMQ 3.8.8 , client connection listeners can be suspended to prevent new client connections from being accepted. Existing connections will not be affected in any way.

This can be useful during node operations and is one of the steps performed when a node is put into maintenance mode .

To suspend all listeners on a node and prevent new client connections to it, use rabbitmqctl suspend_listeners :

As all other CLI commands, this command can be invoked against an arbitrary node (including remote ones) using the -n switch:

To resume all listeners on a node and make it accept new client connections again, use rabbitmqctl resume_listeners :

Both operations will leave log entries in the node's log.

EPMD and Inter-node Communication ​

What is epmd and how is it used ​.

epmd (for Erlang Port Mapping Daemon) is a small additional daemon that runs alongside every RabbitMQ node and is used by the runtime to discover what port a particular node listens on for inter-node communication. The port is then used by peer nodes and CLI tools .

When a node or CLI tool needs to contact node rabbit@hostname2 it will do the following:

  • Resolve hostname2 to an IPv4 or IPv6 address using the standard OS resolver or a custom one specified in the inetrc file
  • Contact epmd running on hostname2 using the above address
  • Ask epmd for the port used by node rabbit on it
  • Connect to the node using the resolved IP address and the discovered port
  • Proceed with communication

EPMD Interface ​

epmd will listen on all interfaces by default. It can be limited to a number of interfaces using the ERL_EPMD_ADDRESS environment variable:

When ERL_EPMD_ADDRESS is changed, both RabbitMQ node and epmd on the host must be stopped. For epmd , use

to terminate it. The service will be started by the local RabbitMQ node automatically on boot.

The loopback interface will be implicitly added to that list (in other words, epmd will always bind to the loopback interface).

EPMD Port ​

The default epmd port is 4369, but this can be changed using the ERL_EPMD_PORT environment variable:

All hosts in a cluster must use the same port.

When ERL_EPMD_PORT is changed, both RabbitMQ node and epmd on the host must be stopped. For epmd , use

Inter-node Communication Port Range ​

RabbitMQ nodes will use a port from a certain range known as the inter-node communication port range. The same port is used by CLI tools when they need to contact the node. The range can be modified.

RabbitMQ nodes communicate with CLI tools and other nodes using a port known as the distribution port . It is dynamically allocated from a range of values. For RabbitMQ, the default range is limited to a single value computed as RABBITMQ_NODE_PORT (AMQP 0-9-1 and AMQP 1.0 port) + 20000, which results in using port 25672. This single port can be configured using the RABBITMQ_DIST_PORT environment variable.

RabbitMQ command line tools also use a range of ports. The default range is computed by taking the RabbitMQ distribution port value and adding 10000 to it. The next 10 ports are also part of this range. Thus, by default, this range is 35672 through 35682. This range can be configured using the RABBITMQ_CTL_DIST_PORT_MIN and RABBITMQ_CTL_DIST_PORT_MAX environment variables. Note that limiting the range to a single port will prevent more than one CLI tool from running concurrently on the same host and may affect CLI commands that require parallel connections to multiple cluster nodes. A port range of 10 is therefore a recommended value.

When configuring firewall rules it is highly recommended to allow remote connections on the inter-node communication port from every cluster member and every host where CLI tools might be used. epmd port must be open for CLI tools and clustering to function.

On Windows, the following settings have no effect when RabbitMQ runs as a service. Please see Windows Quirks for details.

The range used by RabbitMQ can also be controlled via two configuration keys:

  • kernel.inet_dist_listen_min in the classic config format only
  • kernel.inet_dist_listen_max in the classic config format only

They define the range's lower and upper bounds, inclusive.

The example below uses a range with a single port but a value different from default:

To verify what port is used by a node for inter-node and CLI tool communication, run

on that node's host. It will produce output that looks like this:

Inter-node Communication Buffer Size Limit ​

Inter-node connections use a buffer for data pending to be sent. Temporary throttling on inter-node traffic is applied when the buffer is at max allowed capacity. The limit is controlled via the RABBITMQ_DISTRIBUTION_BUFFER_SIZE environment variable in kilobytes. Default value is 128 MB ( 128000 kB).

In clusters with heavy inter-node traffic increasing this value may have a positive effect on throughput. Values lower than 64 MB are not recommended.

Using IPv6 for Inter-node Communication (and CLI Tools) ​

In addition to exclusive IPv6 use for client connections for client connections, a node can also be configured to use IPv6 exclusively for inter-node and CLI tool connectivity.

This involves configuration in a few places:

  • Inter-node communication protocol setting in the runtime
  • Configuring IPv6 to be used by CLI tools
  • epmd , a service involved in inter-node communication (discovery)

It is possible to use IPv6 for inter-node and CLI tool communication but use IPv4 for client connections or vice versa. Such configurations can be hard to troubleshoot and reason about, so using the same IP version (e.g. IPv6) across the board or a dual stack setup is recommended.

Inter-node Communication Protocol ​

To instruct the runtime to use IPv6 for inter-node communication and related tasks, use the RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS environment variable to pass a couple of flags:

RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS above uses two closely related flags:

  • -kernel inetrc to configure a path to an inetrc file that controls hostname resolution
  • -proto_dist inet6_tcp to tell the node to use IPv6 when connecting to peer nodes and listening for CLI tool connections

The erl_inetrc file at /etc/rabbitmq/erl_inetrc will control hostname resolution settings. For IPv6-only environments, it must include the following line:

CLI Tools ​

With CLI tools, use the same runtime flag as used for RabbitMQ nodes above but provide it using a different environment variable, RABBITMQ_CTL_ERL_ARGS :

Note that once instructed to use IPv6, CLI tools won't be able to connect to nodes that do not use IPv6 for inter-node communication. This involves the epmd service running on the same host as target RabbitMQ node.

epmd is a small helper daemon that runs next to a RabbitMQ node and lets its peers and CLI tools discover what port they should use to communicate to it. It can be configured to bind to a specific interface, much like RabbitMQ listeners. This is done using the ERL_EPMD_ADDRESS environment variable:

By default RabbitMQ nodes will use an IPv4 interface when connecting to epmd . Nodes that are configured to use IPv6 for inter-node communication ( see above ) will also use IPv6 to connect to epmd .

When epmd is configured to use IPv6 exclusively but RabbitMQ nodes are not, RabbitMQ will log an error message similar to this:

systemd Unit File ​

On distributions that use systemd, the epmd.socket service controls network settings of epmd . It is possible to configure epmd to only listen on IPv6 interfaces:

The service will need reloading after its unit file has been updated:

Intermediaries: Proxies and Load Balancers ​

Proxies and load balancers are fairly commonly used to distribute client connections between cluster nodes . Proxies can also be useful to make it possible for clients to access RabbitMQ nodes without exposing them publicly. Intermediaries can also have side effects on connections.

Proxy Effects ​

Proxies and load balancers introduce an extra network hop (or even multiple ones) between client and its target node. Intermediaries also can become a network contention point: their throughput will then become a limiting factor for the entire system. Network bandwidth overprovisioning and throughput monitoring for proxies and load balancers are therefore very important.

Intermediaries also may terminate "idle" TCP connections when there's no activity on them for a certain period of time. Most of the time it is not desirable. Such events will result in abrupt connection closure log messages on the server end and I/O exceptions on the client end.

When heartbeats are enabled on a connection, it results in periodic light network traffic. Therefore heartbeats have a side effect of guarding client connections that can go idle for periods of time against premature closure by proxies and load balancers.

Heartbeat timeouts from 10 to 30 seconds will produce periodic network traffic often enough (roughly every 5 to 15 seconds) to satisfy defaults of most proxy tools and load balancers. Values that are too low will produce false positives.

Proxy Protocol ​

RabbitMQ supports Proxy protocol versions 1 (text header format) and 2 (binary header format).

The protocol makes servers such as RabbitMQ aware of the actual client IP address when connections go over a proxy (e.g. HAproxy or AWS ELB ). This makes it easier for the operator to inspect connection origins in the management UI or CLI tools.

The protocol spec dictates that either it must be applied to all connections or none of them for security reasons, this feature is turned off by default and needs to be turned on for individual protocols supported by RabbitMQ. To turn it on for AMQP 0-9-1 and AMQP 1.0 clients:

When proxy protocol is turned on, clients won't be able to connect to RabbitMQ directly unless they themselves support the protocol. Therefore, when this option is turned on, all client connections must go through a proxy that also supports the protocol and is configured to send a Proxy protocol header. HAproxy and AWS ELB documentation explains how to do it.

When proxy protocol is turned on and connections go through a compatible proxy, no action or modifications are required from client libraries. The communication is entirely transparent to them.

STOMP and MQTT , as well as Web STOMP and Web MQTT have their own settings that enable support for the proxy protocol.

TLS (SSL) Support ​

It is possible to encrypt connections using TLS with RabbitMQ. Authentication using peer certificates is also possible. Please refer to the TLS/SSL guide for more information.

Tuning for Throughput ​

Tuning for throughput is a common goal. Improvements can be achieved by

  • Increasing TCP buffer sizes
  • Ensuring Nagle's algorithm is turned off
  • Turning on optional TCP features and extensions

For the latter two, see the OS-level tuning section below.

Note that tuning for throughput will involve trade-offs. For example, increasing TCP buffer sizes will increase the amount of RAM used by every connection, which can be a significant total server RAM use increase.

TCP Buffer Size ​

This is one of the key tunable parameters. Every TCP connection has buffers allocated for it. Generally speaking, the larger these buffers are, the more RAM is used per connection and better the throughput. On Linux, the OS will automatically tune TCP buffer size by default, typically settling on a value between 80 and 120 KB.

For maximum throughput, it is possible to increase buffer size using a group of config options:

  • tcp_listen_options for AMQP 0-9-1 and AMQP 1.0
  • mqtt.tcp_listen_options for MQTT
  • stomp.tcp_listen_options for STOMP

Note that increasing TCP buffer size will increase how much RAM the node uses for every client connection.

The following example sets TCP buffers for AMQP 0-9-1 connections to 192 KiB:

The same example for MQTT:

Note that setting send and receive buffer sizes to different values can be dangerous and not recommended .

Tuning for a Large Number of Connections ​

Some workloads, often referred to as "the Internet of Things", assume a large number of client connections per node, and a relatively low volume of traffic from each node. One such workload is sensor networks: there can be hundreds of thousands or millions of sensors deployed, each emitting data every several minutes. Optimising for the maximum number of concurrent clients can be more important than for total throughput.

Several factors can limit how many concurrent connections a single node can support:

  • Maximum number of open file handles (including sockets) as well as other kernel-enforced resource limits
  • Amount of RAM used by each connection
  • Amount of CPU resources used by each connection
  • Maximum number of Erlang processes the VM is configured to allow.

Open File Handle Limit ​

Most operating systems limit the number of file handles that can be opened at the same time. When an OS process (such as RabbitMQ's Erlang VM) reaches the limit, it won't be able to open any new files or accept any more TCP connections. The limit will also affect how much memory the Erlang runtime will allocate upfront. This means that the limit on some modern distributions can be too high and need lowering.

How the limit is configured varies from OS to OS and distribution to distribution, e.g. depending on whether systemd is used. For Linux, Controlling System Limits on Linux in our Debian and RPM installation guides provides. Linux kernel limit management is covered by many resources on the Web, including the open file handle limit .

With Docker, Docker daemon configuration file in the host controls the limits.

MacOS uses a similar system .

On Windows, the limit for the Erlang runtime is controlled using the ERL_MAX_PORTS environment variable.

When optimising for the number of concurrent connections, make sure your system has enough file descriptors to support not only client connections but also files the node may use. To calculate a ballpark limit, multiply the number of connections per node by 1.5. For example, to support 100,000 connections, set the limit to 150,000.

Increasing the limit slightly increases the amount of RAM idle machine uses but this is a reasonable trade-off.

Per Connection Memory Consumption: TCP Buffer Size ​

See the section above for an overview.

For maximum number of concurrent client connections, it is possible to decrease TCP buffer size using a group of config options:

Decreasing TCP buffer size will decrease how much RAM the node uses for every client connection.

This is often necessary in environments where the number of concurrent connections sustained per node is more important than throughput.

The following example sets TCP buffers for AMQP 0-9-1 connections to 32 KiB:

and for STOMP:

Note that lowering TCP buffer sizes will result in a proportional throughput drop, so an optimal value between throughput and per-connection RAM use needs to be found for every workload.

Setting send and receive buffer sizes to different values is dangerous and is not recommended. Values lower than 8 KiB are not recommended.

Reducing CPU Footprint of Stats Emission ​

A large number of concurrent connections will generate a lot of metric (stats) emission events. This increases CPU consumption even with mostly idle connections. To reduce this footprint, increase the statistics collection interval using the collect_statistics_interval key:

The default is 5 seconds (5000 milliseconds).

Increasing the interval value to 30-60s will reduce CPU footprint and peak memory consumption. This comes with a downside: with the value in the example above, metrics of said entities will refresh every 60 seconds.

This can be perfectly reasonable in an externally monitored production system but will make management UI less convenient to use for operators.

Limiting Number of Channels on a Connection ​

Channels also consume RAM. By optimising how many channels applications use, that amount can be decreased. It is possible to cap the max number of channels on a connection using the channel_max configuration setting:

Note that some libraries and tools that build on top of RabbitMQ clients may implicitly require a certain number of channels. Values above 200 are rarely necessary. Finding an optimal value is usually a matter of trial and error.

Nagle's Algorithm ("nodelay") ​

Turning off Nagle's algorithm is primarily useful for reducing latency but can also improve throughput.

kernel.inet_default_connect_options and kernel.inet_default_listen_options must include {nodelay, true} to turn off Nagle's algorithm for inter-node connections.

When configuring sockets that serve client connections, tcp_listen_options must include the same option. This is the default.

The following example demonstrates that. First, rabbitmq.conf :

which should be used together with the following bits in the advanced config file :

When using the classic config format , everything is configured in a single file:

Erlang VM I/O Thread Pool Tuning ​

Adequate Erlang VM I/O thread pool size is also important when tuning for a large number of concurrent connections. See the section above.

Connection Backlog ​

With a low number of clients, new connection rate is very unevenly distributed but is also small enough to not make much difference. When the number reaches tens of thousands or more, it is important to make sure that the server can accept inbound connections. Unaccepted TCP connections are put into a queue with bounded length. This length has to be sufficient to account for peak load hours and possible spikes, for instance, when many clients disconnect due to a network interruption or choose to reconnect. This is configured using the tcp_listen_options.backlog option:

In the classic config format :

Default value is 128. When pending connection queue length grows beyond this value, connections will be rejected by the operating system. See also net.core.somaxconn in the kernel tuning section.

Dealing with High Connection Churn ​

Why is high connection churn problematic ​.

Workloads with high connection churn (a high rate of connections being opened and closed) will require TCP setting tuning to avoid exhaustion of certain resources: max number of file handles, Erlang processes on RabbitMQ nodes, kernel's ephemeral port range (for hosts that open a lot of connections, including Federation links and Shovel connections), and others. Nodes that are exhausted of those resources won't be able to accept new connections , which will negatively affect overall system availability.

Due to a combination of certain TCP features and defaults of most modern Linux distributions, closed connections can be detected after a prolonged period of time. This is covered in the heartbeats guide . This can be one contributing factor to connection build-up. Another is the TIME_WAIT TCP connection state. The state primarily exists to make sure that retransmitted segments from closed connections won't "reappear" on a different (newer) connection with the same client host and port. Depending on the OS and TCP stack configuration connections can spend minutes in this state, which on a busy system is guaranteed to lead to a connection build-up.

See Coping with the TCP TIME_WAIT connections on busy servers for details.

TCP stack configuration can reduce peak number of connection in closing states and avoid resource exhaustion, in turn allowing nodes to accept new connections at all times.

High connection churn can also mean developer mistakes or incorrect assumptions about how the messaging protocols supported by RabbitMQ are meant to be used. All supported protocols assume long lived connections. Applications that open and almost immediately close connections unnecessarily waste resources (network bandwidth, CPU, RAM) and contribute to the problem described in this section.

Inspecting Connections and Gathering Evidence ​

If a node fails to accept connections it is important to first gather data (metrics, evidence) to determine the state of the system and the limiting factor (exhausted resource). Tools such as netstat , ss , lsof can be used to inspect TCP connections of a node. See Troubleshooting Networking for examples.

The Role of TCP Keepalives ​

While heartbeats are sufficient for detecting defunct connections, they are not going to be sufficient in high connection churn scenarios. In those cases heartbeats should be combined with TCP keepalives to speed up disconnected client detection.

Reducing Amount of Time Spent in TIME_WAIT ​

TCP stack tuning can also reduce the amount of time connections spend in the TIME_WAIT state. The net.ipv4.tcp_fin_timeout setting specifically can help here:

Note that like other settings prefixed with net.ipv4. , this one applies to both IPv4 and IPv6 connections despite the name.

If inbound connections (from clients, plugins, CLI tools and so on) do not rely on NAT, net.ipv4.tcp_tw_reuse can be set to 1 (enabled) to allow the kernel to reuse sockets in the TIME_WAIT state for outgoing connections. This setting can be applied on client hosts or intermediaries such as proxies and load balancers. Note that if NAT is used the setting is not safe and can lead to hard to track down issues.

The settings above generally should be combined with reduced TCP keepalive values, for example:

OS Level Tuning ​

Operating system settings can affect operation of RabbitMQ. Some are directly related to networking (e.g. TCP settings), others affect TCP sockets as well as other things (e.g. open file handles limit).

Understanding these limits is important, as they may change depending on the workload.

A few important configurable kernel options include (note that despite option names they are effective for both IPv4 and IPv6 connections):

Note that default values for these vary between Linux kernel releases and distributions. Using a recent kernel (3.9 or later) is recommended.

Kernel parameter tuning differs from OS to OS. This guide focuses on Linux. To configure a kernel parameter interactively, use sysctl -w (requires superuser privileges), for example:

To make the changes permanent (stick between reboots), they need to be added to /etc/sysctl.conf . See sysctl(8) and sysctl.conf(5) for more details.

TCP stack tuning is a broad topic that is covered in much detail elsewhere:

  • Enabling High Performance Data Transfers
  • Network Tuning Guide

TCP Socket Options ​

Common options ​.

Below is the default TCP socket option configuration used by RabbitMQ:

  • TCP connection backlog is limited to 128 connections
  • Nagle's algorithm is deactivated
  • Server socket lingering is enabled with the timeout of 0

Heartbeats ​

Some protocols supported by RabbitMQ, including AMQP 0-9-1, support heartbeats , a way to detect dead TCP peers quicker. Please refer to the Heartbeats guide for more information.

Net Tick Time ​

Heartbeats are used to detect peer or connection failure between clients and RabbitMQ nodes. net_ticktime serves the same purpose but for cluster node communication. Values lower than 5 (seconds) may result in false positive and are not recommended.

TCP Keepalives ​

TCP contains a mechanism similar in purpose to the heartbeat (a.k.a. keepalive) one in messaging protocols and net tick timeout covered above: TCP keepalives. Due to inadequate defaults, TCP keepalives often don't work the way they are supposed to: it takes a very long time (say, an hour or more) to detect a dead peer. However, with tuning they can serve the same purpose as heartbeats and clean up stale TCP connections e.g. with clients that opted to not use heartbeats, intentionally or not.

Below is an example sysctl configuration for TCP keepalives that considers TCP connections dead or unreachable after 70 seconds (4 attempts every 10 seconds after connection idle for 30 seconds):

TCP keepalives can be a useful additional defense mechanism in environments where RabbitMQ operator has no control over application settings or client libraries used.

Connection Handshake Timeout ​

RabbitMQ has a timeout for connection handshake, 10 seconds by default. When clients run in heavily constrained environments, it may be necessary to increase the timeout. This can be done via the rabbit.handshake_timeout (in milliseconds):

It should be pointed out that this is only necessary with very constrained clients and networks. Handshake timeouts in other circumstances indicate a problem elsewhere.

TLS (SSL) Handshake ​

If TLS/SSL is enabled, it may be necessary to increase also the TLS/SSL handshake timeout. This can be done via the rabbit.ssl_handshake_timeout (in milliseconds):

Hostname Resolution and DNS ​

In many cases, RabbitMQ relies on the Erlang runtime for inter-node communication (including tools such as rabbitmqctl , rabbitmq-plugins , etc). Client libraries also perform hostname resolution when connecting to RabbitMQ nodes. This section briefly covers most common issues associated with that.

Performed by Client Libraries ​

If a client library is configured to connect to a hostname, it performs hostname resolution. Depending on DNS and local resolver ( /etc/hosts and similar) configuration, this can take some time. Incorrect configuration may lead to resolution timeouts, e.g. when trying to resolve a local hostname such as my-dev-machine , over DNS. As a result, client connections can take a long time (from tens of seconds to a few minutes).

Short and Fully-qualified RabbitMQ Node Names ​

RabbitMQ relies on the Erlang runtime for inter-node communication. Erlang nodes include a hostname, either short ( rmq1 ) or fully-qualified ( rmq1.dev.megacorp.local ). Mixing short and fully-qualified hostnames is not allowed by the runtime. Every node in a cluster must be able to resolve every other node's hostname, short or fully-qualified.

By default RabbitMQ will use short hostnames. Set the RABBITMQ_USE_LONGNAME environment variable to make RabbitMQ nodes use fully-qualified names, e.g. rmq1.dev.megacorp.local .

Reverse DNS Lookups ​

If the reverse_dns_lookups configuration option is set to true , RabbitMQ will complete reverse DNS lookups for client IP addresses and list hostnames in connection information (e.g. in the Management UI ).

Reverse DNS lookups can potentially take a long time if node's hostname resolution is not optimally configured. This can increase latency when accepting client connections.

To explicitly activate or turn on reverse DNS lookups:

To deactivate reverse DNS lookups:

Verify Hostname Resolution ​

Since hostname resolution is a prerequisite for successful inter-node communication , starting with RabbitMQ 3.8.6 , CLI tools provide two commands that help verify that hostname resolution on a node works as expected. The commands are not meant to replace dig and other specialised DNS tools but rather provide a way to perform most basic checks while taking Erlang runtime hostname resolver features into account.

The first command is rabbitmq-diagnostics resolve_hostname :

The second one is rabbitmq-diagnostics resolver_info :

It will report key resolver settings such as the lookup order (whether CLI tools should prefer the OS resolver, inetrc file, and so on) as well as inetrc hostname entries, if any:

Connection Event Logging ​

See Connection Lifecycle Events in the logging guide.

Troubleshooting Network Connectivity ​

Macos application firewall ​.

On MacOS systems with Application Firewall enabled, Erlang runtime processes must be allowed to bind to ports and accept connections. Without this, RabbitMQ nodes won't be able to bind to their ports and will fail to start.

A list of blocked applications can be seen under Security and Privacy => Firewall in system settings.

To "unblock" a command line tool, use sudo /usr/libexec/ApplicationFirewall/socketfilterfw . The examples below assume that Erlang is installed under /usr/local/Cellar/erlang/{version} , used by the Homebrew Erlang formula:

Note that socketfilterfw command line arguments can vary between MacOS releases. To see supports command line arguments, use

  • Listening on Dual Stack (Both IPv4 and IPv6) Interfaces
  • Listening on IPv6 Interfaces Only
  • Listening on IPv4 Interfaces Only
  • Port Access
  • How to Temporarily Stop New Client Connections
  • What is EPMD and How is It Used?
  • EPMD Interface
  • Inter-node Communication Port Range
  • Inter-node Communication Buffer Size Limit
  • Inter-node Communication Protocol
  • Proxy Effects
  • Proxy Protocol
  • TLS (SSL) Support
  • TCP Buffer Size
  • Open File Handle Limit
  • Per Connection Memory Consumption: TCP Buffer Size
  • Reducing CPU Footprint of Stats Emission
  • Limiting Number of Channels on a Connection
  • Nagle's Algorithm ("nodelay")
  • Erlang VM I/O Thread Pool Tuning
  • Connection Backlog
  • Why is High Connection Churn Problematic?
  • Inspecting Connections and Gathering Evidence
  • The Role of TCP Keepalives
  • Reducing Amount of Time Spent in TIME_WAIT
  • OS Level Tuning
  • Common Options
  • Net Tick Time
  • TCP Keepalives
  • TLS (SSL) Handshake
  • Performed by Client Libraries
  • Short and Fully-qualified RabbitMQ Node Names
  • Reverse DNS Lookups
  • Verify Hostname Resolution
  • Connection Event Logging
  • Troubleshooting Network Connectivity
  • MacOS Application Firewall

docker run (docker container run)

Create and run a new container from an image

The following commands are equivalent and redirect here:

  • docker container run

Description

The docker run command runs a command in a new container, pulling the image if needed and starting the container.

You can restart a stopped container with all its previous changes intact using docker start . Use docker ps -a to view a list of all containers, including those that are stopped.

Assign name (--name)

The --name flag lets you specify a custom identifier for a container. The following example runs a container named test using the nginx:alpine image in detached mode .

You can reference the container by name with other commands. For example, the following commands stop and remove a container named test :

If you don't specify a custom name using the --name flag, the daemon assigns a randomly generated name, such as vibrant_cannon , to the container. Using a custom-defined name provides the benefit of having an easy-to-remember ID for a container.

Moreover, if you connect the container to a user-defined bridge network, other containers on the same network can refer to the container by name via DNS.

Capture container ID (--cidfile)

To help with automation, you can have Docker write the container ID out to a file of your choosing. This is similar to how some programs might write out their process ID to a file (you might've seen them as PID files):

This creates a container and prints test to the console. The cidfile flag makes Docker attempt to create a new file and write the container ID to it. If the file exists already, Docker returns an error. Docker closes this file when docker run exits.

PID settings (--pid)

By default, all containers have the PID namespace enabled.

PID namespace provides separation of processes. The PID Namespace removes the view of the system processes, and allows process ids to be reused including PID 1.

In certain cases you want your container to share the host's process namespace, allowing processes within the container to see all of the processes on the system. For example, you could build a container with debugging tools like strace or gdb , but want to use these tools when debugging processes within the container.

Example: run htop inside a container

To run htop in a container that shares the process namespac of the host:

Run an alpine container with the --pid=host option:

Install htop in the container:

Invoke the htop command.

Example, join another container's PID namespace

Joining another container's PID namespace can be useful for debugging that container.

Start a container running a Redis server:

Run an Alpine container that attaches the --pid namespace to the my-nginx container:

Install strace in the Alpine container:

Attach to process 1, the process ID of the my-nginx container:

UTS settings (--uts)

The UTS namespace is for setting the hostname and the domain that's visible to running processes in that namespace. By default, all containers, including those with --network=host , have their own UTS namespace. Setting --uts to host results in the container using the same UTS namespace as the host.

Note Docker disallows combining the --hostname and --domainname flags with --uts=host . This is to prevent containers running in the host's UTS namespace from attempting to change the hosts' configuration.

You may wish to share the UTS namespace with the host if you would like the hostname of the container to change as the hostname of the host changes. A more advanced use case would be changing the host's hostname from a container.

IPC settings (--ipc)

The --ipc flag accepts the following values:

If not specified, daemon default is used, which can either be "private" or "shareable" , depending on the daemon version and configuration.

System V interprocess communication (IPC) namespaces provide separation of named shared memory segments, semaphores and message queues.

Shared memory segments are used to accelerate inter-process communication at memory speed, rather than through pipes or through the network stack. Shared memory is commonly used by databases and custom-built (typically C/OpenMPI, C++/using boost libraries) high performance applications for scientific computing and financial services industries. If these types of applications are broken into multiple containers, you might need to share the IPC mechanisms of the containers, using "shareable" mode for the main (i.e. "donor") container, and "container:<donor-name-or-ID>" for other containers.

Full container capabilities (--privileged)

The following example doesn't work, because by default, Docker drops most potentially dangerous kernel capabilities, including CAP_SYS_ADMIN (which is required to mount filesystems).

It works when you add the --privileged flag:

The --privileged flag gives all capabilities to the container, and it also lifts all the limitations enforced by the device cgroup controller. In other words, the container can then do almost everything that the host can do. This flag exists to allow special use-cases, like running Docker within Docker.

Set working directory (-w, --workdir)

The -w option runs the command executed inside the directory specified, in this example, /path/to/dir/ . If the path doesn't exist, Docker creates it inside the container.

Set storage driver options per container (--storage-opt)

This (size) constraints the container filesystem size to 120G at creation time. This option is only available for the btrfs , overlay2 , windowsfilter , and zfs storage drivers.

For the overlay2 storage driver, the size option is only available if the backing filesystem is xfs and mounted with the pquota mount option. Under these conditions, you can pass any size less than the backing filesystem size.

For the windowsfilter , btrfs , and zfs storage drivers, you cannot pass a size less than the Default BaseFS Size.

Mount tmpfs (--tmpfs)

The --tmpfs flag lets you create a tmpfs mount.

The options that you can pass to --tmpfs are identical to the Linux mount -t tmpfs -o command. The following example mounts an empty tmpfs into the container with the rw , noexec , nosuid , size=65536k options.

For more information, see tmpfs mounts .

Mount volume (-v)

The example above mounts the current directory into the container at the same path using the -v flag, sets it as the working directory, and then runs the pwd command inside the container.

As of Docker Engine version 23, you can use relative paths on the host.

The example above mounts the content directory in the current directory into the container at the /content path using the -v flag, sets it as the working directory, and then runs the pwd command inside the container.

When the host directory of a bind-mounted volume doesn't exist, Docker automatically creates this directory on the host for you. In the example above, Docker creates the /doesnt/exist folder before starting your container.

Mount volume read-only (--read-only)

You can use volumes in combination with the --read-only flag to control where a container writes files. The --read-only flag mounts the container's root filesystem as read only prohibiting writes to locations other than the specified volumes for the container.

By bind-mounting the Docker Unix socket and statically linked Docker binary (refer to get the Linux binary ), you give the container the full access to create and manipulate the host's Docker daemon.

On Windows, you must specify the paths using Windows-style path semantics.

The following examples fails when using Windows-based containers, as the destination of a volume or bind mount inside the container must be one of: a non-existing or empty directory; or a drive other than C: . Further, the source of a bind mount must be a local directory, not a file.

For in-depth information about volumes, refer to manage data in containers

Add bind mounts or volumes using the --mount flag

The --mount flag allows you to mount volumes, host-directories, and tmpfs mounts in a container.

The --mount flag supports most options supported by the -v or the --volume flag, but uses a different syntax. For in-depth information on the --mount flag, and a comparison between --volume and --mount , refer to Bind mounts .

Even though there is no plan to deprecate --volume , usage of --mount is recommended.

Publish or expose port (-p, --expose)

This binds port 8080 of the container to TCP port 80 on 127.0.0.1 of the host. You can also specify udp and sctp ports. The Networking overview page explains in detail how to publish ports with Docker.

Note If you don't specify an IP address (i.e., -p 80:80 instead of -p 127.0.0.1:80:80 ) when publishing a container's ports, Docker publishes the port on all interfaces (address 0.0.0.0 ) by default. These ports are externally accessible. This also applies if you configured UFW to block this specific port, as Docker manages its own iptables rules. Read more

This exposes port 80 of the container without publishing the port to the host system's interfaces.

Publish all exposed ports (-P, --publish-all)

The -P , or --publish-all , flag publishes all the exposed ports to the host. Docker binds each exposed port to a random port on the host.

The -P flag only publishes port numbers that are explicitly flagged as exposed, either using the Dockerfile EXPOSE instruction or the --expose flag for the docker run command.

The range of ports are within an ephemeral port range defined by /proc/sys/net/ipv4/ip_local_port_range . Use the -p flag to explicitly map a single port or range of ports.

Set the pull policy (--pull)

Use the --pull flag to set the image pull policy when creating (and running) the container.

The --pull flag can take one of these values:

When creating (and running) a container from an image, the daemon checks if the image exists in the local image cache. If the image is missing, an error is returned to the CLI, allowing it to initiate a pull.

The default ( missing ) is to only pull the image if it's not present in the daemon's image cache. This default allows you to run images that only exist locally (for example, images you built from a Dockerfile, but that have not been pushed to a registry), and reduces networking.

The always option always initiates a pull before creating the container. This option makes sure the image is up-to-date, and prevents you from using outdated images, but may not be suitable in situations where you want to test a locally built image before pushing (as pulling the image overwrites the existing image in the image cache).

The never option disables (implicit) pulling images when creating containers, and only uses images that are available in the image cache. If the specified image is not found, an error is produced, and the container is not created. This option is useful in situations where networking is not available, or to prevent images from being pulled implicitly when creating containers.

The following example shows docker run with the --pull=never option set, which produces en error as the image is missing in the image-cache:

Set environment variables (-e, --env, --env-file)

Use the -e , --env , and --env-file flags to set simple (non-array) environment variables in the container you're running, or overwrite variables defined in the Dockerfile of the image you're running.

You can define the variable and its value when running the container:

You can also use variables exported to your local environment:

When running the command, the Docker CLI client checks the value the variable has in your local environment and passes it to the container. If no = is provided and that variable isn't exported in your local environment, the variable is unset in the container.

You can also load the environment variables from a file. This file should use the syntax <variable>=value (which sets the variable to the given value) or <variable> (which takes the value from the local environment), and # for comments. Lines beginning with # are treated as line comments and are ignored, whereas a # appearing anywhere else in a line is treated as part of the variable value.

Set metadata on container (-l, --label, --label-file)

A label is a key=value pair that applies metadata to a container. To label a container with two labels:

The my-label key doesn't specify a value so the label defaults to an empty string ( "" ). To add multiple labels, repeat the label flag ( -l or --label ).

The key=value must be unique to avoid overwriting the label value. If you specify labels with identical keys but different values, each subsequent value overwrites the previous. Docker uses the last key=value you supply.

Use the --label-file flag to load multiple labels from a file. Delimit each label in the file with an EOL mark. The example below loads labels from a labels file in the current directory:

The label-file format is similar to the format for loading environment variables. (Unlike environment variables, labels are not visible to processes running inside a container.) The following example shows a label-file format:

You can load multiple label-files by supplying multiple --label-file flags.

For additional information on working with labels, see Labels .

Connect a container to a network (--network)

To start a container and connect it to a network, use the --network option.

The following commands create a network named my-net and adds a busybox container to the my-net network.

You can also choose the IP addresses for the container with --ip and --ip6 flags when you start the container on a user-defined network. To assign a static IP to containers, you must specify subnet block for the network.

If you want to add a running container to a network use the docker network connect subcommand.

You can connect multiple containers to the same network. Once connected, the containers can communicate using only another container's IP address or name. For overlay networks or custom plugins that support multi-host connectivity, containers connected to the same multi-host network but launched from different Engines can also communicate in this way.

Note The default bridge network only allow containers to communicate with each other using internal IP addresses. User-created bridge networks provide DNS resolution between containers using container names.

You can disconnect a container from a network using the docker network disconnect command.

For more information on connecting a container to a network when using the run command, see the " Docker network overview " .

Mount volumes from container (--volumes-from)

The --volumes-from flag mounts all the defined volumes from the referenced containers. You can specify more than one container by repetitions of the --volumes-from argument. The container ID may be optionally suffixed with :ro or :rw to mount the volumes in read-only or read-write mode, respectively. By default, Docker mounts the volumes in the same mode (read write or read only) as the reference container.

Labeling systems like SELinux require placing proper labels on volume content mounted into a container. Without a label, the security system might prevent the processes running inside the container from using the content. By default, Docker does not change the labels set by the OS.

To change the label in the container context, you can add either of two suffixes :z or :Z to the volume mount. These suffixes tell Docker to relabel file objects on the shared volumes. The z option tells Docker that two containers share the volume content. As a result, Docker labels the content with a shared content label. Shared volume labels allow all containers to read/write content. The Z option tells Docker to label the content with a private unshared label. Only the current container can use a private volume.

Detached mode (-d, --detach)

The --detach (or -d ) flag starts a container as a background process that doesn't occupy your terminal window. By design, containers started in detached mode exit when the root process used to run the container exits, unless you also specify the --rm option. If you use -d with --rm , the container is removed when it exits or when the daemon exits, whichever happens first.

Don't pass a service x start command to a detached container. For example, this command attempts to start the nginx service.

This succeeds in starting the nginx service inside the container. However, it fails the detached container paradigm in that, the root process ( service nginx start ) returns and the detached container stops as designed. As a result, the nginx service starts but can't be used. Instead, to start a process such as the nginx web server do the following:

To do input/output with a detached container use network connections or shared volumes. These are required because the container is no longer listening to the command line where docker run was run.

Override the detach sequence (--detach-keys)

Use the --detach-keys option to override the Docker key sequence for detach. This is useful if the Docker default sequence conflicts with key sequence you use for other applications. There are two ways to define your own detach key sequence, as a per-container override or as a configuration property on your entire configuration.

To override the sequence for an individual container, use the --detach-keys="<sequence>" flag with the docker attach command. The format of the <sequence> is either a letter [a-Z], or the ctrl- combined with any of the following:

  • a-z (a single lowercase alpha character )
  • @ (at sign)
  • [ (left bracket)
  • \\ (two backward slashes)
  • _ (underscore)

These a , ctrl-a , X , or ctrl-\\ values are all examples of valid key sequences. To configure a different configuration default key sequence for all containers, see Configuration file section .

Add host device to container (--device)

It's often necessary to directly expose devices to a container. The --device option enables that. For example, adding a specific block storage device or loop device or audio device to an otherwise unprivileged container (without the --privileged flag) and have the application directly access it.

By default, the container is able to read , write and mknod these devices. This can be overridden using a third :rwm set of options to each --device flag. If the container is running in privileged mode, then Docker ignores the specified permissions.

Note The --device option cannot be safely used with ephemeral devices. You shouldn't add block devices that may be removed to untrusted containers with --device .

For Windows, the format of the string passed to the --device option is in the form of --device=<IdType>/<Id> . Beginning with Windows Server 2019 and Windows 10 October 2018 Update, Windows only supports an IdType of class and the Id as a device interface class GUID . Refer to the table defined in the Windows container docs for a list of container-supported device interface class GUIDs.

If you specify this option for a process-isolated Windows container, Docker makes all devices that implement the requested device interface class GUID available in the container. For example, the command below makes all COM ports on the host visible in the container.

Note The --device option is only supported on process-isolated Windows containers, and produces an error if the container isolation is hyperv .

CDI devices

Note This is experimental feature and as such doesn't represent a stable API.

Container Device Interface (CDI) is a standardized mechanism for container runtimes to create containers which are able to interact with third party devices.

With CDI, device configurations are defined using a JSON file. In addition to enabling the container to interact with the device node, it also lets you specify additional configuration for the device, such as kernel modules, host libraries, and environment variables.

You can reference a CDI device with the --device flag using the fully-qualified name of the device, as shown in the following example:

This starts an ubuntu container with access to the specified CDI device, vendor.com/class=device-name , assuming that:

  • A valid CDI specification (JSON file) for the requested device is available on the system running the daemon, in one of the configured CDI specification directories.
  • The CDI feature has been enabled on the daemon side, see Enable CDI devices .

Attach to STDIN/STDOUT/STDERR (-a, --attach)

The --attach (or -a ) flag tells docker run to bind to the container's STDIN , STDOUT or STDERR . This makes it possible to manipulate the output and input as needed. You can specify to which of the three standard streams ( STDIN , STDOUT , STDERR ) you'd like to connect instead, as in:

The following example pipes data into a container and prints the container's ID by attaching only to the container's STDIN .

The following example doesn't print anything to the console unless there's an error because output is only attached to the STDERR of the container. The container's logs still store what's written to STDERR and STDOUT .

The following example shows a way of using --attach to pipe a file into a container. The command prints the container's ID after the build completes and you can retrieve the build logs using docker logs . This is useful if you need to pipe a file or something else into a container and retrieve the container's ID once the container has finished running.

Note A process running as PID 1 inside a container is treated specially by Linux: it ignores any signal with the default action. So, the process doesn't terminate on SIGINT or SIGTERM unless it's coded to do so.

See also the docker cp command .

Keep STDIN open (-i, --interactive)

The --interactive (or -i ) flag keeps the container's STDIN open, and lets you send input to the container through standard input.

The -i flag is most often used together with the --tty flag to bind the I/O streams of the container to a pseudo terminal, creating an interactive terminal session for the container. See Allocate a pseudo-TTY for more examples.

Using the -i flag on its own allows for composition, such as piping input to containers:

Specify an init process

You can use the --init flag to indicate that an init process should be used as the PID 1 in the container. Specifying an init process ensures the usual responsibilities of an init system, such as reaping zombie processes, are performed inside the created container.

The default init process used is the first docker-init executable found in the system path of the Docker daemon process. This docker-init binary, included in the default installation, is backed by tini .

Allocate a pseudo-TTY (-t, --tty)

The --tty (or -t ) flag attaches a pseudo-TTY to the container, connecting your terminal to the I/O streams of the container. Allocating a pseudo-TTY to the container means that you get access to input and output feature that TTY devices provide.

For example, the following command runs the passwd command in a debian container, to set a new password for the root user.

If you run this command with only the -i flag (which lets you send text to STDIN of the container), the passwd prompt displays the password in plain text. However, if you try the same thing but also adding the -t flag, the password is hidden:

This is because passwd can suppress the output of characters to the terminal using the echo-off TTY feature.

You can use the -t flag without -i flag. This still allocates a pseudo-TTY to the container, but with no way of writing to STDIN . The only time this might be useful is if the output of the container requires a TTY environment.

Specify custom cgroups

Using the --cgroup-parent flag, you can pass a specific cgroup to run a container in. This allows you to create and manage cgroups on their own. You can define custom resources for those cgroups and put containers under a common parent group.

Using dynamically created devices (--device-cgroup-rule)

Docker assigns devices available to a container at creation time. The assigned devices are added to the cgroup.allow file and created into the container when it runs. This poses a problem when you need to add a new device to running container.

One solution is to add a more permissive rule to a container allowing it access to a wider range of devices. For example, supposing the container needs access to a character device with major 42 and any number of minor numbers (added as new devices appear), add the following rule:

Then, a user could ask udev to execute a script that would docker exec my-container mknod newDevX c 42 <minor> the required device when it is added.

Note : You still need to explicitly add initially present devices to the docker run / docker create command.

Access an NVIDIA GPU

The --gpus flag allows you to access NVIDIA GPU resources. First you need to install the nvidia-container-runtime .

Note You can also specify a GPU as a CDI device with the --device flag, see CDI devices .

Read Specify a container's resources for more information.

To use --gpus , specify which GPUs (or all) to use. If you provide no value, Docker uses all available GPUs. The example below exposes all available GPUs.

Use the device option to specify GPUs. The example below exposes a specific GPU.

The example below exposes the first and third GPUs.

Restart policies (--restart)

Use the --restart flag to specify a container's restart policy . A restart policy controls whether the Docker daemon restarts a container after exit. Docker supports the following restart policies:

This runs the redis container with a restart policy of always . If the container exits, Docker restarts it.

When a restart policy is active on a container, it shows as either Up or Restarting in docker ps . It can also be useful to use docker events to see the restart policy in effect.

An increasing delay (double the previous delay, starting at 100 milliseconds) is added before each restart to prevent flooding the server. This means the daemon waits for 100 ms, then 200 ms, 400, 800, 1600, and so on until either the on-failure limit, the maximum delay of 1 minute is hit, or when you docker stop or docker rm -f the container.

If a container is successfully restarted (the container is started and runs for at least 10 seconds), the delay is reset to its default value of 100 ms.

Specify a limit for restart attempts

You can specify the maximum amount of times Docker attempts to restart the container when using the on-failure policy. By default, Docker never stops attempting to restart the container.

The following example runs the redis container with a restart policy of on-failure and a maximum restart count of 10.

If the redis container exits with a non-zero exit status more than 10 times in a row, Docker stops trying to restart the container. Providing a maximum restart limit is only valid for the on-failure policy.

Inspect container restarts

The number of (attempted) restarts for a container can be obtained using the docker inspect command. For example, to get the number of restarts for container "my-container";

Or, to get the last time the container was (re)started;

Combining --restart (restart policy) with the --rm (clean up) flag results in an error. On container restart, attached clients are disconnected.

Clean up (--rm)

By default, a container's file system persists even after the container exits. This makes debugging a lot easier, since you can inspect the container's final state and you retain all your data.

If you are running short-term foreground processes, these container file systems can start to pile up. If you'd like Docker to automatically clean up the container and remove the file system when the container exits, use the --rm flag:

Note If you set the --rm flag, Docker also removes the anonymous volumes associated with the container when the container is removed. This is similar to running docker rm -v my-container . Only volumes that are specified without a name are removed. For example, when running the following command, volume /foo is removed, but not /bar : copying = false, 2000);"> $ docker run --rm -v /foo -v awesome:/bar busybox top Volumes inherited via --volumes-from are removed with the same logic: if the original volume was specified with a name it isn't removed.

Add entries to container hosts file (--add-host)

You can add other hosts into a container's /etc/hosts file by using one or more --add-host flags. This example adds a static address for a host named my-hostname :

You can wrap an IPv6 address in square brackets:

The --add-host flag supports a special host-gateway value that resolves to the internal IP address of the host. This is useful when you want containers to connect to services running on the host machine.

It's conventional to use host.docker.internal as the hostname referring to host-gateway . Docker Desktop automatically resolves this hostname, see Explore networking features .

The following example shows how the special host-gateway value works. The example runs an HTTP server that serves a file from host to container over the host.docker.internal hostname, which resolves to the host's internal IP.

The --add-host flag also accepts a : separator, for example:

Logging drivers (--log-driver)

The container can have a different logging driver than the Docker daemon. Use the --log-driver=<DRIVER> with the docker run command to configure the container's logging driver.

To learn about the supported logging drivers and how to use them, refer to Configure logging drivers .

To disable logging for a container, set the --log-driver flag to none :

Set ulimits in container (--ulimit)

Since setting ulimit settings in a container requires extra privileges not available in the default container, you can set these using the --ulimit flag. Specify --ulimit with a soft and hard limit in the format <type>=<soft limit>[:<hard limit>] . For example:

Note If you don't provide a hard limit value, Docker uses the soft limit value for both values. If you don't provide any values, they are inherited from the default ulimits set on the daemon.
Note The as option is deprecated. In other words, the following script is not supported: copying = false, 2000);"> $ docker run -it --ulimit as = 1024 fedora /bin/bash

Docker sends the values to the appropriate OS syscall and doesn't perform any byte conversion. Take this into account when setting the values.

For nproc usage

Be careful setting nproc with the ulimit flag as Linux uses nproc to set the maximum number of processes available to a user, not to a container. For example, start four containers with daemon user:

The 4th container fails and reports a "[8] System error: resource temporarily unavailable" error. This fails because the caller set nproc=3 resulting in the first three containers using up the three processes quota set for the daemon user.

Stop container with signal (--stop-signal)

The --stop-signal flag sends the system call signal to the container to exit. This signal can be a signal name in the format SIG<NAME> , for instance SIGKILL , or an unsigned number that matches a position in the kernel's syscall table, for instance 9 .

The default value is defined by STOPSIGNAL in the image, or SIGTERM if the image has no STOPSIGNAL defined.

Optional security options (--security-opt)

The --security-opt flag lets you override the default labeling scheme for a container. Specifying the level in the following command allows you to share the same content between containers.

Note Automatic translation of MLS labels isn't supported.

To disable the security labeling for a container entirely, you can use label=disable :

If you want a tighter security policy on the processes within a container, you can specify a custom type label. The following example runs a container that's only allowed to listen on Apache ports:

Note You would have to write policy defining a svirt_apache_t type.

To prevent your container processes from gaining additional privileges, you can use the following command:

This means that commands that raise privileges such as su or sudo no longer work. It also causes any seccomp filters to be applied later, after privileges have been dropped which may mean you can have a more restrictive set of filters. For more details, see the kernel documentation .

On Windows, you can use the --security-opt flag to specify the credentialspec option. The credentialspec must be in the format file://spec.txt or registry://keyname .

Stop container with timeout (--stop-timeout)

The --stop-timeout flag sets the number of seconds to wait for the container to stop after sending the pre-defined (see --stop-signal ) system call signal. If the container does not exit after the timeout elapses, it's forcibly killed with a SIGKILL signal.

If you set --stop-timeout to -1 , no timeout is applied, and the daemon waits indefinitely for the container to exit.

The Daemon determines the default, and is 10 seconds for Linux containers, and 30 seconds for Windows containers.

Specify isolation technology for container (--isolation)

This option is useful in situations where you are running Docker containers on Windows. The --isolation=<value> option sets a container's isolation technology. On Linux, the only supported is the default option which uses Linux namespaces. These two commands are equivalent on Linux:

On Windows, --isolation can take one of these values:

The default isolation on Windows server operating systems is process , and hyperv on Windows client operating systems, such as Windows 10. Process isolation has better performance, but requires that the image and host use the same kernel version.

On Windows server, assuming the default configuration, these commands are equivalent and result in process isolation:

If you have set the --exec-opt isolation=hyperv option on the Docker daemon , or are running against a Windows client-based daemon, these commands are equivalent and result in hyperv isolation:

Specify hard limits on memory available to containers (-m, --memory)

These parameters always set an upper limit on the memory available to the container. Linux sets this on the cgroup and applications in a container can query it at /sys/fs/cgroup/memory/memory.limit_in_bytes .

On Windows, this affects containers differently depending on what type of isolation you use.

With process isolation, Windows reports the full memory of the host system, not the limit to applications running inside the container

With hyperv isolation, Windows creates a utility VM that is big enough to hold the memory limit, plus the minimal OS needed to host the container. That size is reported as "Total Physical Memory."

Configure namespaced kernel parameters (sysctls) at runtime (--sysctl)

The --sysctl sets namespaced kernel parameters (sysctls) in the container. For example, to turn on IP forwarding in the containers network namespace, run this command:

Note Not all sysctls are namespaced. Docker does not support changing sysctls inside of a container that also modify the host system. As the kernel evolves we expect to see more sysctls become namespaced.

Currently supported sysctls

IPC Namespace:

  • kernel.msgmax , kernel.msgmnb , kernel.msgmni , kernel.sem , kernel.shmall , kernel.shmmax , kernel.shmmni , kernel.shm_rmid_forced .
  • Sysctls beginning with fs.mqueue.*
  • If you use the --ipc=host option these sysctls are not allowed.

Network Namespace:

  • Sysctls beginning with net.*
  • If you use the --network=host option using these sysctls are not allowed.
  • Pre-Markets
  • U.S. Markets
  • Cryptocurrency
  • Futures & Commodities
  • Funds & ETFs
  • Health & Science
  • Real Estate
  • Transportation
  • Industrials

Small Business

Personal Finance

  • Financial Advisors
  • Options Action
  • Buffett Archive
  • Trader Talk
  • Cybersecurity
  • Social Media
  • CNBC Disruptor 50
  • White House
  • Equity and Opportunity
  • Business Day Shows
  • Entertainment Shows
  • Full Episodes
  • Latest Video
  • CEO Interviews
  • CNBC Documentaries
  • CNBC Podcasts
  • Digital Originals
  • Live TV Schedule
  • Trust Portfolio
  • Trade Alerts
  • Meeting Videos
  • Homestretch
  • Jim's Columns
  • Stock Screener
  • Market Forecast
  • Options Investing
  • Chart Investing

Credit Cards

Credit Monitoring

Help for Low Credit Scores

All Credit Cards

Find the Credit Card for You

Best Credit Cards

Best Rewards Credit Cards

Best Travel Credit Cards

Best 0% APR Credit Cards

Best Balance Transfer Credit Cards

Best Cash Back Credit Cards

Best Credit Card Welcome Bonuses

Best Credit Cards to Build Credit

Find the Best Personal Loan for You

Best Personal Loans

Best Debt Consolidation Loans

Best Loans to Refinance Credit Card Debt

Best Loans with Fast Funding

Best Small Personal Loans

Best Large Personal Loans

Best Personal Loans to Apply Online

Best Student Loan Refinance

All Banking

Find the Savings Account for You

Best High Yield Savings Accounts

Best Big Bank Savings Accounts

Best Big Bank Checking Accounts

Best No Fee Checking Accounts

No Overdraft Fee Checking Accounts

Best Checking Account Bonuses

Best Money Market Accounts

Best Credit Unions

All Mortgages

Best Mortgages

Best Mortgages for Small Down Payment

Best Mortgages for No Down Payment

Best Mortgages with No Origination Fee

Best Mortgages for Average Credit Score

Adjustable Rate Mortgages

Affording a Mortgage

All Insurance

Best Life Insurance

Best Homeowners Insurance

Best Renters Insurance

Best Car Insurance

Travel Insurance

All Credit Monitoring

Best Credit Monitoring Services

Best Identity Theft Protection

How to Boost Your Credit Score

Credit Repair Services

All Personal Finance

Best Budgeting Apps

Best Expense Tracker Apps

Best Money Transfer Apps

Best Resale Apps and Sites

Buy Now Pay Later (BNPL) Apps

Best Debt Relief

All Small Business

Best Small Business Savings Accounts

Best Small Business Checking Accounts

Best Credit Cards for Small Business

Best Small Business Loans

Best Tax Software for Small Business

Filing For Free

Best Tax Software

Best Tax Software for Small Businesses

Tax Refunds

Tax Brackets

Tax By State

Tax Payment Plans

All Help for Low Credit Scores

Best Credit Cards for Bad Credit

Best Personal Loans for Bad Credit

Best Debt Consolidation Loans for Bad Credit

Personal Loans if You Don't Have Credit

Best Credit Cards for Building Credit

Personal Loans for 580 Credit Score or Lower

Personal Loans for 670 Credit Score or Lower

Best Mortgages for Bad Credit

Best Hardship Loans

All Investing

Best IRA Accounts

Best Roth IRA Accounts

Best Investing Apps

Best Free Stock Trading Platforms

Best Robo-Advisors

Index Funds

Mutual Funds

AT&T cellular service restored after daylong outage; cause still unknown

thumbnail

  • A cellular outage Thursday hit thousands of AT&T users in the United States, disrupting calls and text messages as well as emergency services in major cities including San Francisco.

About 58,000 incidents were reported around noon ET, according to data from outage-tracking website Downdetector.com.

  • Shares of AT&T were down about 2% Thursday following the outages.

In this article

A cellular outage Thursday hit thousands of AT&T users in the United States, disrupting calls and text messages as well as emergency services in major cities including San Francisco. The company said service was restored to all affected customers shortly after 3 p.m. ET.

"Keeping our customers connected remains our top priority, and we are taking steps to ensure our customers do not experience this again in the future," the company said in a statement.

AT&T said late Thursday that based on an initial review, the outage was "caused by the application and execution of an incorrect process used as we were expanding our network, not a cyber attack." The company will continue to assess the outage.

AT&T, which put up a website for system updates , did not say how many customers were affected by Thursday's outage. The FCC said on X that it was investigating the incident and was in contact with AT&T and safety authorities .

Shares of AT&T closed 2.41% lower Thursday.

Phones affected by the outage displayed zero service bars in the top right corner of the device or the letters SOS. Customers were still able to make calls by enabling Wi-Fi calling.

A spike in outages began around 4:00 a.m. ET and peaked at around 74,000 reported incidents at 8:30 a.m. ET, according to Downdetector.

The AT&T outage affected people's ability to reach emergency services by dialing 911, a post on social media platform X from the San Francisco Fire Department said.

"We are aware of an issue impacting AT&T wireless customers from making and receiving any phone calls (including to 911)," the fire department said.

Atlanta Mayor Andre Dickens said in a post on X that the city could receive and make outbound 911 calls but that AT&T customers in the area had reported issues.

"We have received calls from AT&T customers that their cellular phones are in SOS mode. Please direct all inquiries to restore service to AT&T," Dickens said.

The Massachusetts State Police said that people were flooding their 911 center with calls trying to determine if the service worked from their cell phones.

"Please do not do this. If you can successfully place a non-emergency call to another number via your cell service then your 911 service will also work," the state police said in a post on X.

Users of Verizon and T-Mobile reported a few thousand outages each as of 10:00 a.m. ET, according to Downdetector.

The reports were likely due to calls made trying to connect with other networks, both companies said.

"Downdetector is likely reflecting challenges our customers were having attempting to connect to users on other networks," T-Mobile said in an emailed statement.

– Reuters, CNBC's Steven Kopack and Chris Eudaily contributed to this report.

comscore

Briefly

How to port to Vodacom and other networks without losing your old number in 2024

Is your current network not working as you desire? Well, you have an option to switch to another network but maintain your old phone number. This service is offered by several network providers across South Africa, including Vodacom. This article contains details on how to port to Vodacom.

South Africa is one of the most advanced countries in Africa when it comes to technology and network provision. With the introduction of porting, it is convenient for customers to switch to an alternative network with better deals but retain their old number from the previous provider. This means that your contacts will still reach you even after porting.

How to port to Vodacom

The process depends on the network provider you want to switch to. Vodacom has some of the best network deals and one of the easiest network migration process. Before doing a Vodacom sim swap to any other network, be sure that you want to switch networks because switching back may take a while.

How do you port your number to Vodacom?

Wondering how to port to Vodacom and keep your number? Here is a simplified procedure for prepaid customers.

  • Get a Vodacom prepaid sim that is registered with RICA.
  • Send a message to Vodacom using your old cell number from another network provider. The SMS should be as follows: portme followed by the new SIM number to Vodacom port number 082 767 8287.
  • Wait for two SMSs from the network provider. The first message should confirm that the SMS you sent has been received. The second should specify the porting date. Wait for about 24 hours after your porting date to activate.

If you are a contract customer, contact the telecom provider to get details on how to port your SIM contract and how to port to Vodacom online.

How long does it take to port to Vodacom?

Requesting a network switch takes a few minutes, but the activation duration depends on when you ask for the service. The service provider handles requests from Mondays to Fridays. Requests made over the weekends or public holidays will be dealt with the following working day.

If you need to use the telecom's network urgently, you can ask them to serve you the same day or choose a date that falls within 30 days.

How to port from Vodacom to MTN

Here is how to change your current Vodacom network to MTN.

  • Purchase a new MTN sim pack from an MTN store or retail shop.
  • Ensure the sim is registered with RICA at the store. The process will only be done if you have your ID and proof of residence.
  • Before inserting the new MTN card, send a message to MTN using your old Vodacom number. The SMS should contain the words: portme # followed by the ten digits of your new MTN card number, for example, portme#07123456789.
  • MTN will send an SMS on your old sim confirming the SMS receipt.
  • Wait for about 24 hours, then insert the new MTN sim card into your phone.
  • Dial 136 to activate your new SIM card and it will now be active.

Porting from Vodacom to Telkom

Follow this simple procedure on how to port your number from Vodacom to Telkom mobile.

  • Buy a Telkom card from the nearest Telkom retail store.
  • Ensure the new Telkom card is registered with RICA.
  • Send an SMS to Telkom using your old Vodacom number. The message should be structured as follows: portme# yourIDnumnber#20-digit ICCIC number located at the back of your new Telkom sim. Send the message to 081 160 7678.
  • Wait for about 24 to 48 hours for porting to be processed.
  • Insert your new Telkom line and start enjoying their network and mobile deals.

Vodacom customer care

For any further inquiries, you can contact Vodacom customer care services through your Vodacom cellphone on 082 135, which is free. You can also visit a Vodacom store in your area.

Alternatively, you can get in touch with customer care agents on your cellphone by:

Can you port back to your old network?

It is possible to port out from the current operator to your previous network. However, the process can only be done after 90 days since the last swap. After the period, also called the MNP lock-in period, apply the same porting steps from the old network to switch back.

Can you port a number twice?

Yes. In fact, you can switch operators as many times as you want. However, there must be a 90-day gap between each network switching process.

How to port from MTN to Vodacom?

You can do so by sending an SMS stating portme followed by your new MTN number to 082 767 8287. This is the same process you will use while porting Cell C to Vodacom.

Can you port your number to an existing contract?

You can only port numbers that are currently active. Your number should also be registered and verified by RICA.

How do you port your SIM card?

To port your SIM contract in South Africa, purchase a new SIM card from your network provider. Ensure it's active and RICA-registered, then port it to the service provider of your choice, such as MTN or Vodacom.

Does porting your number cancel service?

In some cases porting may extend to 24 hours or even longer for a successful transfer hence interfering with the service. Once the transfer is done, the service becomes active.

Switching networks while maintaining your old cell number has never been this easy. With the above procedure on how to port to Vodacom, you can stay in touch with your previous contacts without the hustle of sending them a new number.

DISCLAIMER: This article is not sponsored by any third party. It is intended for general informational purposes only and does not address individual circumstances. It is not a substitute for professional advice or help and should not be relied on to make decisions of any kind. Any action you take upon the information presented in this article is strictly at your own risk and responsibility!

Briefly.co.za recently published an article with best fibre packages in South Africa. The best fibre packages in South Africa save money spent on data. The highly-competitive market is forcing internet service providers to offer various packages for different customers.

A fibre network assures you of fast internet speeds with reliable connectivity. Since companies offer different deals, you can compare fibre prices to find the most affordable one.

How to port to Vodacom and other networks without losing your old number in 2024

IMAGES

  1. TCP/IP common Port's cheet sheet

    port numbers in network

  2. Which Protocols and Port Numbers Are Used by Dhcp

    port numbers in network

  3. Ports explained

    port numbers in network

  4. List of Common Ports Cheat Sheet

    port numbers in network

  5. What is port address in networking

    port numbers in network

  6. Common Network Port Numbers » NetworkUstad

    port numbers in network

VIDEO

  1. Port work an numbers on ms460 build

  2. Port numbers for Echo 4910 higher RPM

  3. 1 Modifying HTTPs Port Numbers

  4. Two Port Network

  5. port work an numbers on ms660 build

  6. Two port network part 1

COMMENTS

  1. List of TCP and UDP port numbers

    The port numbers in the range from 0 to 1023 (0 to 2 10 − 1) are the well-known ports or system ports. [3] They are used by system processes that provide widely used types of network services.

  2. Common Ports Cheat Sheet: The Ultimate List

    110 SHARES Perhaps you're angsty that you've forgotten what a certain port number meant. Rest assured, you don't have to remember all 65,535 port numbers. With so much information to remember, it's understandable if you forget a common port. That's why we put together this cheat sheet of common network ports for you.

  3. What is a computer port?

    What is a port number? Ports are standardized across all network-connected devices, with each port assigned a number. Most ports are reserved for certain protocols — for example, all Hypertext Transfer Protocol (HTTP) messages go to port 80.

  4. Port (computer networking)

    In computer networking, a port or port number is a number assigned to uniquely identify a connection endpoint and to direct data to a specific service. At the software level, within an operating system, a port is a logical construct that identifies a specific process or a type of network service.

  5. What are port numbers and how do they work?

    A port number is a way to identify a specific process to which an internet or other network message is to be forwarded when it arrives at a server. All network-connected devices come equipped with standardized ports that have an assigned number. These numbers are reserved for certain protocols and their associated function.

  6. 14 common network ports you should know

    Ports are identified with positive 16-bit unsigned integers, ranging from 0 to 65535. Other services use this port number to communicate with the service or app. Port numbers are divided into three ranges: well-known ports, registered ports, and dynamic or private ports.

  7. 50 Common Ports You Should Know

    Port number is a 16-bit numerical value that ranges from 0 to 65535. Well-known port (0-1023), registered port (1024-49151), and dynamic port is three types of port number space. (49152-65535).

  8. Port Numbers Used for Computer Networks

    In both TCP and UDP, port numbers start at 0 and go up to 65535. The lower ranges are dedicated to common internet protocols such as port 25 for SMTP and port 21 for FTP. To find the specific values used by certain applications, view a list of the most popular TCP and UDP port numbers.

  9. 15 Commonly Used Network Ports Explained

    Understanding Network Port Ranges Transport Protocols: The Digital Highways TCP: The Reliable Courier UDP: The Speedy Messenger Common TCP and UDP Default Ports 21 (TCP, UDP) - FTP 22 (TCP, UDP) - SSH 23 (TCP) - Telnet 25 (TCP) - SMTP 53 (TCP, UDP) - DNS 67,68 (UDP) - DHCP 80 (TCP) - HTTP 110 (TCP) - POP3 111 (TCP, UDP) - Portmapper

  10. Port Numbers and Network Protocols

    Port Numbers Application Protocols HTTP HTTPS E-mail Protocols FTP TFTP VoIP-Related Protocols DNS DNS Servers DNS Records Dynamic DNS DHCP Remote Access Protocols NTP RDP SNMP ICMP IGMP Networking Protocols ARP Summary The most common protocols, organized by the TCP/IP layer they operate at, are presented in Table 5.1 below:

  11. Ports explained

    A port is a 16-bit number used to identify specific applications and services. TCP and UDP specify the source and destination port numbers in their packet headers and that information, along with the source and destination IP addresses and the transport protocol (TCP or UDP), enables applications running on hosts on a TCP/IP network to communicate.

  12. Network Ports

    These portsa re assigned by IANA for specific services. The last part of ports in networking are dynamic ports. Daynamic ports are the ports from 49152 to 65565. These ports in networking are not registered with IANA. TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) uses these well-known ports.

  13. What is Network Port?

    Port numbers range from 0 - 65535 and these are assigned by an organization called IANA (Internet Assigned Numbers Authority). These 65,535 port numbers are broken down into the following three categories:- 1. System Ports Port numbers from 0 - 1023 are called systems or well-known ports. These are common ports that most people use every day.

  14. Service Name and Transport Protocol Port Number Registry

    Port numbers are assigned in various ways, based on three ranges: System Ports (0-1023), User Ports (1024-49151), and the Dynamic and/or Private Ports (49152-65535); the different uses of these ranges are described in [ RFC6335 ].

  15. Common Ports Cheat Sheet

    Learn more. It's a pain trying to memorize port numbers and their corresponding service names and protocols. So, we created this concise cheat sheet of common network ports and their associated protocols and service names for you to use as a quick reference.

  16. Common Networking Port Numbers in Linux

    These port numbers are divided into 3 ranges as per use case: Well-known ports (0-1023): These ports are also known as system ports, which are assigned to specific services by IANA (Internet Assigned Numbers Authority). ... Network Basic Input/Output System (NetBIOS) is a network service that enables applications of various computers to ...

  17. Network Ports and Protocols and What They're Used For

    These port numbers are only used by network admins, default applications, operating systems, and services. Users do not have access to this range of ports. What are Registered Port Numbers? After Well Known ports is the next range of port numbers, which includes ports 1024 through 49151. This range of ports is known as "Registered ports ...

  18. 40 Network Protocols with Port Numbers, Transport Protocols and Meanings

    The 40 Network Protocols, their port numbers and their transport protocols. 1. File Transfer Protocol (FTP) It is a protocol that carries data guarantees that data will be delivered properly. 2. Secure Shell (SSH) It is a cryptographic network protocol used to secure data communication. 3.

  19. How to Check Open TCP/IP Ports in Windows

    Run the command "netstat -ab" in an elevated Command Prompt, PowerShell, or Terminal window to see a list of applications and their associated ports. This works in Windows 11 too. Checking open ports can be done using built-in tools like Command Prompt or PowerShell, which list active ports and the associated process names or identifiers.

  20. What is Ports in Networking?

    Since the port is a 16-bit unsigned number it ranges from 0 to 65535. Types of Ports Ports are further divided into three categories: Well Known Port Registered port Dynamic Port Well Known Port It is from the range 0 to 1023 It is reserved for common and specifically used service

  21. What is my port number and how do I find it?

    A port is a virtual point in your device where a network connection begins and ends. In contrast to an IP address, a port is specific to the process, not the device. However, they're both necessary for communication over the internet. ... If an IP address were a building address, a port number would be an apartment number. ...

  22. Common Ports

    In this video, you'll learn about the common port numbers and how they are used to access network-based applications. As a network administrator, you will work often with TCP and UDP port numbers, and it's important to know what some of the most common ports are that you will see communicating over your network.

  23. Mnemonics and Tricks for Well-Known Port Numbers

    Securing the safe. Internet Mail Access Protocol - IMAP: 143. Internet Made A P (pen pineapple pen song). Turn the numbers into letters and MAKE a P out of the 1. M=3, 4=A, 1=P. The Mnemonic helps to remind you you're making Letters from similar shaped numbers. Remote Desktop Protocol - RDP: 3389 Remote Dog Protocol.

  24. Networking and RabbitMQ

    Clients communicate with RabbitMQ over the network. All protocols supported by the broker are TCP-based. Both RabbitMQ and the operating system provide a number of knobs that can be tweaked. Some of them are directly related to TCP and IP operations, others have to do with application-level protocols such as TLS.

  25. docker run

    The -P flag only publishes port numbers that are explicitly flagged as exposed, either using the Dockerfile EXPOSE instruction or the --expose flag for the docker run command. ... The default bridge network only allow containers to communicate with each other using internal IP addresses. User-created bridge networks provide DNS resolution ...

  26. AT&T cellular service restored after daylong outage; cause still ...

    A spike in outages began around 4:00 a.m. ET and peaked at around 74,000 reported incidents at 8:30 a.m. ET, according to Downdetector. The AT&T outage affected people's ability to reach emergency ...

  27. How to port to Vodacom and other networks without losing your old ...

    The SMS should be as follows: portme followed by the new SIM number to Vodacom port number 082 767 8287. Wait for two SMSs from the network provider. The first message should confirm that the SMS ...