in our previous video we talked about how services have port numbers that they use so that other devices can communicate and use those services we refer to these as well-known port numbers because both the server and the client need to know exactly what port number they'll use to communicate this is not only important for the server and the client but it's also important for any firewalls that may be in the middle of that communication firewalls have to decide whether to allow or disallow this traffic and they often make that decision based on the port number as we go through this video you'll see that there are a lot of different port numbers that you should use and if you've never worked with port numbers before this will seem like rote memorization but the port numbers themselves become easier and easier to remember as you continue to use them it's important to know these port numbers and what protocols are often used by a particular port number but it's also important to know when you would use these protocols for example your exam might ask you what port number is used by an application that transfers data in a particular way across the network let's start our conversation of port numbers with ftp or the file transfer protocol as the name implies this is a protocol that transfers files from one device to another there are two port numbers used by ftp one is tcp port 20 this is for data transfers and tcp port 21 which is used to control the data transfer ftp is a generic way to transfer data between devices but it commonly requires some type of authentication to log into that remote device so you might use a username and password although some systems will allow you to log in as anonymous and use any password to gain access the ftp protocol also includes a number of file management functions so when you connect to an ftp server you can list all of the files on that server you can add delete rename and perform other file management functions all by using ftp there may be times when you need to connect to a remote device through a terminal or command line front end it's common to use secure shell or ssh to provide this terminal connection to a remote device ssh commonly communicates over tcp using port 22 and it has this text-based front-end to be able to access that remote device although we see plain text on our screen any communication sent over the network is sent as encrypted data that's where the secure comes from in the name secure shell there's another way to connect to a remote device using this text-based or console front-end and it's using telnet or the telecommunication network protocol telnet commonly uses tcp port 23 to provide this connection just like ssh telnet provides this text-based front-end that allows us to connect to the remote console of another device but unlike ssh all of the communication between this telnet front-end and the telnet server is all sent in the clear or non-encrypted this means that anyone who might be capturing packets between these two devices will see everything that you're sending over this link including usernames passwords and everything else this is why we often say that you shouldn't use telnet on your production networks and instead you should always use ssh for terminal communication there are probably millions of email servers that are located on the internet and the protocol that those email server use to communicate with each other is the simple mail transfer protocol or smtp smtp commonly uses tcp using port 25. not only is smtp used to communicate between mail servers but it's also used for our mail clients to send mail to a mail server so if you're using a mail client on your mobile device or your desktop computer and you're sending an email message you could be using smtp although it's common to use smtp to send mail receiving mail is done using a completely different set of protocols so if you were to look at your email client you're probably using imap or pop3 to be able to receive mail and smtp to be able to send mail if you need to connect to a remote website you would probably type into your browser www.professormesser.com and hit enter behind the scenes your system needs to be able to communicate with the professor messer web server but it has no idea what the ip address is for that server to be able to resolve an ip address from that fully qualified domain name your system will use dns or the domain name system dns commonly uses udp port 53 to be able to make this connection between you and the dns server these are obviously very critical resources because we don't often memorize ip addresses of servers and very often server ip addresses can change without any type of notification it's dns that provides that resolution between a name that we're typing in on the browser and the ip address that will be used for the actual communication if you've ever used your mobile device on the wi-fi network of a coffee shop then you've automatically received an ip address that you can use on that network this ip address was assigned automatically using the dynamic host configuration protocol or dhcp the well-known ports for dhcp are udp port 67 and udp port 68. of course you need a dhcp server to assign these ip addresses to devices on your network that functionality is commonly built into the routers and wireless access points that we use these days this dhcp server will have a large pool of ip addresses that can then be assigned to devices on your network all of these ip addresses are assigned in real time so when you start up your computer it queries the dhcp server and the dhcp server assigns your device all of your ip configuration details dhcp uses a leasing system to assign these ip addresses so you are only using this ip address for a certain amount of time and after that lease expires and you're no longer on the network that ip address goes back in the pool for someone else to use network administrators can also configure dhcp servers to always assign the same ip address to certain devices so if there are routers firewalls switches and other infrastructure devices on your network your network administrator may configure dhcp reservations so those devices always receive the same ip address every time they're booted up this also means that if you need to change any of the ip configurations on these devices you don't have to go to the devices to make those changes you simply make them on the dhcp server the next time that device requests a dhcp address it will receive the new configuration if you've ever used a web browser then you've used http and https http is the hypertext transfer protocol and this is the common protocol used by our browsers to communicate to web servers there are two different protocols depending on the type of communication that you'll be doing if you're communicating in the clear or in a non-encrypted form you would be using the http protocol which uses tcp and port 80. if your browser's communicating over an encrypted connection then it's probably using https the s being for secure and that uses tcp port 443. we mentioned earlier that sending email messages can use smtp or the simple mail transfer protocol but to receive email messages you would commonly use pop3 or imap pop3 is the post office protocol version 3 and it commonly uses tcp port 110 pop3 was designed to retrieve email messages to an email client but it wasn't built for multiple email clients and of course these days we tend to walk around with many different mobile devices all accessing the same email inbox to be able to synchronize across all of these different mailboxes we commonly use imap4 or the internet message access protocol version 4. imap commonly uses tcp port 143 to be able to download and manage that mailbox many operating systems have their own method of transferring files and information between devices using that operating system windows commonly uses server message block or smb to be able to provide this connection this is the protocol commonly used by microsoft windows so if you're transferring files between devices or you're sending a print job to a printer it's probably using smb you might also hear smb referenced as cifs or the common internet file system smb uses a number of different protocols to be able to communicate and if you're communicating to an older windows machine you're probably using netbios over tcp netbios is the network basic input output system this uses udp port 137 as a name service function so that it can find devices on your network by the name and uses tcp port 139 to set up a session and transfer data between devices on most modern versions of windows netbios isn't used devices can communicate directly between each other using tcpip in those cases it would use a direct smb connection using tcp port 445. this allows us to have a direct s b communication between two devices by using only tcp if you plan on doing any work as a network administrator you'll become very familiar with snmp or the simple network management protocol snmp allows a network management device to query these infrastructure devices for performance details and receive those metrics in return this uses udp port 161 to perform these queries you can also configure the infrastructure device to monitor for certain metrics and if it exceeds any of those metrics it can send an alert to the management station we refer to these alerts as traps and the traps use udp port 162. if you're configuring snmp on a device it will ask you if you're using version one version two or version three version one was obviously the original snmp version it sent structured information across the network but all of this information was sent in the clear or in a non-encrypted form we introduced a newer version of snmp with snmp version 2 which allowed us to do bulk transfers of information but still all of that information was being sent in a non-encrypted form to be able to include additional security with snmp you need to use snmp v3 this includes encryption that allows us to have message integrity authentication and encryption of all of the snmp data we use directories extensively on our modern networks and one very common protocol to use to query these directories is ldap ldap is the lightweight directory access protocol and it commonly uses tcp port 389. there are many implementations of ldap but one of the most popular is microsoft active directory which allows you to query that active directory server using the ldap protocol if you've ever worked in a support role or on a help desk then you've probably performed some type of remote access to someone's desktop one very popular protocol to provide this remote communication is rdp or the remote desktop protocol this is the standard protocol used by windows for the remote sharing and it commonly uses tcp port 3389 these remote desktop services are available in many different editions of windows and if you're using windows today then you probably have built into the operating system the ability to connect to or receive a remote desktop session rdp can be used to take over and control an entire system or just to run a single application from that server although you'll find servers running rdp almost exclusively on windows there are clients that you can run on almost any operating system so if you're running linux macos android or any other operating system there's probably an application you can load that will allow you to connect to a windows device using the remote desktop protocol