DEV Community

Cover image for TCP/IP and Networking basics for developers
SpanglishGaby
SpanglishGaby

Posted on

TCP/IP and Networking basics for developers

During our path to becoming a software engineer, we will hear some terms such as HTTP, URL, PORT, and IP, but how do all these terms connect?

Let's start to explain the way information moves from our computers to the internet.

First, let's examine the "TCP/IP" model. What is it? The TCP/IP model refers to the Transmission Control Protocol/Internet Protocol Model. This model is a part of the network domain designed specifically for overseeing efficient and error-free transmission of data. Basically, it is the software and hardware infrastructure responsible for making sure our website arrives at the end-user or connects to the servers.

It is divided into four layers, each representing a step that needs to be taken to move the information from one computer program to another:

1. Application layer: Here is where our website/code lives
Some of the protocols used in this layer are:

  • HTTP: Hypertext transfer protocol is used for accessing the information available on the internet.
  • SMTP: Simple mail transfer protocol, assigned the task of handling e-mail related steps and issues.
  • FTP: This is the standard protocol that oversees the transfer of files over the network channel.

TCP/IP

2. Transport layer: This is the suite of programs on your computer responsible for packetizing the data, standardizing the transmission speed, and making sure that the packets sent and received didn't get garbled along the way.
One of the most important protocols used in this layer is:

  • TCP: Transmission Control Protocol is responsible for the proper transmission of segments over the communication channel. It also establishes a network connection between the source and destination system.

One other important thing which is specified by the Transport layer is the source and destination port address. The port is used by the computer to determine which program should receive the message when it reaches the computers that you're communicating with.

3. Internet layer: This layer is responsible for making sure that your computer can communicate with other computers or network devices in general. One of the most famous protocols, the Internetwork Protocol has to do with making sure you have a unique communications address on a network so that messages can be sent from and to your computer.

  • IP: This protocol assigns your device with a unique address; the IP address is also responsible for routing the data over the communication channel.

4. Network Access layer: This layer is responsible for actually sending the ones and zeroes from one physical device to the next. Starting at your computer, the network access layer represents either the Network Interface Card (NIC) where an ethernet cable is plugged in, or the wifi modem on your computer which sends signals to the rest of the network.

avg.comPhoto: avg.com

In conclusion: why do we care?

It's necessary to understand because there are terms that we use daily, and we need to know where they come from. For example, every time we run tests, we point the browser to:

URL example

What does this actually mean?

First, we're telling the computer that it should try to use the HyperText Transport Protocol (http)

Second, we're telling the computer to talk to the computer called 'localhost'. The name 'localhost' corresponds to the loopback address on our computer, and has a default IP (127.0.0.1). It is useful for testing programs on your computer, without sending information over the internet. This helps when you are testing applications that aren’t ready for the world to see.

Finally, we're telling the computer to connect to 'port' 3000. If an IP address is like an apartment complex address, the port number is like the apartment number. It lets us make sure that our messages get to and from the right recipient once they reach the address we've specified. In a computer, every program should use a different port number!

In conclusion, we don't need to be networking experts, but it's always good to have extra information that clarifies what we're doing daily.

Additional information:
What is TCP/IP and what does it stand for?
TCP/IP: What Is the TCP IP Model?
What is a localhost

Top comments (0)