Chapter 6
Computer Network: A Further Look
In this chapter, we will continue exploring some more important concepts of networks.
Key Points
- DNS:
- Translates domain names to IP addresses.
- Works through a hierarchy of servers (local cache, recursive, root, TLD, authoritative).
- DNS records provide instructions to servers.
- IP Addresses:
- Unique identifiers for devices on a network.
- IPv4 (32-bit) and IPv6 (128-bit).
- Classes (A, B, C, D, E) and subnetting.
- CIDR (Classless Inter-Domain Routing) for efficient address allocation.
- Domain Names:
- FQDN (Fully Qualified Domain Name): Complete domain name (e.g., www.google.com).
- URLs: Web addresses (absolute and relative).
- TCP/IP:
- TCP: Connection-oriented, reliable, ordered data transmission.
- IP: Addressing and routing packets.
- TCP 3-Way Handshake: Establishes connection.
- UDP:
- Connectionless, faster but less reliable than TCP.
- Suitable for time-sensitive applications (e.g., video streaming).
- Routing:
- Routers forward packets between networks.
- Routing types: Static and dynamic.
- Routing schemes: Unicast, broadcast, multicast, anycast.
- Routing protocols: OSPF, BGP, IGRP, EIGRP, EGP, RIP.
- VPN:
- Creates a secure, private network over a public connection.
- Benefits: Privacy, anonymity, security.
- Scenarios: Remote access, site-to-site.
- Tunneling: Encapsulates and encrypts data.
- Application Layer Protocols:
- SMTP: Email transfer.
- MIME: Extends SMTP for various data types.
- HTTP: Web communication.
- RADIUS: Centralized authentication.
- FTP: File transfer.
- DNS: Domain name resolution.
Internet Domain Name System
DNS (Domain Name System) is a naming database where the domain names are located and translated into IP (Internet Protocol) addresses.
IP Address
Computers in a network use IP address to find where they are in the network. It is a unique logical address assigned to a machine over the network:
- IP address is the unique address assigned to each host present on internet
- IP address (IPv4) is 32 bits (4 bytes) long
- IP address consists of two parts: Network Part and Host Part
- Each of the 4 bytes is represented by a number from 0 to 255, separated with dots, e.g. 192.168.1.152

IP addresses are difficult for people to memorize, so DNS is introduced to resolve this issue. For example, when we want to visit Google, we don’t type in its IP address in the browser, instead we type in its domain name google.com into the browser URL address field. That domain name will be resolved by DNS servers into its corresponding IP address so that your computer knows where to find Google’s server on the Internet.
Types of IP Addresses
IP addresses can be classified into two categories: Static IP addresses and Dynamic IP addresses.
Static IP address – As its name implies, the static IP address usually doesn’t change unless a network administrator changes it. They serve as a permanent Internet address and provide a simple and reliable way for communication.
Dynamic IP address – Dynamic IP addresses are temporary IP addresses. These IP addresses are assigned to a computer when they get connected to the Internet each time. These are borrowed from a pool of IP addresses, and are shared across various computers.
IPv4 and IPv6
When we say IP address, we are referring to IPv4. It is widely used and accounts for up to 90% of Internet traffic.
IPv6 is the most recent version of Internet Protocol. It was initiated in 1994 by IETF (Internet Engineer Task Force) to replace IPv4 and is being deployed to fulfill the need for more internet addresses.
IPv6 addresses are 128-bit IP address written in hexadecimal and separated by colons, e.g. 3fae:1d00:4525:31:200:f8ff:fe21:67cf
While increasing the pool of addresses is the most obvious benefit of IPv6, there are other important technological benefits as well:
- No more NAT (Network Address Translation)
- Auto-configuration
- No more private address collisions
- Better multicast routing
- Simpler header format
- More efficient routing
- Built-in authentication and privacy support
- Easier administration
Since the appearance of IPv6, we are starting to migrate to it from IPv4. Yet, the progress is slow. Legacy technologies take a long time to die off and this is due to a list of different factors. It is the future and it will happen, but just very slowly.
Classes of IP Address
The original designers of the IP stack came up with a hierarchical addressing scheme with five classes, from Class A to Class E. Each class has a range of IP addresses.
- Class A: IP range from 0-127 in the first byte, designed for very large companies
- Class B: IP range from 128-191 in the first byte, designed for medium-size companies
- Class C: IP range from 192-223 in the first byte, designed for small companies
- Class D: IP range from 224-239 in the first byte, reserved for multicast addressing, Not used in public sector
- Class E: IP range from 240-255 in the first byte, reserved for scientific studies, Not used in the public sector
Note this addressing scheme based on Class is being replaced by CIDR (Classless Inter-Domain Routing) which has an IP address like 192.168.5.152/24. We’ll look at it later.
Network Part and Host Part
IP address bytes can be divided into two parts: Network Part and Host Part.

Network Address is used for routing on the Internet and once the data packets have arrived at the local network, Host Address will be used.
Network part specifies the unique number assigned to your network. Host part is the IP address that is assigned to each host. The bits where they are separated are dynamic and can depend on the IP class.
This can be considered as a local network connected to the Internet and this network is assigned a unique number to be identified in the Internet. Then this number forms the network part of each host’s IP address within the network.
Subnetting (Subnetwork)
If you work at a large organization or business, especially one spread across multiple branches, it’s quite possible that it deploys a subnet.
Subnetting, or subnetworking, is the process of splitting a single large network into two or more smaller ones.
Why do we need subnetting? Within the IP system, even a target network can be found, it could still be difficult to route a data packet to the right machine to that network. This becomes even more difficult when networks reach a large scale. By breaking the network up into smaller parts, subnets help alleviate this network congestion.
An organization can use IP subnets for logical reasons (firewall, etc.) or physical requirements (small broadcast domains, etc.). Routers use subnets to make routing choices.
Subnetting can improve network security. With subnets, security incidents can be better contained.
Subnet Mask
A subnet mask is selected by a network administrator to divide a network into smaller subnetworks.
For example, a common subnet mask is 255.255.255.0 which in binary is “1111 1111.1111 1111.1111 1111.0000 0000”. Note a subnet mask will always have a certain number of zeros at the end, which leaves a range of IPs that can be assigned. The example subnet mask has 8 binary bits of 0 at end and this provides 2^8=256 possible IP addresses in the subnetwork. If the administrator uses 255.255.255.127 as a mask, which in binary is “1111 1111.1111 1111.1111 1111.1111 0000”. This will allow 2^4=32 IP addresses in the subnetwork.
Calculate Network Address and Host Address
Suppose we have a host IP 192.168.5.152 and the network has a mask of 255.255.248.0.
First, let’s calculate the allowed IP range with this subnet mask for some fun. Converting the subnet mask to binary gives us 11111111.11111111.11111000.00000000. So, the allowed IP range is from 00000000.00000000.00000000.00000000 to 00000000.00000000.00000111.11111111, which in decimal is 0.0.0.0 to 0.0.7.255. That is 256*8 = 2048 available IP addresses.
Next, to calculate the Network address, we first convert the subnet mask to binary. After that, we convert host IP to binary and do a bitwise AND operation. The result binary is the Network address.

Then, we calculate the Host address, we first convert the subnet mask to binary and Apply binary complement to it. After that, we convert host IP to binary and do a bitwise AND operation. The result binary is the Host address.

CIDR (Classless Inter-Domain Routing)
CIDR is an IP addressing scheme to replace the old system based on classes A, B and C. CIDR is for subnetting just like Class-based scheme, but with a better efficiency.
Problem with Class-based IP Addressing
The old class-based IP addressing came with inefficiencies that exhaust IPv4 addresses faster than it needs to.
- Class A – Over 16 million host identifiers
- Class B – 65,535 host identifiers
- Class C – 254 host identifiers
If an organization has 1000 host machines, it can’t go for Class C license and will probably use a Class B license. In this case, a very large number of IP addresses are wasted. This will become a problem when a lot of organizations are doing it. To solve this issue, CIDR is introduced and it is based on a variable-length subnet masking scheme.
How CIDR works
CIDR is based on VLSM (Variable-Length Subnet Masking). This allows it to define prefixes of arbitrary lengths, making it much more efficient than the Class-based system.
CIDR IP addresses consist of two parts. The network part is written as a prefix, like a normal IP address, e.g. 192.168.1.152. The second part is the suffix which indicates how many bits are masked in the address (e.g. /21). Putting it together, it will look like 192.168.1.152/21.
Calculate Network Address and Host Address with CIDR
We can calculate the Network address and Host address with a CIDR IP just like we did previously.
The point is to know the number after slash (/) in the CIDR address representing how many significant bits (starting from left) is value 1.

‘/21’ here indicates 21 bits of 1s. The remaining part is the same as what we have done previously. We do bitwise AND to find the Network address as 192.168.0.0 and a bitwise AND for mask’s binary complement to find the Host address as 0.0.1.152. In other words, ‘/21’ here means 21 bits of the original IP address is the Network address and the other 11 bits is the Host address.
CIDR is a great way to improve the efficiency of IP address distribution. It was vital with IPv4 as IP addresses were quickly being exhausted.
FQDN (Fully Qualified Domain Name)
FQDN is the fullest possible domain name of a host or a computer on the internet. The syntax is:
[hostname].[domain].[tld]
For example, www.google.com, where “.com” is the top-level domain and then it follows the domain name “google”, and the last is the hostname “www”.
The hostname here can show a specific service or protocol for that domain, such as “mail”, that is mail.google.com.
URL (Uniform Resource Locator)
We talked about URLs in the HTTP chapter. Let’s revisit it here.
URL refers to a web address which uniquely identifies a resource over the internet. This resource can be a web page, image, audio, video or other types presented on the Web.
There are two forms of URL: Absolute URL and Relative URL.
Absolute URL
Absolute URL is a complete address of a resource on the Web. It can comprise four parts: protocol, server name, path name and file name. Note protocol and server name are usually required.
For example, https://en.wikipedia.org/wiki/URL,
- http is the protocol
- en.wikipedia.org is the server name
- /wiki/URL is the path name
The protocol tells the browser how to handle the request. Some other protocols are:
- FTP
- Https
- mailto
Relative URL
Relative URL is a partial address of a webpage, where the protocol and server name are omitted.
For example, when we write html code
<a href = "/xyz.html">The above is a link to the xyz.html page, which will be in the same directory of your home page.
Absolute URL VS Relative URL
| Absolute URL | Relative URL |
|---|---|
| Link web pages across different websites | Link web pages within the same website |
| Sometimes difficult to manage | Easier to manage |
| Need to change when server name changes | No need to change when server name changes |
How DNS (Domain Name System) Works
When you visit a domain such as google.com, your computer follows a series of steps to turn a human-readable web address into a machine-readable IP address. This happens each time you use a domain name, whether it’s viewing websites, sending email or uploading a file. The whole flow takes a couple of steps and is happening behind the scenes.
Let’s take a look at the process.

Step 1: Request information
When you type in a URL in the browser, it will try to resolve the hostname. The first place your computer looks for is its local DNS cache, which stores information that your computer has recently viewed. This DNS cache is a temporary database, and is maintained by a computer’s operating system.
If your computer can’t find the record for the requested hostname, it will go to the next step – query recursive DNS servers.
Step 2: Ask the Recursive DNS servers
If the information can’t be found locally, your computer queries the recursive DNS servers (DNS resolvers) from your ISP (Internet Service Provider). These recursive DNS servers perform the DNS query on your behalf.
The recursive DNS servers have their own caches which are shared among ISP’s customers, and hence you will have a reasonable chance the domain name you are visiting can be found.
Besides the DNS resolvers run by ISP, some companies provide public DNS resolvers as well, e.g. Google Public DNS, OpenDNS etc.
If the recursive servers don’t have the records, it will go to the next step – root name servers.
Step 3: Ask the Root Name servers
If the recursive servers don’t know the answer, the query will happen at the Root Name servers.
Root Name servers, or DNS root servers, are name servers that are responsible for the functionality of DNS for the entire Internet. The Root Name servers don’t know the answer directly, but they can direct DNS queries to someone that knows where to find it.
There are 13 Root Name servers in the world. Each of the servers has a bunch of instances to load-balancing the traffic.
Below is a location map from root-servers.org for Root Name servers.

These Root Name servers are operated by 12 organizations (by now) and many of them have been operating those Root Name servers since the creation of DNS.
When the Root Name server receives the query request, it will look at the first part of the request, reading from right to left – google.com, and then direct the query to other servers. In this case, since it is a .com, it will go to TLD (Top-Level Domain) Name servers.
Step 4: Ask the TLD (Top-Level Domain) Name servers
TLD Name servers maintain information for all the domain names that share a common domain extension, such as .com, .net, or other extension name.
For example, a .com TLD Name server contains information for every website that ends in ‘.com’.
Yet, again, these TLD Name servers still don’t have the information we need, but they will point us to the next step – Authoritative DNS servers. To do that, the TLD Name servers review the next part from right to left of the request – google.com, and direct the query to the name servers responsible for this specific domain.
Step 5: Ask the Authoritative DNS servers
Authoritative name servers are responsible for knowing all the information about a specific domain, which is stored in the DNS records. There are different types of records, each of which contain specific kinds of information.
In this case, we want to know the IP address of google.com, so we ask the authoritative name server for the address record (‘A’ record).
Step 6: Retrieve the record
The recursive server retrieves the ‘A’ record for google.com from the authoritative name servers and stores the record in its local cache for later use.
All local records have a time-to-live value, which tells when the cached record expires. If the record expires, the recursive servers will fetch a new copy to make sure the information is up-to-date.
Step 7: Receive the answer
Once the recursive server gets the answer, the address record of the request hostname, it returns that information to your computer. Your computer stores it in the computer local cache, reads the IP address from the record, and then passes that information to your browser. The browser then opens a connection to the webserver and reaches the website.
The whole process takes a very short amount of time to complete (in the order of milliseconds).
The job of resolving a hostname is simple: get its IP address; yet, it takes some complexity to finish the work. This is probably due to the large number of servers and registered records from the entire world. This well-designed DNS architecture helps to handle the large volume and its complexity so that we can get the resolved hostname with good performance and reliability.
DNS Records
DNS records act as instructions for the DNS server, so it knows which domain names each IP address is associated with.
DNS records contain different syntax and commands for how the server should respond to the request. Some of the common ones are:
- “A” Record: this record refers to the actual IP address that’s associated with the domain; e.g. “74.125.224.147”
- “AAAA” Record: this one operates the same as “A” record, except the record points to an IPv6 address
- “CNAME” Record: this record indicates subdomains that might be listed under or associated with your current domain; for example, you can link blog.example.com with a CNAME record to an A record set on example.com, and they would both point to the same server
- “MX”: this record refers to any mail servers that might be used in accordance with your domain; for example, example.com can be linked to mail.example.com through MX record, and then mail.example.com has a A record of 98.76.54.321
- “SOA”: this record has crucial information about your domain, such as when your domain was last updated and relevant contact information
- “TXT”: this can be edited to include any additional information about the domain that isn’t currently listed
TCP/IP (Transmission Control Protocol / Internet Protocol)
We know there are vast numbers of users communicating using various devices in different languages, which also includes various ways of transmitting data along with different software implementations. That being said, if there are no pre-agreed ‘standards’ that govern the way users communicate, communicating world-wide would not be possible.
TCP/IP are the dominating transport and network layer protocol in the Internet today. Let’s take a look at it first.
TCP and IP are actually two different protocols, but most of the time they are used together.
TCP/IP is used as the basic communication protocol suite for the Internet. Sometimes, TCP/IP can also be used as a communication protocol in a private network (intranet or extranet).
TCP defines how applications can create channels of communication across a network. It also manages how a message is divided into smaller packets before they are transmitted over the internet and reassembled in the right order at the destination.
IP defines how to address and route each packet to make sure it reaches the right destination. IP is the primary way in which network connections are made, and it establishes the basis of the Internet. IP does not handle packet ordering or error checking, as they are handled by TCP.
Common Types of TCP/IP
Common types of TCP/IP include:
- HTTP (HyperText Transfer Protocol): handles communication between a web server and a web browser
- HTTPS (Secure HTTP): handles secure communication between a web server and a web browser
- FTP (File Transfer Protocol): handles transmission of files between computers
TCP/IP are at Transport Layer and Network Layer while HTTP, HTTPS and FTP are at Application Layer.
TCP 3-Way Handshake
In order for a client to communicate with a server, a connection needs to be established. This is usually known as the TCP 3-Way Handshake.

To open a connection:
- The client sends an SYN ‘initial request’ packet to the target server to start the dialogue
- The target server then sends a SYN-ACK packet to agree to the process
- The client sends an ACK packet to the target to confirm the process and the connection is established
After a connection is established, message content can be sent.
TCP Features
Here are some of the TCP features:
- TCP is reliable. As the receiver always sends positive or negative acknowledgement about the data packet to the sender, the sender always knows whether the data has reached the destination. If not, the sender can resend it.
- TCP ensures the data reach the destination in the same order it was sent
- TCP is connection oriented. TCP requires that connection between two remote points be established before sending actual data.
- TCP provides error-checking and recovery mechanism
- TCP provides end-to-end communication
- TCP provides flow control
- TCP operates in Client/Server point-to-point mode
- TCP provides full duplex server, i.e. an endpoint can play both receiver and sender
UDP (User Datagram Protocol)
UDP is a communication protocol used across the Internet for time-sensitive transmissions such as video playback or DNS lookups. Compared to TCP, it is faster by not requiring a 3-way handshake, which allows data to be transferred before the receiving party agrees to the communication.
UDP doesn’t have the error checking and ordering functionality as of TCP. In other words, the data transmission is not as reliable as TCP. If some packets are dropped due to any network reason, those dropped data won’t be resent. While this sounds less ideal, there are certain situations ‘timing’ is preferred over ‘reliability’.
When we say UDP is commonly used where occasionally dropping packets is more important than waiting, it is based on the fact that the data will be transferred to the destination to a very large extent and only a very small portion of data is dropped. There wouldn’t be any sense if we have dropped, say, half of the data during transmission (well, you might find some extreme cases).
As an example, video streaming can be based on UDP. With limited network bandwidth, we would prefer a fluent video playback with some pixel glitch to crystal clear image but dropping frames.
TCP VS UDP

Connection
TCP is a connection-oriented protocol; UDP is a connectionless protocol. TCP establishes a connection between a sender and receiver before data can be sent. UDP does not need to establish a connection to send data.
Reliability
TCP is reliable. Data sent over TCP is guaranteed to be delivered to the receiver. TCP will check packets for errors and track packets so that data is not lost or corrupted. UDP is relatively not reliable in this sense, as it does not provide guaranteed delivery.
Flow Control
TCP uses a flow control mechanism to ensure a sender is not overwhelming a receiver by sending too many packets at once. UDP does not provide flow control.
Ordering
TCP does ordering and sequencing to guarantee that packets sent will be delivered to the client in the same order they were sent. UDP sends packets in any order.
Speed
TCP is slower than UDP as the former does more things.
Usage
TCP is commonly used for applications that require high reliability where timing is less of a concern:
- HTTP
- SSH
- FTP
- SMTP
UDP is used for applications that requires speed
- Video Streaming
- Live Broadcast
- VoIP (Voice over IP)
Routing
Data is transferred in the form of packets. A router is a network layer device and will have the ability to create multiple paths for data transmission and choose the best route.
Router connects two or more networks which can be either nearby or very far away and hence, it works with LAN, MAN, WAN or Internet. Routers come in different sizes and functions. Small routers are used in homes and small businesses. Mid-sized routers are used to connect several buildings and large routers are used in big organizations.
Router Functions
The router features depend on its intelligent level and may include:
- Transfer data to destination by selecting the best path
- Connects different types of networks
- Shares information with other routers in the network
- Contains routing table that keeps track of the routes to networks
Routing Type
There are mainly two types of routing:
- Static routing: for small networks, which enables the network administrator to enter the routing information manually in the routing table. This is time-consuming and difficult to scale
- Dynamic Router: for large networks, which updates the routing table automatically according to the changes in network topology and information received from other routers. The work is completed by the help of routing protocols such as RIP, OSPF, BGP and IGRP.
Routing Schemes
Data is transported over a network in different routing schemes:
- Unicast: from one source to one destination, i.e. One-to-One; mostly used
- Broadcast: from one source to all possible destinations, i.e. One-to-All
- Muticast: from one source to multiple destinations stating an interest in receiving the traffic, i.e. One-to-Many
- Anycast: from one source to any one of a group of potential destinations which are all identified by the same destination address, i.e. One-to-Any; selection is often based on distance

Most of the traffic on the Internet or Intranet use Unicast, as the destination is already known in those cases. Router just needs to look up the routing table and forward the packet to the next hop (router).
Router Protocols
Routing protocols determine how a router identifies other routers in the network, keeps track of all possible destinations and makes dynamic decisions for where to send each network message.
Common protocols include:
- OSPF (Open Shortest Path First): find the best path for packets as they pass through a set of connected networks
- BGP (Border Gateway Protocol): manage how packets are routed across the internet through the exchange of information between edge routers; this ensures router can quickly adapt to send packets through another reconnection if one path goes down
- IGRP (Interior Gateway Routing Protocol): determine how routing information between gateways will be exchanged within an autonomous network
- EIGRP (Enhanced Interior Gateway Routing Protocol): ask for help from neighbor router if it can’t find a route to a destination
- EGP (Exterior Gateway Protocol): determine how routing information between two neighbor routers is exchanged
- RIP (Routing Information Protocol): the original protocol for defining how routers should share information when moving traffic among an interconnected group of local area networks
How Router Works
Data is first broken down into packets at the sender side and then forward to the router for delivery. When the router receives a packet, it will check the destination of the packet.
If the destination address lies in the same network, then the router will directly transfer the packet to its destination. If the packet does not belong to the same network, then it will check its routing table and pass the packet to the next router specified in the table, which forwards it again until the packet finally reaches its destination network.

Routing tables list directions for forwarding data to particular network destinations, sometimes in the context of other factors, like cost. Eventually, it will base on an algorithmic set of rules that calculate the best way to transmit traffic toward any given IP address.
A routing table often specifies a default route, which is used whenever it fails to find a better forwarding option for a given packet, e.g. home network or small business network router directs all traffic along a single default route to its ISP (Internet Service Provider).
VPN (Virtual Private Network)
A VPN gives you online privacy and anonymity by creating a private network from a public internet connection.
VPN masks your IP address so your online actions are virtually untraceable. Furthermore, VPN services establish secure and encrypted connections to provide more privacy.
VPN Benefits
Things VPN can do includes:
- Hide your IP address: connect to a VPN conceals your IP
- Change your IP address: you will get a different IP when using VPN
- Encrypt data transfer: VPN will protect data you transfer on public
- Mask your location: with a VPN, users can choose country of origin for their internet connection
- Access blocked websites: get around websites blocked by governments
VPN Scenarios
VPNS are generally used in two scenarios:
- Remote Access
- Site-to-Site Access

Remote Access
In a Remote-Access VPN scenario, a VPN client, e.g. laptop or smartphone, establishes a remote connection to a VPN server, in order for the client to communicate with the LAN from the public, such as the Internet.
Site-to-Site Access
In Site-to-Site VPN scenario, two or more VPN servers create end-to-end connections in order to allow LAN traffic to traverse the WAN (Internet).
Tunneling
In both scenarios of VPN, VPN traffic reaches the intended Network Endpoint through a process called Tunneling.
The term VPN tunneling describes a process whereby data is securely transported from one device or network to another through a non-secure environment (such as the internet) without compromising privacy. Tunneling is protecting data by repackaging it into a different form.
Tunneling is more of a conceptual idea. That is to say, in reality, no physical tunnel exists. The data still needs to travel through the same wires as any other data passing through the public network.
VPN Tunneling uses data encapsulation and encryption to safely carry data traffic through the non-secure environment. Encapsulation isolates the data from other data traveling over the same network, and encryption makes the data unreadable to surveillance or criminals. Hence it is like the data is traveling inside a tunnel.

Application Protocols
SMTP (Simple Mail Transfer Protocol)
SMTP is a protocol used to transfer email from one user to another.

A user will compose an email through an email app and send via that app to its mail server through SMTP. The first mail server receives the message and establishes a connection with the destination mail server and forwards the message to the destination server via SMTP. Once the message has arrived, the receiver will use an email app to download the message via POP3 or IMAP.
What are POP3 and IMAP?
POP3 (Post Office Protocol version 3) is a standard mail protocol used to receive emails from a remote server to a local email client. POP3 allows you to download email messages on your local computer and read them even when you are offline. When you use POP3 to download messages, the messages will be removed from email server.
IMAP (Internet Message Access Protocol) is a mail protocol for accessing email on a remote web server from a local client.
IMAP and POP3 are the two most commonly used Internet mail protocols for retrieving emails. The difference between the two lies in that POP3 assumes your email is being accessed only from one app while IMAP allows simultaneous access by multiple clients. That’s why IMAP is more popular than POP3.
MIME (Multipurpose Internet Mail Extensions)
MIME is an extension to SMTP that allows users to exchange different kinds of data files over the Internet, e.g. images, audios and videos. MIME is required if the text is using a character set other than ASCII. Virtually all human-written internet email is transmitted via SMTP in MIME format.
HTTP (HyperText Transfer Protocol)
HTTP is covered in the previous sections but I want to revisit it after we have gone through some network basics. It is one of the application layer protocols. It is the foundation of all websites, that is WWW or World Wide Web.
RADIUS (Remote Authentication Dial-In User Service)
RADIUS is a legacy authentication mechanism. It’s a client-server protocol that enables a remote server to communicate with a central server to authenticate users and authorize their access to the request system or service.
RADIUS allows a company to maintain user profiles in a central database that all remote servers can share.

FTP (File Transfer Protocol)
FTP is the most widely used protocol for file transfer over a network. Although a lot of file transfer is now handled using HTTP, FTP is still commonly used to transfer files “behind the scenes”.
FTP is a client-server protocol that relies on two communication channels between client and server: Command Channel and Data Channel. The former is for controlling the conversation and the latter is for transmitting file content.

DNS (Domain Name System)
A quick revisit on DNS. We know it is used to translate a domain name into the corresponding IP.
DNS works under Client-Server Model and it primarily uses UDP to serve requests. Sometimes, TCP will be used as well.
Common Protocols, Ports and Functions
Here is a summary of some common protocols, ports and their functions. The port number listed is the default one or a common port that people will use. Yet, port numbers can be changed in some cases.
| Name | Protocol | Port | Description |
|---|---|---|---|
| FTP | TCP | 20/21 | File transfer; FTP control on port 21; FTP data transfer on port 20 |
| SSH | TCP | 22 | Primary method to manage remote devices and machines on a command level |
| Telnet | TCP | 23 | Basic insecure connection to manage remote devices on a command level |
| SMTP | TCP | 25 | Transfer email from sender to mail server; also used to transfer email from source to destination between mail servers |
| DNS | TCP/UDP | 53 | Translate domain names into IP addresses |
| DHCP | UDP | 67/68 | Used on networks that do not use static IP address assignment |
| HTTP | TCP | 80 | Main protocol used by web browser |
| HTTPS | TCP | 443 | Provide a secure layer on HTTP with either TLS or SSL |
| IMAP | TCP | 143 | Main protocol used to retrieve email from a server |
| POP3 | TCP | 110 | Retrieve email from SMTP servers |
| SNMP | TCP/UDP | 161/162 | Used for network monitoring, configure and control. |
| LDAP | TCP/UDP | 389 | Used for accessing and maintaining distributed directory information |
| LDAPS | TCP/UDP | 636 | Provide a secure layer on LDAP with either TLS or SSL |
| RDP | TCP | 3389 | Establish a connection with a remote computer |
| RADIUS | UDP | 1812 | Provides centralized authentication, authorization and accounting (AAA) |