ethernet cables & switch

What Is A Computer Network? – The Complete Guide

Computer network enables us to remain connected to other people and the world whether it is the office or home. Even knowing that we take it for granted. So, when that connectivity disrupts, we realize the importance of a computer network because then there is no email, file sharing, web browsing, social media, online news, etc.

In this computer networking tutorial, I’m going to present details about what a computer network is, its components, how it works, etc. So, it will help you to understand what is going on behind the scenes & you will realize the advantages of a computer network.

Hopefully, you’ll learn a lot!

The following table enlists what’s covered. Just click a link to reach your favorite topic.

Let’s dive in and learn about it!

What Is A Computer Network?

Simply put, a computer network is a collection of computers, servers, peripherals & network devices connected to each other. By virtue of this connection, different services like data sharing, email and Internet access are made available to users.

The best example of a computer network is the Internet, which connects people across the globe. Therefore without the Internet, we’ll be very limited in our reach to the outside world.

internet illustration

Read on to explore what are the components of a computer network & how they work together seamlessly to provide us different data services.

Components Of A Computer Network

A computer network takes a lot of things to work properly. I’ll try my best to explain them in an easy manner so that it’s understandable for you. Otherwise, a common person will find it difficult to comprehend technical terms.

Following are the main components of a computer network.


First of all comes the Node. You may have heard this term used by people. It is simply any device in a computer network that generates, routes and terminates data communication.

Nodes include hosts like computers (also called workstations), servers and network devices like switches & routers (explained later in the post). These devices when networked, can exchange data with one another.

computer workstations


Note: Server is a computer with specialized hardware, meant to serve requests of computers i.e clients over the network. Servers host different applications like email, file sharing, web sites, Internet access etc.

These machines always remain on to fulfill clients needs anytime!

They are mounted in a network rack, placed in a data center, along with other network equipment like storage, switches & routers.

server computer

Server Computer

servers & network cables

Servers mounted in rack with network cables 

What about data?

Network Packet

The data sent across the computer network is in the form of packets.

A packet is a formatted data unit – size in bits or bytes – sent through the network to its destination. It consists of two things: user data (payload) and control information. Control information contains details for delivering data like source and destination network address, error detection codes, and sequencing.

Control information is at the beginning and end of a packet while the payload is in between.  Utilizing this, a long message is broken down into packets and reassembled back once they arrive at the destination.

This method of using packets to transmit data is called Packet switching, which is the primary method of communication in computer networks worldwide.

The usage of packets for data sending results in efficient use of the transmission link. It is because when one user is not sending data, the link can be used for data from other users.

The following figure illustrates packet switching:

packet switching

Image credit: Oddbodz

Network Interface Card - NIC    

gigabit ethernet network interface card

Image credit: Dsimic 

NIC connects a computer or server to a computer network. It is made available inside the computer & has a connector that accepts a cable for transmission and reception.

In Ethernet networks, each NIC has a permanent Media Access Control (MAC) address which consists of 6 octets. Three of these octets (usually first ones) are assigned to NIC manufacturer and the other three are used for making MAC address unique.

This uniqueness avoids address conflicts between network devices. Institute of Electrical and Electronics Engineers (IEEE) ensures that every MAC address is separate and looks after the administration of MAC addresses.

An example of a MAC address is shown in the below picture. It is indicated by Physical Address.

mac address

TIP: You can see yours by going to command prompt in Windows (type cmd in Start menu) and then run ipconfig /all command.


Hub is an older network technology device that is used to connect devices on an Ethernet network. It contains multiple ports and works at layer 1 of OSI model.

A hub is a lot less efficient as compared to a switch because it sends data packets out of every port it has, except the port on which data was received. So, it can’t distinguish the actual recipient device(s). Because of that, it achieves lower network efficiency as there are a lot of packet collisions.

Hub has become obsolete now & replaced by modern network switches.


It is a device to connect two network segments (potions of a computer network) to form a single network. This network device filters the traffic between them at layer 2 of the OSI model.

Bridging is different from routing. The reason is that routing connects separate networks functioning independently while bridging connects two segments to form a single network.

Still with me? It will get more interesting now!


A switch is a network device that connects nodes by using packet switching to receive data and then send it to the destination device. It can be thought of as a multiport network bridge that works at layer 2 of the OSI model

28 port cisco switch

Image credit: Dsimic 

Some network switches are also layer 3 switches as they incorporate routing capability! These are called layer 3 switches or multilayer switches.

A switch connects different devices like PCs, printers, etc. through cables plugged into its ports as shown below. Unlike older network devices like a hub, a network switches only forwards data packets to the device(s) for which it was intended. It uses MAC addresses of every connected device to forward data.

switches with network cables

This packet switching increases the efficiency and security of the network by directing the flow of traffic.

rackmount ethernet switches

Two Ethernet switches mounted in a rack with patch panels (black) at the top -- Image credit: Dsimic 

A network switch plays an integral role in Ethernet local area networks (LANs). It has multiple ports (slots for connecting devices) to have star network topology (discussed later) and attaching additional switches.


A router is a device responsible for connecting different networks i.e internetworking.

A router is a layer 3 device.  See OSI model for details about layers.

It forwards the packets from one network to another which is called routing. It is done by first reading the network address information – Internet protocol (IP) information from layer 3 of the OSI model – stored in these data packets which contain the destination address.

network routers

Two Cisco routers mounted in a rack -- Image credit: flickr

Routing table stored in the router uses that address information to determine the best route to data’s destination. A routing table is basically a table with routes to different networks or devices. After determination of the path, that router sends the data to the next network in its journey.

It is a very simple explanation of how a router works!

Are you getting all this?

Routers are major devices on the Internet that direct traffic in the form of data packets.

Click to Tweet

Internet traffic – like a web page or email – travels from one router to another router through different networks, which form an internetwork like the Internet, until it reaches its final node.

You can check the following video to get a clear idea of what is a router. Very helpful for beginners!

Routing Protocol  

The routing table of a router is built up either by static routes configured manually by an administrator or router can use a routing protocol to learn routes dynamically. This table lists the best paths to the other networks.

Routers use many different types of routing protocols. It is their feature to learn routes automatically with the help of other routers nearby and adjust to changing conditions like a link going down and find an alternate path around it. This results in high availability of data services on network and Internet.

A routing protocol is internal to the router.

Note: A network protocol is a set of rules that determines how the data is transmitted between different devices on the same network or between different networks. It basically allows different devices to communicate with each other regardless of their structure or design.

Usage Of A Router     

Following are example scenarios where a router is used:

  • The simplest form of a router is the one used in homes that connects devices like PCs and smartphones to the Internet, like a Wi-Fi router.
  • Router in an organization connects a LAN to a WAN.
  • Enterprise routers connect large businesses or ISPs – Internet service providers – to Internet backbone (main links to the Internet).

As we have covered hub, router and a switch until now, you must see the following video. This video makes differences between them very clear:                 

Let’s talk about security too:


computer network security

A firewall is separate network hardware that keeps the security and access of a computer network under the radar. Its function is to reject unknown requests and allows authentic ones, at a very basic level. It does so on the basis of security rules residing inside.

A firewall stands between an internal trusted network and an external untrusted network (like the Internet) to prevent any attacks meant to hack or disrupt network services.


Image credit: Bruno Pedrozo

Types Of Firewalls  

There are two types of firewalls: Network firewalls and Host-based firewalls.

  • First one checks the traffic between two or more networks and it runs on as a special network hardware appliance or general-purpose hardware running software application. This type is relevant to us now.
  • Second one – host-based – runs on computers and monitors the traffic coming in & out of these machines. It runs either as a service of the operating system or as a third party software application. The following picture shows a Windows 10 native firewall:
windows builtin firewall

How A Network Firewall Works  

This firewall monitors the data packets coming in the network based upon certain rules like source and destination address, protocol, source of data, etc. Therefore the packets are dropped or accepted based upon these conditions. Legitimate traffic includes web pages, email, file transfers, etc.

It detects if any unwanted application or service is trying to bypass the firewall and blocks it before it penetrates and does any damage.

cisco firewall

A Cisco firewall -- Image credit: flickr

You might be thinking about how all things get connected, read on:

Network Cables  

In order to have nodes on the network being able to communicate and share data with each other, they must be connected to each other by some media. Network cables provide them that connectivity. These cables are of different types, the most commonly used are detailed below:

Twisted Pair 

colored twisted pair network cables

The twisted pair cable is mostly used in home & corporate Ethernet networks (read here what is Ethernet). Made typically with copper, twisted pair cabling is used for comparatively shorter distance as compared to optical fiber cables (explained later).

This cable can send data at the rate of 2 Mbit/s to 10 Gbit/s!

twisted pair cable

These cables are twisted together in order to cancel electromagnetic interference from other wires and sources. Twisted pair is used based upon the needs as explained below:

1. Patch cable: Also called patch cord or straight-through cable is used to connect different devices like a switch to a computer or router to a switch etc. This is of different colors and short in length, no more than 10 meters. These cables are mostly used in patch panels of a network rack to connect a switch.

Note: Patch panel in a network rack is a panel with multiple ports to connect incoming and outgoing network cables. Cables running from devices like PCs and printers terminate on it. Patch cables connect these cable ends to a switch mounted in the same rack through ports on the patch panel.

Patch panel is mainly used for centralized & efficient cable management.     

See this video to clearly understand what is a patch panel, why and how it is used.    

2. Crossover cable: It is a type of twisted pair cable used to connect devices of the same type with one another directly instead of through a hub or a switch.

An example can be like connecting two computers together through their network cards or two switches that can also be linked through a crossover cable. It is also short in length.

The pairing of a crossover cable is different than that of a patch cable. It is shown below:

network crossover cable ends

3. Structured cabling: It is another application of twisted pair cabling. It is the cabling of a building or campus that has data center(s), different rooms, halls i.e. structures. Hence it is called structured cabling.

Structured cabling use longer twisted pair cables as compared to two types just explained. The reason for this: the bigger structures that need to be connected with distant data centers.

Structured cabling is basically the overall design & installation of a cabling system that will support current needs as well as that of the future. It defines the rules to lay the cabling, types of cables used – twisted pair and /or fiber optic, topologies to lay the cables, etc.

Structured cabling improves the reliability and eases the maintenance of the cabling infrastructure.

structured cabling

Structured cabling -- Image credit: Lanil Marasinghe

network rack in datacentre

Network rack in a data center

You need to see this video for understanding twisted pair cables and get additional details not mentioned in this post!

Fiber Optics 

Fiber optic cable is used for covering network requirements over a long distance or for applications requiring higher bandwidth i.e. speed and response time. More expensive than twisted pair cable, this cable is made up of one or more optical fibers (made of glass or plastic) surrounded by plastic layers and a protective tube.

fiber optic cable 2

Image credit: Srleffler

Plastic fibers are used for very short range while those made of glass are capable of short to long-range communication. These cables are very strong but environmental conditions can affect their strength.

The most interesting part is:

Modern fiber optic cables can contain thousands of fibers per cable and can transfer data at the speed of up to terabytes per second over a distance of many kilometers. That’s why undersea cables use optical fibers to provide Internet access around the world.

fiber optic cable

Fiber optic cable with connectors

Computer Network Topologies

Network topology is the actual layout of a computer network that specifies how the nodes are connected. In contrast, the physical layout of the network is the one seen by the eyes as how cables are laid out and devices are placed. It may appear different from a topological one & is less important.

Network topology is related to the physical layer of the OSI networking model.

Different network topologies can affect the throughput (speed and response time) of a computer network in their own way but reliability is very important: so that a single failure doesn’t bring most or in worst case the whole network down.

Types Of Network Topology  

Local area network or LAN – a common network type – uses different types of these topologies which include Bus, Star, Ring and Mesh.

Bus Topology  

In this topology, all nodes are connected to a single network cable, called bus, through connectors:

bus network topology

All data transmitted over this central cable is received by every node connected & the intended recipient accepts it. Others discard it if their address is not matched.

Advantages: Since a single cable is used, it is less costly to implement and easier to manage. Further, it is suitable for small networks and if one node fails then others will not be affected.

Disadvantages: In the case of a network built on bus topology, a single failure in a cable can render it entirely useless. It is also slow with many nodes and there is a chance of data loss as there are data packet collisions. Additionally, in this topology, network faults are also difficult to find.

Star Topology   

One of the most common layouts of a LAN, in this case each node like a computer, printer, or any other is connected to a central hub or switch.  This central device acts like a server and nodes are its clients.

It may appear different physically then shown in the figure but a central device – through which all traffic passes – connects all the nodes.

star network topology

Image credit: Umapathy

Usually twisted pair cable or fiber optic cable is used for this topology. In case of a cable fault, only the node connected through it will be affected, not the entire network.

In addition to wired networks, a Wireless LAN is also an example of this topology. In this case, every wireless client connects to a central wireless access point.

Advantages: It is the easiest layout to implement; also expand by adding additional nodes. It is good for a large network also.

Disadvantages: It is more expensive as compared to a Bus topology because a lot of cabling is needed to connect PCs, printers, servers, etc. to the central switch. Another drawback is: central switch or hub is a single point of failure which means if it goes down, the whole network will be non-operational.

Ring Topology  

Here every node is connected to the node on its left and right. You can think of it as another form of a bus topology but in a closed loop.

ring network topology

When one node sends data to another, it passes through each one in the way until it reaches the destination. That data is kept strong by repeating it through every node coming in the way. If one node is down then the communication is broken between nodes before and after it.

Advantages: It performs better than bus topology under heavy load.

Disadvantages: Moving, adding or changing devices can cause problems on the network.

Mesh Topology 

Mesh topology is a bit different from those mentioned above.

In a partially connected mesh network, any node in this topology can be connected to any number of nodes as decided. It is not fixed but a node must be connected to at least one other node in this layout, some can be connected to two or more than two nodes.

partially connected mesh topology

In the picture above, green circles illustrate nodes while lines are the cables that connect them.

This setup saves the cost of connection between every node. The lack of dependency on one node makes it possible for other nodes to send information.

Mesh networks can use flooding (a packet is sent through every link) or routing to send information. When using routing, it can adjust when a node goes down or the connection breaks as it can find an alternate path to send data. So it is reliable and can adjust itself.

Fully connected mesh topology also called a fully connected network has every node connected to every other in the network. They are reliable as a problem in a cable can affect only the nodes attached to it.

fully connected mesh topology

These fully connected mesh networks are costly as more cabling is required and it increases as more nodes are needed. High reliability justifies this additional cost as there are multiple data paths due to a large number of links between nodes.

This fully connected topology is mostly used in military applications!

Wireless networks mostly use mesh topology, but it can also be applied to wired networks.

Bottom line: More interconnections in a computer network result in fewer chances of it going down entirely as there is no single point of failure. This seems good but this type of network costs more to build up.

Want to know kinds of a network? Extend your reading below:

Types Of Computer Network 

Different types of computer networking are in use today and their variations depend upon the purpose, size or geographical needs. Networks can differ in size from few devices in a single room to millions of devices across the world. The application of computer network depends upon the needs as explained below.

This section will help you to get the various uses of computer network.

I’m explaining the most prominent kinds below:

Local Area Network (LAN)           

LAN is the most popular type of a computer network & is used to connect nodes like computers, servers, switches and other peripheral devices like printers in a limited physical area. Examples of its implementation scenarios include homes, offices, labs, schools, colleges, etc.

Wired LANs mostly use Ethernet technology as their implementation standard. The following figure shows a LAN using a bus topology.


Image credit: T.seppelt

LAN differs from a Wide area network – WAN – (read below) as it has higher data transfer rates, limited geographical scope and different links for connectivity. Currently, LAN networks can have data transfer rates of up to 100 Gbit/s.

LAN can be connected to a WAN and also get Internet access by using a router.

LAN Cabling 

LANs mostly use twisted pair cables for connectivity of end-user devices like PCs, printers, etc. Fiber optic cables are also used but mostly for connectivity between switches.

LAN provides services like Internet access, email, file sharing, etc. among many others to all users on the network.

Wide Area Network (WAN)

A WAN is a computer network that covers much larger areas as compared to a LAN and can encompass a city, country or even different countries. Usually, it connects a LAN to another LAN which are separated geographically.

WAN technologies work at the lower three layers of the OSI model: the physical layer, the data link layer and the network layer. These are used to transmit data over long distances.

wide area network

Image credit: Harald Mühlböck

Largest WAN is the Internet which consists of networks and links connecting billions of users across the world. 

WANs are mostly owned by organizations themselves so they are private, not public. Others built by ISPs connect a home or office LAN to the Internet.

WAN Links  

Links of WAN can be of cables, fiber optics or aerial like satellite links, radio waves. These links are often leased from service providers.

Advantage: Companies, educational and government institutes use WAN to connect staff, students and clients across various remote locations. Businesses need it to function properly. It helps users in one location to connect and communicate with others in a distant location.

Disadvantages: WAN is very costly to set up and is difficult to maintain. There are more issues because of the involvement of wired as well as wireless technologies. In addition to that more technical expertise & support are needed to keep it working.

Metropolitan Area Network (MAN) 

This type of computer network connects different LANs in a city or a campus & forms into a larger network. Since it is limited to a city that’s why it’s called Metropolitan.

Companies use this network to connect offices within a city. Point to point links connect different LANs within a metropolitan area.

Note: Point to point link is the connection between two nodes so that only they can talk to each other. In contrast, point to multipoint is the connection in which many nodes can receive the information transmitted by a single node.

MAN Links

Mostly used medium is fiber optics.

Personal Area Network (PAN) 

As the name shows, this type of computer network is personal!

It is the network of computer(s) and other technology devices that belong to a single person. Devices that comprise this network include personal computer(s), printers, fax machines, smartphones & tablets.

PAN has a very short range of around 10 meters. In this network, devices communicate between themselves or connect to the Internet through a gateways device like a Wi-Fi router.

PAN Links

Wired links, as well as wireless, can be used to make the connection. Wired connection is formed by a USB cable while Bluetooth or Infrared enable wireless PAN.

PAN can be used by anyone at home to connect all of their devices.

Here’s the video that shows different network types. It’s helpful to see them visually.

Campus Area Network (CAN)

LANs within a limited geographical area interconnect to form a CAN. It is owned by a company, government or an educational institution that has multiple buildings within a campus each having its own network and they all are linked to form a CAN.

The networking components like switches, routers, cabling (fiber & copper) are owned by the campus tenant or owner.

A very good instance of a CAN is a university that can connect academic sections, offices, library & student hostels with each other.

Wireless LAN (WLAN)

Until now we have discussed computer networks that involved wires or cables for connectivity. Their wireless counterpart – WLAN – also has become very common.

WLAN helps to connect one or more devices wirelessly to a central device like a wireless access point. WLAN uses radio waves for communication.

Note: Wireless access point or WAP is a network device that connects Wi-Fi devices to a wired network.

Different Wi-Fi devices like laptops, wireless desktops (need to have wireless network interface card), tablets and smartphones can connect to this type of LAN.

WLAN is marketed under the Wi-Fi brand name.

WLAN Applications

It has a lot of applications!

This type of network is easy to install so it has become a popular choice, especially in homes.

WLAN is implemented in a limited area like homes & large areas like offices, campus buildings, schools, etc. and benefits people to move around while remaining connected. It is also used as a mobile network on airplanes and trains.

Users of a wireless network can connect & use different services like file sharing, email, Internet etc.

Want to know about a technical but important term? I’ll explain:

What Is Ethernet? 

In this post, you have read the word Ethernet & it’s quite possible you may have read or heard it somewhere else also.

So the question comes to mind: “What does that term mean?”

Ethernet, sometimes also called LAN, is a family of networking technologies commonly used in a wired LAN. It is also adopted in metropolitan area networks (MAN) and wide area networks (WAN).

Ethernet is described by a set of standards published by the Institute of Electrical and Electronics Engineers (IEEE). It was standardized in 1983.

Following points will further explain it:

Characteristics Of Ethernet  

  • Ethernet uses both copper (twisted pair) and fiber optic cables to transmit data.
  • It works at layer 1 and layer 2 of the OSI model.
  • It uses packets to transmit data. Each packet contains source and destination address (MAC addresses) and error-checking data to detect and discard damaged frames.
  • The reason for its success and replacing earlier wired LAN technologies is the ability to adapt new standards like supporting new fiber optic cable speeds.
  • The transmission speed of Ethernet has grown exponentially. From initial 2.94 megabits per second (Mbit/s), now it supports 400 gigabits per second (Gbit/s).
  • Ethernet is widely used in homes and corporate environments. It integrates well with Wi-Fi, the wireless network technology.
  • Internet Protocol (IP) traffic is usually carried through Ethernet networks.
  • Modern Ethernet networks use switches to connect network devices through separate cables. This eliminates wasted bandwidth and data collisions. Older Ethernet networks (without a switch) that used a single coaxial wire to transmit data, resulted in problems just mentioned.

You can get an idea from following simple figures:

original ethernet

Original Ethernet -- Image credit: Tomateus 

modern ethernet

Modern Ethernet -- Image credit: Juan José

The following figure shows an Ethernet port for connecting network cable.

ethernet port

Image credit: Amin

Due to Ethernet now being very common and decreased cost of hardware, most manufacturers now build a network interface card (NIC) directly in a PC or server. So, there is no need to install a separate NIC.

What Is OSI Model? 

The Open Systems Interconnection model (OSI model) is a conceptual model created by the International Organization for Standardization (ISO).

This model defines and standardizes the communication functions of computer systems with different underlying structures and technology. It helps them to interoperate with the help of standard communication protocols.

OSI model helps vendors and developers to create hardware and software products that can easily integrate & work with each other in a computer network.

OSI is the universal model for computer networking. 

7 Layers Of OSI Model

This model describes how data is sent and received in a computer network. It breaks down a computer networking system into 7 theoretical layers & each layer has a role in how that data dispatches and arrives at its destination.

The layers are stacked upon each other as presented below:

osi networking model

Image credit: JB Hewitt

As already told, each layer has a specific function. It serves the layer above it while it is served by the layer below it.

For instance, a layer that is responsible for providing communication without errors in a network helps the applications above it by providing them the route or path they can take. Similarly, it asks the lower layer to send the data which has the details of that route.

As I have introduced the OSI model and its layers, now get into the details of every layer one by one.

We will go from top to bottom because human-readable information travels down the seven layers on the sender’s side and goes in reverse order on the receiver’s end.

So start with the Application layer……………and end with the Physical layer!

Layer 7: Application 

This layer is the closest to the user as it is what he/she sees. It deals with the data presented by the user. Applications include email clients like Microsoft Outlook and web browsers like Google Chrome which rely on this layer to initiate communication.

These software applications are not part of the application layer; this layer looks after protocols and data fetching that the particular software application needs to present the required information to the person.

Examples of the protocols which work at this layer include:

  • DNS – for converting human-readable names into machine-readable names (IP address)
  • FTP – for transferring the files
  • HTTP – for web browsing
  • SMTP – for email access

Layer 6: Presentation 

The presentation layer, as the name shows, has the task of preparing data for the upper Application layer. You can also say that it makes the data presentable for applications to use.

This layer translates the data in addition to encrypting and compressing it if required.

If the encoding of a sending device is different from the receiving device, this layer converts it into a form that the application layer of the receiving device can use.

If the encryption channel is used then layer 6 is responsible for encrypting it on the sender’s end as well as decrypting it on the receiver’s end. Objective is the same: to make the task easy for layer 7.

Third task and a very important one that this layer does is compressing the data received from the application layer before forwarding it to layer 5. It increases the efficiency of the network by improving speed as the data size is reduced.

Layer 5: Session 

The session layer is responsible for opening and closing a connection between two devices like a computer and a server. The time elapsed between opening and closing communication is called a session.

In order to ensure efficiency, this layer makes sure that all data is transferred and then closes the session to save resources.

In addition to above, it also keeps a record of data transfer – checkpoints. For example, if the transfer of a file like 100 MB gets broken or disconnected after transferring around 40 MB or anything, the session will resume from there. So, only 60 MB will need to be sent, not the whole 100 MB.

Layer 4: Transport 

The transport layer manages the data transfer between the source and destination hosts.

This involves taking data from the session layer and breaking it into segments before dispatching it to layer 3 – happens on the sender’s side. At the receiver’s end, this layer reassembles the segments back into data that layer 5 can use.

In addition to braking data, this layer performs 2 more functions within networks:

  • Flow control: It ensures that transmission speed is good enough for the receiver with a slow connection so that a sender with a faster connection doesn’t cause problems for it.
  • Error control: The transport layer also ensures that the data received by the recipient is complete & without errors. It requests a retransmission if it’s unfortunately not the case.

Layer 3: Network

In order to transfer data between nodes on two different networks, the Network layer takes responsibility. It is not needed if two nodes are on the same network and want to communicate with each other.

The network layer further breaks up the segments created at the transport layer into smaller units – packets – at the sender node. It then reassembles them at the receiving node.

One of the main functions in computer networks – routing – is performed at the network layer. It means that finding the best route to another network is done at layer 3 of the OSI model.

Routers work at the network layer. IP addresses are also used at this layer.

An example of routing: Your computer in New York wants to connect to the email server in Washington, but there are a lot of different network paths to take. Routers at this layer will make this task easy.

Layer 2: Data Link

Like network layer, the data link layer also transfers data between nodes but with an exception: it does so on the same network.

This layer receives packets from the network layer and breaks them further into frames. Data link layer also looks after the flow control and error control within a network. It handles error correction for data coming from physical layer i.e. the layer 1.

MAC addresses are used at layer 2 of the OSI model in Ethernet networks.

In computer networking, bridges and most of the switches operate at layer 2.

Layer 1: Physical

The function of this layer is obvious from its name: the physical things involved in data transmission like computers, cables, hubs, etc.

All of these work at the physical layer to transfer data from one node to another.

Seems technical and dry! Let’s simplify it:

Example Of OSI Model

In order for you to understand this layered model, I’ll try to make it clear by showing how an email goes from sender to receiver.

I will send it and you will receive!

Sender’s End

  • I compose an email in Outlook client software on my PC and click send.
  • The Outlook software will pass email to the application layer. This layer will pick the protocol for email sending i.e. SMTP and pass the data to the presentation layer.
  • The presentation layer will compress the data, then pass it along to the session layer.
  • Session layer will start the communication session.
  • After getting to the transport layer, data will be broken into segments and passed to the network layer.
  • Network layer will break segments into packets and forward them to the next layer.
  • The data link layer will break packets into frames. It will next pass them to the physical layer.
  • Physical layer will convert the data into digital format (bit stream of 0s and 1s) & then dispatch it through a medium, like a cable.

Receiver’s End

  • You will receive the bit stream through a medium like a cable or Wi-Fi on your computer. It will go through the same series of layers but in the opposite order.
  • The physical layer will convert the bit stream of 0s and 1s (created in last step above) into frames and pass them to the data link layer.
  • At data link layer, these frames will be converted to packets and then forwarded to network layer.
  • Network layer will convert packets into segments for the transport layer.
  • Transport layer will reassemble the segments into one piece of data.
  • Session layer will then receive the data, which will pass it on to the presentation layer. Now session layer will end the session.
  • Presentation layer will now remove the compression and pass the raw data to the application layer.
  • Finally, the application layer will give human-readable data to your email client software. It will enable you to see my email on your PC.

Sometimes, a visual presentation like images or video explains something better than text. Therefore I have included following OSI model video which will be helpful for you:

Remember The OSI Model 

In order to remember the layers of this model, the following sentences can help. The first letter of each word shows the layer:

From Application To Physical (Top To Bottom)  

All People Seem To Need Data Processing

From Physical To Application (Bottom To Top) 

Please Do Not Throw Sausage Pizza Away

How nodes get an address?

What Is An IP Address

During the use of computers, smartphones, the Internet etc. you must have heard the term IP address many times. Don’t have any idea what it is, I’ll try to explain in this section.

IP address stands for Internet Protocol address.

First, let’s talk about the Internet Protocol.

Internet Protocol (IP)

Internet Protocol is the primary computer network protocol used to send data within a packet switched network and especially across the networks.

As IP works on the network layer, it is mainly related to routing & is the protocol that the Internet uses. 

The IP is a protocol that uses datagrams (network packets) to communicate over a packet-switched network. It delivers them from source to destination based on the IP addresses in the packet headers.

Internet Protocol Versions 

There are two versions of IP in use today:

  • IPv4: First major version of this protocol; it is the main protocol of the Internet as it still routes most of the traffic.
  • IPv6: Successor of IPv4, is increasing in deployment across the Internet. Internet Engineering Task Force (IETF) developed IPv6 in order to address the issue of IPv4 address depletion.

After explaining what the Internet Protocol is, now we’ll discuss the main topic.

IP Address

An IP address is a numerical address assigned to devices – computers, smartphones, hotspots – on a computer network that uses the Internet Protocol for communication.

Just like a postal address is the address of a home or an office, IP address is the address of a device on a network.

It can be a private or public network. Biggest public network, the Internet, uses IP addresses for linking billions of devices around the world.

An IP address has two functions: One, It identifies the network and second, it provides address of the node on the network. The header of each IP packet contains IP addresses of the sending node and the destination node.

An IP address is written as a series of numbers separated by periods or colons. Because IP has two versions, therefore IP addresses are also based upon them:

IPv4 Address 

IPv4 address uses 32 binary bits to create a distinct address for a device on a computer network. This address uses four decimal numbers separated by dots. Each number is called an Octet.

For example, is an IPv4 address.

Note: The numbers like 172 are decimal numbers because they are based on 10 digits i.e 0,1,2,3,4,5,6,7,8,9. Decimal numbers can range from 0 to 255. The binary numbers are based on only 2 digits i.e 0 & 1

The following picture shows the example of an IPv4 address:

ipv4 address

As you can see, every octet in this IP address is equivalent to 8 binary bits of 0s and 1s. So, there are a total of 32 binary bits in an IPv4 address. IPv4 was first used in 1983.

As IPv4 has 32 bits so an IPv4 address can have up to 4294967296 (multiply 2 with itself 32 times) or just under 4.3 billion unique addresses. Of these, some are reserved for private networks and others.

Examples of addresses reserved for private networks are & These addresses are ignored publically which means these can’t be used on the Internet. Homes and enterprise environments can only use them. 

IPv6 Address 

As Internet usage exploded, it was realized that IPv4 addresses were insufficient for the future. IPv6 was developed in order to overcome this limitation.

IPv6 is longer than IPV4 & supports a lot more addresses. It is shown here:

ipv6 address

Another example of this address is 2001:db8:0:1234:0:567:8:1. It consists of 128 bits which are divided into 8 groups of 16 bits each. Each group is written as four hexadecimal digits and groups are separated by colons (:).

The length of IPv6 is 128 bits compared with 32 bits of IPv4. So, there are 340,282,366,920,938,463,463,374,607,431,768,211,456 unique addresses (multiply 2 with itself 128 times!).

IPV6 was standardized in 1998 and deployment began in the mid-2000s.

Data on the Internet travel in the form of network packets. The packet format in IPv6 is different and more simplified than IPv4. It has resulted in simplified packet forwarding by routers.

Some Important Points About IP Address

  • Today these two versions of the Internet Protocol – IPv4 & IPv6 – are in simultaneous use.
  • Due to fundamental differences between these two versions, both can’t work with each other. So, direct communication between them is impossible.
  • As private IP addresses are reserved for use in homes and corporate environments, public ones are meant only for the Internet.
  • Network administrators assign these IP addresses to each device connected to a computer network. This assignment can be static or permanent i.e manually done or dynamic i.e. assigned by a server.
  • Internet Assigned Numbers Authority (IANA) manages both versions of IP addresses globally & oversees the allocation of these addresses.
  • You can just Google “What is my IP address” to see your current IP address or visit What Is My IP Address to see your ISP, city, region & country also.

This post would be incomplete without mention of the biggest network in the world.

Biggest Computer Network

After reading this post, you must be aware by now that the Internet is the largest network in our world.

The Internet is the network of networks. As of 2020, it is estimated that 4.5 billion people use the Internet.

Click to Tweet

Across the globe, it connects millions of individuals, businesses, government agencies & educational institutions through electronic, wireless and optical fiber technologies.

How The Internet Has Affected Us 

This internetwork has dramatically changed how we live because:

  • The Internet has reshaped or even replaced traditional media like telephony, radio, television, newspapers, paper mail; giving birth to email, Internet telephony, online television, online music, digital newspapers & video streaming.
  • Other additions include Blogging (knowledge sharing), instant messaging, Internet forums etc.
  • Online shopping on the Internet is one of the biggest changes; just order through a computer or smartphone and receive online or on your doorstep. Companies benefit greatly from it by having increased sales and access to a much larger audience worldwide.
  • The Internet allows us to interact with people, no matter where they reside on the planet. It is made possible through social networking sites like Twitter, Facebook, Instagram etc.

Wrapping It Up

In this post about computer network basics, I’ve tried to cover the fundamentals of a computer network. It will clear a lot of concepts & help anyone not having an idea about how it works.

I haven’t gone into more detail as then it would have become more technical and difficult to absorb. Computer networking is a vast subject that requires time and effort to understand advanced topics.

In future posts, I will cover the different aspects of computer networking separately.

If you think any topic is missing from this computer networking post or any more details need to be added, do share in the comments section below.

Please follow us on Facebook & Twitter if you liked this detailed post.

Share Your Thoughts

Comments are moderated and will be posted only if they are on-topic, useful and not abusive. For more information, please see our Comments Policy.