The computer that communicate with each other are called nodes

In this document

  • Nodes, hubs and switches
  • Segments and bridges
  • Routers and routing

See also

TCP/IP networks are the most common type of network today. With such a network, a number of computers or nodes can communicate with each other. An important aspect of this communication is routing: getting data packets from one node to another, in particular from one node on one network to another node on another network.

A network is a collection of computers or other devices, commonly called nodes, that are able to communicate with each other. This communication takes place on different network levels. A network may use the Internet Protocol (IP) at one level and Ethernet at the level directly below it. This distinction is important because some parts of the network operate at the IP level and others at the Ethernet level.

The most common type of network (especially in the home) is the Ethernet network shown in figure 1, where all nodes are connected to a central device. In its simplest form this central node is called a hub.

Basically, a hub is a box with lots of connections (sockets) for Ethernet cables. The hub repeats all messages it receives to all connected nodes, and these nodes filter out only the messages that are intended for them. This filtering takes place at the Ethernet level: incoming messages carry the Ethernet network address of the intended recipient.

A problem with this approach is that hubs generate a lot of traffic, especially on larger networks. Most of this traffic is wasted, since it is intended for only one node but it is sent to all nodes on the network.

The computer that communicate with each other are called nodes

Figure 2: a basic network with a hub and a switch

A commonly used solution today is a switch. A switch still connects all nodes to each other, like a hub, but is more intelligent in which messages are passed on to which node. A switch examines incoming Ethernet messages to see which node is the intended recipient, and then directly (and only) passes the messages to that node. This way other nodes do not unnecessarily receive all traffic.

Since switches are more expensive than hubs, a low-traffic part of the network could be set up using a hub, with the more high-traffic nodes being interconnected to the switch. The hub segment is then connected to the switch as well, as shown in figure 2.

Segments and bridges

A large network can be divided into multiple parts which are called segments. Each segment can use its own network protocol, security rules, firewalls and so on. Nodes on different segments cannot directly communicate with each other. To make this possible, a bridge is added between the segments, as shown in figure 3.

The bridge lets packet pass that are destined for a host on the other side. This seems to turn the two segments into one big network again, but there is an important difference. Data packets generated on one segment and intended for that same segment are not passed to the other segment. This saves on data transmission on the network as a whole.

Routers and routing

The computer that communicate with each other are called nodes

Figure 4: two networks connected via a router

The above examples all presented a single network at the Internet Protocol level. Even when the network is segmented, all nodes are still able to communicate with each other. To connect networks, a router or gateway is used.

Routers and gateways

A router is connected to two different networks and passes packets between them, as shown in figure 4 to the right. In a typical home network, the router provides the connection between the network and the Internet.

A gateway is the same as a router, except in that it also translates between one network system or protocol and another. The NAT protocol for example uses a NAT gateway to connect a private network to the Internet.

Routing messages between networks

When a node on one network needs to send a message to a node on another network, this packet will be picked up by the router and passed on to the other network. Many nodes are programmed with a so-called 'default gateway', which is the address of the router that is to take care of all packets not for other nodes on the same network.

Routers maintain a so-called routing table to keep track of routes: which connections (to different networks) are to be used for which faraway networks. Some of these routes are programmed in manually, but many are "learned" automatically by the router. Modern routers inform each other about new routes and no longer working routes to make this as efficient as possible.

Figure 5 below illustrates how routers (and behind them, entire networks) may be connected. There are now multiple routes from the node at the left to the node at the right. Since routers transmit IP packets, and IP packets are all independent of one another, each packet can travel along a different route to its destination.

The TCP protocol that runs in the transport layer above does not notice this, although a user may notice if suddently the connection seems faster or slower. That could be caused by packets now following a different route that is faster or slower than the old one.

Security of routing

Routing data packets in this way is very efficient, but not very secure. Every router in between the source and the destination can examine every packet that comes through. This enables for example systems like Carnivore (in Dutch) to examine almost all Internet traffic. Using encrypted Internet transmissions avoids this.

An additional risk is traffic analysis. A router can see where packets come from and where they go to. Even if the content of the packets is encrypted, the source or destination address itself already reveals something about the communication. For example, a corporate IP address that sends data to a newspaper website may indicate leaking of business secrets.

Onion routing with systems like Tor avoid even this risk, although they are much slower than traditional routing systems.

Try the new Google Books

Check out the new look and enjoy easier access to your favorite features

The computer that communicate with each other are called nodes

The computer that communicate with each other are called nodes

Think about human communication in a way. Humans use language to communicate with each other. This communication can create a network where people are connected. To create a network means that there is a common medium that connects us all. It can be an idea, similar hobbies or the job but for computers, the link can be just a cable.

Introduction

Computer communication is similar to human communication. In fact, many aspects of computer science are similar to human behaviour. If you are curious about how this machine can communicate with each other and how the data flow over the network this article is definitely made for you. If computers seems to be a fascinating subject for your mind let’s say that computer communication can excite you in a way.

Before we dive into computer communications I want to give a brief structure of the article. First paragraphs provide general information about computer systems. Next we focus on more technical and detailed terms such as the computer networking and network protocols.

  • General info about computers
  • How computers can understand the programs
  • What is a computer network
  • How computers communicate over a network
  • What is the OSI model
  • Data flow over the network

Let’s begin with the fundamentals

Beginning with the basics of the basics. What is a computer? Why do we need computers? Can computers communicate with each other? How?

Well, hell yes they can. To begin with the computer is a machine created by humans for humans to improve the quality of their life. A computer is a machine which can process and calculate arithmetic and logical operations. Created to calculate those operations faster than human so it is a computational device on its core.

The combination of hardware and software is called a computer system.

The computer system processes multiple programs using the hardware in collaboration with the software. A program is a set of instructions made to perform specific tasks.

The first computer program was invented by the mathematician Ada Lovelace who was born almost 200 years ago. In 1843 she developed algorithms related to The Analytical Engine. She became known as a mathematician but also for her insight into computer science and the future of computers and their capabilities.

Checkout this timeline from computerhistory

But how do they understand the programs?

Computers can only understand the binary form 0 and 1. Programs mentioned before are written in a programming language by programmers.

Going from the higher-level programming language to a lower one the compiler converts the Whatever programming language to Assembly (closest to machine) language in order to understand it and process the operations of the program.

Computers process sequences of 0 and 1 !

The computer that communicate with each other are called nodes

Computers communicate over their own network

We are using the internet on a daily basis. This actually means that we are all connected in the same network. The Internet is a global network which connects all the users of the world and they can communicate at any time with each other from different places because they belong to the same network.

A network is a group of interconnections . It can be a group of smaller networks too. A computer network uses two or more computers that are linked to each other with network medium.

Users in the same network can use the same hardware (a printer) or software (same programs) and transmit different kinds of data like text, video, voice etc. Hardware is used to link each other for example the wire cables, the optical fibers or wirelessly connections.

The computer that communicate with each other are called nodes

Photo by Jonathan on Unsplash

Networks are divided into two different types. Those types are the local area networks and the wide area networks. The main difference is the range of connectivity within the network.

First let’s give a simple explanation of what a local network is.

By its name you can understand that the LAN (Local Area Network) can connect a smaller range of computers because it is based locally.

You can think that the local network focuses on connecting people that have something in common, for example the computers in a school class to let the students or the staff communicate or the computers of a company. The LAN can be a secure network only accessed and used by them. So now the LAN has authorized users using their IP address which is explained below.

Also how the network identifies the sender and the recipient is explained below.

Now let’s explain the wide area network. As the number of users grows then the Wide Area Network can be used to create a bigger network than the LAN.

Here comes the WAN which connects networks from larger geographical areas. Let’s say that the company has expanded their offices to different countries or cities and still wants to communicate with each other. WAN is used to transmit data between long distance areas or between different networks that are connected to a bigger one.

The speed of a WAN can be slower than LAN because of their amount of users and complexity but it depends on its settings.

Yes the Wan is used to connect the LAN’s. The Internet is a kind of a WAN, right?

How does the network identify which computer is the recipient?

Now we have a LAN already created. All the computers that belong in the same network we can connect them with a common cable which is called the Ethernet. When computer A (actually there is a user there) wants to send a message to computer B the message travels within the cable and goes into every computer in the network because they share the same medium.

But how does the network know the recipient of the message?

The message has a final destination, a recipient who waits to read the message and probably wants to exchange information back too. For the router to solve this problem every computer has a unique MAC address. This address ensures that the physical address of the computer is unique.

Every standalone computer has a dedicated address given by their ISP. The IP (Internet Protocol) address is unique for every computer that is connected to the network and of course defines them so that the computer can be recognizable. Separating by periods the IP address is four 8bit numbers like 192.168.1.8 and every set is a range from 0 to 255.

The Internet Protocol helps to send data in the same network. The data are sent via network packets. Every computer has a static IP and a public IP.

Your computer has a private IP dedicated to it. The ISP (Internet Service Provider) assigns an address to your device. This IP is stored in the router. The router has a routing table which collects all the private IP addresses (mobile, laptop etc) that are connected to this network. In every network you connect the ISP of the network assigns you a different IP for example if you connect to a public network like Starbucks the IP will change and provided by the provider that Starbucks works with.

The router helps a device to connect to the global network (the Internet) with a different IP, the public IP. The public IP is set by the ISP from a routing pool that assigns the addresses in every network. Public addresses can be dynamic or static but for now we will not stick into that.

I just want you to understand that your computer connects to a network and the network can identify it from its IP address. Within the network your computer can communicate with other computers that are interconnected with an Ethernet or a switch to the same network.

The Ethernet cable is a common medium for every computer in the network. Switch can be used to split the wired network. Multiple cables are connected to the switch which is responsible for data transmission. So if computer A wants to send data to computer B switch does not transmit the signal to all the computers that are connected. Switch keeps the MAC addresses and forward the message only where is necessary. Switch helps the network to avoid collisions.

The computer that communicate with each other are called nodes

Photo by Thomas Jensen on Unsplash

Now this is the place where computers communicate with each other.

  • Extra: How can I see my IP ?

Windows: Open windows terminal (cmd)- Windows key + R and type ipconfig or ipconfig /all

Linux: Ctrl-Alt-T and type ifconfig

The computer that communicate with each other are called nodes

The OSI model

Computer communications uses protocols which establish a set of rules for the communication to be successful and error free. The protocol architecture can let the data to transmit from a computer to another within a specific set of operations using hardware and software.

Every process like communication for example is defined by a model. In this case our model is the OSI (Open System Interconnection) model. This model has seven layers. For example, to understand it’s use the model makes it easier for a company to test in which layer their product software is crushed and why it is buggy because their product or the data has to pass between different layers.

It is a journey between different layers. Every layer uses different protocols. Every protocol can use different hardware or software. Εach level is not related to the previous one, ie if it shows errors then the problem exists at the specific level only because every layer has a different task to accomplish.

The seven layers of the OSI model:

The computer that communicate with each other are called nodes
Moving from bottom to top

How data move from layer to layer

In order to understand the basics we will cover the essentials of the data transmission from a layer to another one without the technical details.

Supposing that the ethernet is the medium now the data moves through it in the form of a signal. The data communication is all about the transmission of packets from hop to hop till the final destination. This is called the hop networking.

The computer that communicate with each other are called nodes
The hop Networking

Data begins their journey from the Physical layer which contains the cables, the physical transmission medium. Data is a signal. Those signals are interpreted in the form of 0 and 1 at the first layer. It is time to move on the second layer which is called the Datalink layer. It is responsible to frame the message in different chunks and find the network path that data will follow. Collects the Mac addresses of the nodes that belong to the same network and determines the path that frames have to follow from hop to hop (the hop networking).

Next we move on the Network layer (Layer 2) that works on the IP protocol. This layer collects the IP addresses from end to end hosts, the sender and the recipient which is the final destination. Then the Transport layer (Layer 3) relies on the IP protocol and creates a packet header that includes the MAC and the IP found before. Let’s explain it further below.

The Transport layer and the TCP/IP protocol

Transport layer is the fourth layer of the OSI model. Transport layer processes the amount of data, their rate and their destination. This layer has to work according to a protocol too.

This layer uses the TCP (Transmission Control Protocol). This protocol, known as a TCP/IP protocol relies on IP protocol from the Network layer (Layer 3).

Fourth layer ensures that data is error-free and delivered in a sequence without loss or duplication. Provides reliability and it is responsible for the complete control of data transfer before a session is established in the next layer. Also the transport layer is responsible for the packet’s segmentation.

Breaks large amounts of data into packets and this operation ensures data integrity. The main TCP operations are packet segmentation, message acknowledgment , traffic control and session multiplexing.

The path of nodes, the hops between the MACs and the IP addresses are known from the previous layers as said before. The TCP now appends information in every packet’s header which includes the source and the destination port, the sequence numbers, the Acknowledgment number and the checksum field.

The structure of a TCP header is shown below:

The computer that communicate with each other are called nodes

The ACK number contains the value of the next packet that the receiver waits from the sequence. In this way TCP provides reliability. For every data that fails and contains error the TCP provides retransmission and continues to send the packets that are error-free.

A connection has to be established between the nodes in order to exchange information. TCP is connection oriented and provides two way communication. The TCP connection is established within a three-way handshake. Like a literal handshake between the client and the server in order to get to know each other and exchange the data packets.

The computer that communicate with each other are called nodes
The TCP three way handshake between the client and the server

To continue on the next layers we will cover briefly how they work.

Now we are moving to the Session layer (Layer 5). It is responsible to open, maintain and terminate the session of the communication between the nodes. Also provides authentication mechanisms in order to verify the users (ie password validation).

Now the data moves on the Presentation layer. The compression and the encryption/decryption of the data are its main functions. Also known as a syntax layer because it handles the syntax that the next (Application) layer requires (ie ASCII translation).

It is clear that the Application layer support applications right? Supports SSL, FTP and SSH which will cover in details in another article maybe. Just note that this layer supports services like mails and file transfer and interaction with the applications.

Finally we have arrived at the last layer , the Application layer (Layer 7).

Our final step.

The Application layer is the highest level of the OSI model. This layer is closest to the end-user and supports client-server protocols like HTTP which is one of the most popular. Also supports DNS, FTP, HTTPS ,SMTP etc. Allows to fetch resources like the pages of the website (HTML, images, stylesheets). It is an abstract layer. Provides availability and allows users to interact with the software applications. File and email transfer, domain name services, login on remote servers are functions of the last layer.

Conclusion

This article covers the fundamentals of computer communications . Now you know how data flows from the cable as a signal to another computer in a readable form passing by different layers and protocols. Everytime you hit the Send button the data (signal) becomes 01010101 which moves through different layers according to the OSI model. And now you know the functions of every layer too! Cool, right?

There are a thousand details on computer communications but in this article I just wanted to share the basics.

We explored the surface so you may have questions now. For further reading I suggest an interesting book which is easy to read

The Stalling’s one!

  • Data & Computer Communications (William Stallings 1985)

Thank you for reading this article!!

🌐 Find me on Twitter and Github