What is TCP/IP and how does it work?

If you want to know how your Facebook statuses are updated, your Snapchat’s are seen, or your Instagram feed is sent to your over-priced iphone, then read on to learn about TCP/IP and understand just how our computer networks work.

So, because our entire planets digital network infrastructure is built upon TCP/IP then if you learn everything you can about the subject here, you will understand almost anything you come across in Information Technology.

TCP/IP is like the holy grail if you are looking to study anything from networking with Cisco’s CCENT/CCNA, CompTIA Network+, setting up any Local Area Networks at home or even on a bigger scale, configuring servers, connecting Windows boxes to the internet or configuring and troubleshooting Linux, penetration testing.. everything!

That being said, there’s a lot that is going on here in TCP/IP and I won’t be going in to depth on any of it right here. My plan is to give you an overview of everything, but as time goes on I will be writing up individual posts about each topic and then I will link them here so bare with me on this one. You will thank yourself for studying this in time to come.

What is TCP/IP?

TCP/IP has a collection of protocols. If your not sure what a protocol is, a protocol is a set of rules for two computer systems to communicate with each other over a network. So when a windows computer sends some data to a linux computer for example, the linux system knows exactly how to handle that data. Each operating system has TCP/IP installed. In fact, every computer on the internet (this includes mobile phones) has TCP/IP installed.

You may hear about TCP/IP being a protocol suite. There are other protocol suites available but we don’t need to worry about any other suite here. TCP/IP is the suite we need to understand as it’s what we use for the internet and Local Area Networks (LAN’s).

It’s just a good idea to know that there are other’s out there. But for your computer to communicate with another computer over the internet then TCP/IP is what is used.

So now we know that TCP/IP has a collection of protocols that allow two systems to communicate with each other in various different ways, we now need to know that these systems need to find each other first before any data transfer can take place. Every system on the internet has an address. We call this the IP address. The IP part of the name “TCP/IP” is referring to the IP addressing system.

IP Addressing

IP version 4 is what we use today but IP version 6 has been slowly making it’s way in to networking over the past decade or so. The reason here is that more and more devices are connecting to the internet and IP version 4 addresses are running out!

Transport Protocols TCP and UDP

There are two protocols in the TCP/IP protocol suite that are used to transfer our data over the network. They’re called TCP and UDP. TCP is an acronym for Transmission Control Protocol and UDP is an acronym for User Datagram Protocol. The TCP is found in the name “TCP/IP.” So the name TCP/IP is named after the two most common protocols in the whole suite.

These two protocols (TCP and UDP) have the same job of transferring data over a network, but they do this job in very different ways.

TCP want’s to make sure that every bit of data has been sent over the network correctly, where as UDP doesn’t really care. UDP will send out the data and hope for the best. There are situations where this is preferred such as online gaming for example.

When we talk about TCP and UDP sending DATA, the correct term to use here is packets, not data. This is the correct technical term that’s used when we are dealing with the transport protocols of TCP and UDP. There are other terms used for our “data” such as Frames and Segments but these are not used for TCP and UDP and I will discuss this later in the ‘Theoretical models’ section.

Right now you are looking at this website. Your web browser is using HTTP. HTTP (Hyper Text Transfer Protocol) is a protocol which is part of the TCP/IP protocol suite. HTTP is sent over to you by using the TCP TRANSPORT protocol.

What is TCP/IP made up of?

There’s a lot going on here but we need to understand the various different protocols, some of which are transport protocols (TCP and UDP in particular), we need to know and memorize the OSI model and TCP/IP model, we need to know some of the most common port numbers and which protocol uses these common port numbers by default.

Theoretical models

The OSI model and TCP/IP model

We need to understand how computers communicate over a network and so we have two theoretical models that we really need to study and understand. This will help us greatly in understanding not just TCP/IP comms but if you’re going to sit any kind of entry level networking exam to gain a certification then this is what you most certainly will need to memorize, the TCP/IP model, the OSI model and how they both map to each other.

If you’re like me and you learn by doing, then it will most likely take a while before you remember these models as it is all theoretical. No practical learning can be achieved here I’m afraid to say.

Don’t let this discourage you from learning TCP/IP though, it’s just a hurdle we all need to go through. It’s not particularly difficult to understand what’s going on, just remembering the orders can be a little hard but this is where a mnemonic will eventually burn into your mind that you will never forget.

Ports, port numbers and sockets

Ports and Port Numbers

It’s a common fact that humans are terrible at remembering numbers. After all, one reason we use DNS is so we can remember website domain names in stead of having to remember IP addresses.

Note that DNS is also a TCP/IP protocol!

I mentioned earlier the HTTP protocol. By default, this protocol uses port 80.

But sometimes we just need to memorize a few things when it comes to learning computers. No more is this true when it comes to remembering ports and port numbers.

The first number I will throw in your direction right now is 65,535. Yes, I remember this number. This is the total number of ports that are available to us in networking with TCP/IP. The first approx. one thousand is reserved for common protocols.

Sockets

If we know what an IP address is, we know what a domain name is and we know what a port number is, then a socket is just the IP address OR a domain name with a port number appended, but separated by a colon “:” character. So for example, 192.168.0.10:22 and mywebsite.com:80 are both sockets. The first example is using an IP address with port 22 and the second example using a domain name with port 80.

If this is the very first time that you’ve been introduced to TCP/IP then you need to know that there are a LOT of protocols to learn. But in my opinion, you should understand the following protocols first:

DHCP hands out IP addresses, DNS servers resolve domain names to IP addresses, IP is the addressing of where data is sent, TCP and UDP are the transport protocols that work in different ways from each other, and ICMP sends data back and forth but this doesn’t use TCP or UDP as it’s used for network control messages.

There are some very common protocols that we would use on the command line to send files and commands for example. These are:

FTP and SFTP

SSH

Cisco CCENT

If you’re thinking about sitting the Cisco CCENT (Cisco Certified Entry level Networking Technician) exam, then this link will take you over to Cisco’s exam topics for the ‘version 3’ ICND1 (Interconnecting Cisco Networking Devices Part 1) certification.

By looking at the exam objectives, the following protocol list is what you would be expected to know for this exam. This list may not be exhaustive. Note that some of these protocols may also be Cisco proprietary:

TCP

UDP

CDP (Cisco Discovery Protocol)

LLDP

RIPv2

DHCP

TFTP

FTP

SCP

NTP

DNS

IP

CompTIA Network+

To get the latest exam objectives from CompTIA Network+, click here to be taken over to CompTIA’s website and enter your details and check the box marked “CompTIA Network+” to get the latest exam objectives. The following list is not exhaustive but these protocols are what CompTIA expects you to know for their entry level networking certification:

SSH

DNS

SMTP

SFTP

FTP

TFTP

Telnet

DHCP

HTTP

HTTPS

SNMP

RDP

NTP

SIP

SMB

POP

IMAP

LDAP

LDAPS

H.323

ICMP

IP

UDP

TCP

Note that some of these protocols may be used for Microsoft Windows systems.

Conclusion

Hopefully you have a good understanding of what the TCP/IP protocol suite is made up of by now. But don’t forget, I will be going into detail as much as possible on everything that I’ve mentioned here and there is a LOT of protocols to get through, but I will be creating separate post’s for each topic.

I will be returning to this post regularly to keep it updated!

I’ve found a great free ebook by IBM on TCP/IP which covers everything in more depth herewhich is well worth checking out.

Ad-Block Users

Please support me to create more content and exclude this site in your Ad-Blocker. I will try my best to keep ads non-invasive. Thank you

About Me

installtekz

Welcome to installtekz-online.com! This site is for young aspiring hackers who want to learn about Linux and Networking. I'm planning on adding a little Penetration Testing in the future too. From time-to-time I will also be throwing in some reviews of online platforms, hardware and any other computer/internet related topics I've been checking out. I'm a hobbyist in electronics, linux, networking and network security. My aim here is to bring you as much helpful content as possible by giving you my experiences I've had along my long and forever increasing journey of the computer world. You can also find some of my apps on Google Play & Amazon. hold on-to your hats, we're going down the rabbit hole..

Affiliate Disclaimer

“Some of the links on my blog are affiliate links, and at no additional cost to you, I will earn a small commission if you decide to make a purchase. Please understand that I have experience with all of these companies and I recommend them because they are extremely helpful. Plus, by using my affiliate links, you are helping me keep this blog up and running.” -installtekz

Newsletter

Email address:

Sign up with your email and receive the monthly newsletter, giving you a brief catch-up of my latest posts and any other relevant news.