Understanding Protocols, Ports and Sockets | Intro to Computer Networks Course Preview
Summary
TLDRThis video delves into the fundamentals of network protocols, ports, and sockets, essential for data exchange between computers. It explains how protocols like FTP, HTTP, and DNS operate on specific port numbers to ensure proper communication. The presenter uses a Windows Server 2016 environment to demonstrate identifying active protocols and services, such as IIS, DHCP, and DNS, and clarifies the concept of sockets by combining IP addresses with port numbers. The video also touches on the types of ports, including well-known, registered, and dynamic ports, and their roles in differentiating multiple services running on a single server.
Takeaways
- đ Protocols are the rules that govern how data is exchanged between computers in a network, ensuring effective communication.
- đ Network protocols are often implemented as processes or services on operating systems, such as DNS, DHCP, and web servers.
- đ Ports are logical constructs associated with protocols, each with a specific number, to differentiate the services running on a computer.
- đ Sockets combine an IP address with a port number, forming a communication endpoint for network services.
- đ„ïž A computer can run multiple protocols simultaneously, and ports help to distinguish between them, like FTP on port 21, HTTP on port 80, and DNS on port 53.
- đ There are three types of ports: well-known ports (0-1023), registered ports (1024-49151), and dynamic ports (49152-65535).
- đ Well-known ports are assigned to widely recognized protocols, while registered ports can be requested for less common protocols.
- đ Dynamic ports are used for temporary communication needs when connecting to servers to request information or data.
- đ» The Windows Server 2016 operating system was used in the video to demonstrate how to identify running protocols, ports, and services.
- đ ïž Tools like Task Manager, netstat, and netstart can be used to view active network services and their associated ports and processes on Windows Server.
- đ The demonstration showed how to use a web browser to access services running on specific ports, highlighting the role of sockets in network communication.
Q & A
What are protocols in the context of computer networking?
-Protocols are rules that dictate how data is exchanged between machines in a computer network, allowing them to communicate effectively using networking protocols.
How can you identify protocols running on a Windows Server 2016?
-You can identify protocols running on Windows Server 2016 by looking at the processes and services tab in Task Manager or by using command line tools like 'netstat' and 'netstart'.
What is the difference between a physical port and a logical port?
-A physical port, like a USB or RJ45 port, is a hardware interface on a device. A logical port, on the other hand, is a number associated with a protocol to facilitate communication between networked devices.
What is a socket in computer networking?
-A socket is a combination of an IP address and a port number that identifies a specific process or service on a network, allowing for communication between networked devices.
Why are port numbers necessary in network communication?
-Port numbers are necessary to differentiate between multiple protocols running on the same computer, allowing the system to identify and route data to the correct service or application.
What are the three types of port numbers?
-The three types of port numbers are well-known ports (0-1023), registered ports (1024-49151), and dynamic ports (49152-65535).
What is the default port number for HTTP?
-The default port number for HTTP is 80.
What is the purpose of DHCP in a network?
-DHCP (Dynamic Host Configuration Protocol) is used to automatically assign IP addresses and other network configuration information to devices on a network.
What is the purpose of DNS in a network?
-DNS (Domain Name System) is used to translate domain names into IP addresses, allowing users to access websites using human-readable names instead of numerical IP addresses.
How can you demonstrate a socket in action using a web browser?
-You can demonstrate a socket in action by entering the IP address of a web server followed by a port number (e.g., http://192.168.1.1:80) in a web browser, which will attempt to connect to the server on that specific port.
What does the 'netstat' command show in Windows Server 2016?
-The 'netstat' command shows the status of active connections, including the IP address, port number, and the associated Windows process ID for each connection.
Outlines
đ Understanding Protocols, Ports, and Sockets
This paragraph introduces the concepts of protocols, ports, and sockets in the context of computer networking. Protocols are defined as rules governing data exchange between machines, with network protocols being essential for effective communication. The video uses a Windows Server 2016 virtual machine as an example to demonstrate identifying processes and services related to protocols. The paragraph explains that each protocol is associated with a port number, which is a logical construct rather than a physical one. The combination of an IP address and a port number forms a socket, which is crucial for differentiating between multiple protocols running simultaneously on a single machine. The need for ports and sockets is emphasized, as they allow a computer to manage multiple network applications at once.
đ Exploring Port Types and Their Functions
The second paragraph delves into the different types of ports and their functions. It outlines three categories of ports: well-known ports (0-1023), registered ports (1024-49151), and dynamic ports (49152-65535). Well-known ports are assigned to commonly used protocols, while registered ports are for less commonly used protocols that organizations can register. Dynamic ports are used by clients when connecting to servers for data requests. The paragraph also mentions that the video will cover popular protocols and their associated port numbers, using TCP or UDP, and provides a table for reference. The focus is on giving viewers an understanding of the variety of protocols and their port numbers.
đ„ïž Demonstrating Protocols and Services on Windows Server
In this paragraph, the speaker provides a live demonstration on a Windows Server 2016 machine to show how protocols, ports, and services can be identified within an operating system. The speaker has installed DHCP, DNS, and a web server (IIS) on the virtual machine to illustrate this. The paragraph explains that while viewers don't need to know the specifics of the setup, the demonstration aims to show the basics of identifying these components in an OS. The speaker uses Task Manager to show processes and services, and then moves on to using command-line tools like 'netstat' and 'net start' to provide different views of running services. The demonstration includes showing how to find the web server running on port 80 and DNS on port 53, and also attempts to access an unconfigured HTTPS port (443) to show the difference.
đ Conclusion and Call to Action
The final paragraph concludes the video by summarizing the content covered and encouraging viewer interaction. The speaker invites questions about the topics discussed, such as protocols, ports, and sockets, and how they were demonstrated on the Windows Server 2016 machine. There's also a call to action for viewers to like the video, subscribe to the channel, and check out the course mentioned in the video description for further learning opportunities. The speaker expresses appreciation for the viewers' time and looks forward to their presence in future videos.
Mindmap
Keywords
đĄProtocol
đĄPort
đĄSocket
đĄWell-known Ports
đĄRegistered Ports
đĄDynamic Ports
đĄIP Address
đĄDNS (Domain Name System)
đĄDHCP (Dynamic Host Configuration Protocol)
đĄIIS (Internet Information Services)
Highlights
Introduction to the concept of protocols as rules governing data exchange between machines in computer networks.
Explanation of network protocols as essential for effective communication between computers.
Demonstration of identifying network protocols as processes or services on a Windows Server 2016.
Clarification on the difference between physical ports and logical ports in the context of network protocols.
Description of how each protocol has a unique port number for identification.
Introduction to the concept of a socket, which combines an IP address with a port number.
Reasoning behind the necessity of ports and sockets for differentiating multiple protocols running on a single computer.
Example given of a server running FTP, HTTP, and DNS services on different port numbers.
Discussion on the three types of ports: well-known, registered, and dynamic, with their respective number ranges.
Overview of popular protocols and their associated port numbers, using TCP or UDP.
Live demonstration on a Windows Server 2016 machine to identify protocols, ports, and services.
Use of Task Manager to view processes and services related to installed network protocols.
Command line tools 'netstat' and 'netstart' used to identify active network services and their ports.
Explanation of how 'netstat' shows the status of connections, IP addresses, port numbers, and associated process IDs.
Demonstration of how DHCP, DNS, and IIS services appear in the command line and Task Manager.
Illustration of how a web browser uses sockets to communicate with a web server on port 80.
Conclusion summarizing the importance of protocols, ports, and sockets in network communication.
Invitation for viewers to ask questions and engage with the content for further understanding.
Transcripts
[Music]
in this video we're going to talk about
protocols ports and sockets so we
already introduced what a protocol is
earlier in the course and if you
remember they're nothing more than rules
that dictate how we communicate back and
forth so in regards to a computer
network protocols are rules that govern
how machines exchange data and are able
to communicate with one another
effectively so in other words computers
use protocols to communicate back and
forth specifically networking protocols
and as you'll see in this video and in
this section there are quite a lot of
them that we're going to cover now when
you look on the operating system
themselves if you want to see what
protocols are running they're typically
called a process or a service and i went
ahead and i created a windows server
2016 virtual machine for this lecture
and i installed dns dhcp and the web
server on there just to show you how we
can identify these processes and servers
on a windows server 2016. now in regards
to protocols protocols are always going
to have a port number associated with
them and when we're talking about ports
we're not talking about the physical
ports like a usb port or an rj45 port
we're talking about a logical port so
when we're talking about protocols they
have a logical port that is bound to
them with a specific number so when
you're looking at processes and service
specifically a specific protocol
you're going to notice that each one has
a specific port number assigned to it in
addition to that we can take it one step
further when we combine an ip address
with a port number we call those a
socket and i'm going to demonstrate
those as well so what you see right here
is we see the ip address of 192.168.1.1
and we bound it to port 80. that's
called a socket and i'm going to
demonstrate that to you later in this
lecture when we get on to the windows
server 2016 machine so that's protocols
ports and sockets let's jump to the next
slide where we talk about protocols and
sockets and specifically why we need
them
so why do we need ports and sockets well
the answer is very simple it's because a
computer can have multiple different
protocols running at once and we need a
way to differentiate one from another so
for example right here we have a server
with an ip address of 192.168.1.100
and we set it up as an ftp server as
well as a web server and a dns server so
ftp is running on port 21. http for the
web server is running on port 80 and the
dns server is running on port 53. so
what we have to do to differentiate ftp
from http and dns is we have to assign
them that logical construct that port
number so when we're looking to access
an ftp server or an http server or dns
server we can say okay i need to go to
this ip address and specifically this
port number because i know ftp is
running on port 21 where i need to go to
port 80 because i know the web server is
running on port 80 for http so that's
the whole purpose because if we think
about this from the perspective of being
a server it's going to be multitasking
with a variety of network based
applications and we have to have a way
to differentiate one from another and
that's the whole point of having these
port numbers and having these sockets
which i'll demonstrate later in the
lecture so that's the reason why we need
a port number and a socket we can't
simply just say okay we're going to
start up ftp we're going to start up
http and we're going to start dns and
not bind them to any port number because
if we didn't then the system wouldn't be
able to differentiate one from another
and it's as simple as that so when we're
talking about port types and port
numbers there's three different types
and they have a certain amount of
different port numbers associated with
them so the first ones are the
well-known ports and those are going to
be port numbers 0 to 1023 these are
assigned to well-known protocols and
you're going to see some of those on the
preceding next two slides after that
there are what we call registered ports
that are also assigned to protocols but
they're not assigned to the most
well-known or the most used protocols
but they can be assigned to any sort of
protocol that an organization comes up
with they can request to have it
registered and it would be registered
within this range of 1024
up to 49
151
and then lastly we have what are called
dynamic ports which we'll talk about the
purpose of them later in this course but
they're designed for us to be able to
use them for our needs when we're
connecting to a server to request some
information or some data from them we
have to assign ourselves what we call a
dynamic port and you're going to notice
that these range from 49 152 up to 65
535
so that is the purpose of ports and
sockets so now let's go ahead and let's
take a look at some of the more popular
protocols and their associated port
numbers and whether they use tcp or udp
now what i've gone ahead and done in
this lecture is i put some of the more
popular ones in a table view but i'm not
going to go over them one by one in this
lecture because we have multiple
dedicated lectures further on in our
preceding tcp sections where we talk
about a lot of these protocols in depth
i just wanted to give you an idea of how
many there are in regards to the more
popular ones so you have an
understanding of what we're talking
about so let's take a look at my windows
server 2016 machine now and take a look
at protocols running as processes and
services and also do a demonstration of
a socket
all right so now you're looking at my
windows server 2016 virtual machine that
i set up for this video as a means to
give you a live demonstration of how we
can identify
protocols ports and services running on
a specific operating system now i want
you to understand before i get started
that you don't need to know how to do
all the stuff that i'm going to
demonstrate in this video there are some
commands that we're going to cover later
in the course so don't worry if you
don't understand what those are and how
they work we'll talk about them in much
detail later in the course the whole
purpose of this video is just to give
you the basics of how you can look at
this stuff within an operating system
and windows server 2016 is pretty
straightforward so i decided to use it
now what did i do with this well i went
ahead i installed it and i also added on
a dhcp server a dns server and a web
server so the web server for windows is
iis if you don't know what tcp or dns
does don't worry you don't need to know
that in this video because we're going
to cover that in much more detail later
in the course but i just want to show
you how we can actually identify them
within the operating system so we can
see that they're up and running here
within server manager but there's some
other ways that we can take a look at
them as well so what i can do is i can
go into task manager so i'm going to
right click down here go into task
manager
and within the windows operating system
we can notice and see that there is a
tab for processes and services so let's
take a look at this
so what you're going to notice is that
there is a process for iis running right
here and if i get rid of the highlighter
so i can scroll down further
you're going to notice that there's one
for dhcp up here as well
and let's see if we can identify one for
dns
so they're not always named in the most
straightforward manner but there's
always multiple different ways in which
we can find different services so what
you're going to notice down here is that
there is a service for the dhcp server
and there's also one there's actually
couple running for our web server down
here now
i can't easily identify one for dns so
what we can do is we can go over to our
services tab and we can see we can find
over here as well and if i scroll down
what we're going to notice is that we
can see one for dhcp we can actually see
a couple for dhcp
and we can see a couple for dns so what
you're going to notice is that there's
actually a service running for the
server and the client the client would
be the operating system as a client
meaning that it's using a dns server and
it's using a dhcp server for ip
addressing and to identify dns
information which will talk about what
dns and dhcp is later in the course
you're going to notice that there's a
process id the process id is not the
actual port number that's an id number
that the operating system assigns to
each service
so this tells us some basic information
but if we're not able to find everything
that we want to find we can actually go
to the command line and find some
additional information so let's go ahead
and minimize task manager and i'm going
to go ahead and open up a couple of
command lines what i've done is i've
already run a couple of commands on the
left i've run a net stand with some
switches in regards to netstat it's
going to tell us the status of specific
connections ones that were listing for
our different services in other words
our servers such as dhcp dns or web
server ones that we've actually
established with other systems and it's
going to show us the ip address with the
port number and hopefully you're
noticing that this is a socket something
that we talked about over here the
foreign address is who we're
communicating with and again these are
going to be sockets and the state of
whether it's listing or it's established
and the associated windows process id
over here on the right
we have another command called netstart
and this is essentially just going to
tell us all the windows services that
are starting and running
so let's start off by taking a look at
our netstar command that's just going to
show us the services that are running
and it's the same thing as looking over
here within our task manager looking at
the processes and the services but it's
a different view it's directly from
command line you're going to notice that
there is a little bit of a difference so
the first thing that i want to highlight
is that we can see that we have our dcb
client and server that we talked about
earlier as well as our dns client and
server
and of course the ones that we're really
concerned with are the servers so we can
see that both of those are running but
one of them that i had a hard time
finding earlier was the web server so if
i scroll all the way down to the bottom
what you're gonna find is here in the
command prompt it calls it world wide
web publishing services so rather than
calling it iis it calls us world wide
web publishing services so that gives us
some basic information it confirms that
it's up and running so what we can do
now is we can take a look at netstat so
what netstat does is it shows us the ip
address with the actual port and the
process id
so for our web server
that's going to always be running on
port 80 unless we change it so http runs
on port 80 and so what you're going to
notice with netstat is that we see it
running right here so it tells us that
our server is listing on this port
number and when you see all xeros
that's the server telling us that on any
ip address that you assigned to me if
you give me multiple different network
interface card interfaces then every
single one of them is going to be
listing in on port 80 so we're going to
see that right there
and then also we see
port 53 down here
and also port 53 down here
and let's see if we see it up here we
don't teed up here and we also see port
80 down here so port 53
is a port associated by default with dns
so dns is going to be listing in on the
ip address to see the actual ip address
assigned to the system
and 127.0.0.1
you're going to learn about that later
in the course that's the loopback
address that's just another address for
this system and down here this is going
to be
port 80 for ipv6 as well listening on
any ipv6 address that we assigned to the
system as well so we see dns we see
our web server but we do not see dhcp so
why is that well dhcp runs on port 67
and 68 the reason that you don't see it
is because i actually didn't finish
configuring it i have to assign it a
scope and i have to enable that scope
but i didn't do that because i had this
connected to my network at home and i
don't want to run into any conflict
issues with dhcp that's running on my
soho router what i want to do now is
actually take a look at the web browser
and show you a socket in action so what
i did is went ahead and typed in the ip
address of the system using http which
is a protocol that we're using for this
web server and let me go ahead and hit
enter again just to show you that this
is going to load and this is the default
web page for the web server now what
happens if i do
a socket
because i know that this is running on
port 80 if i do a socket with port 80
you're going to notice that it reloads
and it just gets rid of the socket
because it already knows the web browser
knows that we're running on port 80 but
what happens if i try port 443 which is
for http secure which means it's
encrypted if i try doing port 443 what
happens and i'll hit enter again on this
but you'll notice that it cannot connect
because i don't have the web server
configured for http secure i only have
it configured for port 80 for http so
that's going to go ahead and conclude
this video
if you have any questions regarding
protocols ports and sockets please let
me know and how i did all this stuff in
my windows server 2016 how i set up dhcp
and dns and iis you actually don't need
to know that but again i wanted to do a
live demonstration so thanks for
watching and i'll see you at the next
video take care
well i hope that you enjoyed today's
video and you learned a lot from it if
you did please give this video a thumbs
up and also consider subscribing to my
youtube channel now if you're interested
in taking this full course or just
learning more about it check out the
video description down below because
i've included a link where you can learn
more about the course and enroll into it
if you'd like so again thanks for
watching my video i appreciate it and i
look forward to seeing you guys at the
next video take care
[Music]
you
Voir Plus de Vidéos Connexes
Common Ports - CompTIA Network+ N10-009 - 1.4
Introduction to IP - CompTIA A+ 220-1001 - 2.1
NW LAB 1. Basics of Socket Programming in C : TCP and UDP - Program Demo
Redes de computadores - Protocolo TCP IP - InformĂĄtica para concursos - Professor Danilo Vilanova
How To Configure DNS on Windows Server 2019 | Joining Client In Server 2019
SMT 2-3 Well known Network Services
5.0 / 5 (0 votes)