Networking Fundamentals Part~1

Networking Fundamentals Part~1

ยท

18 min read

Hey! ๐Ÿ™‹โ€โ™‚๏ธ, let's understands Networking in easy way, We are going to deep dive into Networking topic. So Let's get started.

Network and it's elements.

What is a Network ?

A network is an interconnection between two or more people, nodes or machines via some medium. they are connected in such a way that they can share resources, data and information over that network.

Let's say I and you are connected via any social media app like twitter, Facebook or even LinkedIn and we are sharing some data in form of text, videos photos etc. then this connection is known as network of people.

Now in above example we have social media as medium, let's go back in time when we do not have social media or let's assume we don't even have phones.

In that days also we have network of people but we can share information by physical gathering somewhere. So here we understand that even we do not have mobile phones from that time concept of networking exist (๐Ÿค”๐Ÿค” That means from always??)

Now get back in present in the days of technology, computers, mobile phones, different IOT devices.

Now a days not only humans share information but computers also (of course when any human told the computers to do so. )

So now a days computers/nodes comes together to connect and make a network so that they can share information or any data. This type of network is computer network.

null (7).png

Computers can be connected via a wired medium (as a wire) or wireless medium (as Wi-fi, Bluetooth) etc.

Nodes

In networking we will generally listen a term called nodes, So what is this node actually?

  • Nodes are the points or devices at which the communication either begins or stops for example we have five PC which creates a network so we can say that we have network of 5 nodes.
  • Nodes can be anything on the network ranging from huge servers to a mobile phone.

Interesting Fact! :- Nodes are called with different names with different type of networks. For example, If the nodes are connected with a Wired network it is called Hosts and if the nodes are connected with wireless network it is called Stations

null (8).png

Intermediary Nodes/Device

Beside the end devices or nodes, a network also consists of some Intermediary Nodes or Sub nods.

The sub-Nodes helps in establishing connections between the end nodes so that they can transfer stuff over the network.

These can be Hubs, Switches, Routers, or intermediary Servers providing connectivity to all the connected nodes of the network.

null (9).png

Network Topologies

Keep Up!! We now know what is network, computer network, and nodes, Now we will understand how these nodes are connected together to form a network.

A node in a network can be connected in any fashion as suitable for the environment.

The orientation of nodes to form a network is known as topology.
In simple terms topology shows, in what manner the nodes are connected in a network.

There are several topology to form a network as per size of the network. The names of topologies are Bus, Ring, Star, Mesh, Hybrid.

The traditional Bus Topology

Bus Topology :- In this topology the nodes are connected with a single cable known as Backbone cable.

The backbone cable connects all the devices in a bus topology, Every node is directly connected with the backbone.

null (10).png

  • Every node is directly connected with backbone cable and any message that needs to be transferred from sender to receiver is send through the backbone cable.
  • Since all the nodes are connected with the backbone cable the message is received by all nodes irrespective they are recipients or not.
  • This mechanism seems fast but it sends message to all nodes so it wastes lot of bandwidth.

Let's take an example from above picture of bus topology, If laptop wants to send any message to printer the message will not only received by printer it is received by all other devices. which wastes lots of bandwidth and information/data is passed to unknown user also. To overcome this problem the concept of tokens came into picture.

What token do is, in bus topology every node is assigned with a token when any node sends the message it specify the token of sender and receiver with the message It still goes to all the nodes, but when the node see that the token not related with it rejects the message.by this way our message i only accepted by the node whose token matches.

A bus topology can be easily installed with low cost inside small offices or in places where limited or few devices needs to be joined.

Pro's & Con's of bus topology

null (11).png

Ring Topology

We have seen bus topology it requires a backbone cable and guess what Ring topology also needs backbone cable. Yes! lets study them.

Ring topology :- In ring topology every node is connected with a single cable but in circular way to form a ring.

null (12).png

  • In ring topology every node is connected to two other nodes on either side of the ring. as we can see in the picture the printer is connected to database as well as the server similarly all other nodes are connecter with two other nodes.

  • Whenever any node sends a message it usually moves in one direction of the ring along the backbone cable.

  • A ring can be unidirectional or bidirectional it means it can sent data either in one way or in both ways clockwise or counterclockwise.

Pro's and con's of Ring topology

null (13).png

Star Topology

The start topology is a type of client server topology that means one is the client and one is the server.

Star Topology :- All nodes connected to a single central device such as a Hub making of client-server network.

Unlike bus and ring topology this topology enforce order by the concept of master and slave one sends the data and other receive the data.

In this topology a central node is responsible for all the transmission of data and keep it's record that is known as master or the server.

Any request from the subsequent nodes or other nodes that request data which are known as client nodes are send directly to the server, server handles all the request from the client and thus it is known as central nodes.\

Central node is sole governing body in this topology and all the nodes connected to it form a star like pattern and that's why this topology is known as star topology.

Since there is a controller which controls the flow of data this topology is faster and more efficient from the previous one.

null (14).png

Pro's and Con's of Star Topology

null (15).png

Mesh Topology

Mesh Topology :- In this topology all the nodes are interconnected to each other in away to form a mesh

  • In this topology if any of the node goes down the remaining will continue to work because they are not dependent on other nodes.

  • They are interconnected to each other via the separate individual links.

  • There is no need of central server like we have in the case of star topology

  • This topology requires lots of cabling that's why this topology is proffered for wireless network.

null (16).png

Hybrid topology

Hybrid Topology :- Hybrid topology is collection or mixture of two or more topologies to form a high order network topology.

null (17).png

Types of Network

Now we have idea about topologies and their types now let's get into the types of networks we have

Types of network differing over coverage area, architecture, node requirements, etc.

null (18).png

PAN or Personal Area Network

Personal Area Network (PAN) is a network with span of few feet such as a network used in Bluetooth, TV remote etc. This network is not mainly used for big file/data transfer. The range of this network is very low so we have to stay within the range to connected with PAN network

null (19).png

Pro's and Con's of PAN

null (20).png

LAN or Local Area Network

LAN is also a small network but it is bigger than PAN. It expands across multiple floors or even multiple buildings or locality. These network are often use in Home, offices, schools, and library. The typical range of LAN is around 100 to 1000 meters.

null (21).png

MAN or Metropolitan Area Network

MAN is bigger than LAN. It expands it's network more than LAN and going across localities, cities, or towns. It is used in different branches of same office. The best example for MAN in my mind right now is Telephone cable network. Multiple LANs are connected together to form a MAN. The range of MAN network is around 5 to 50 KM.

null.png

WAN or Wide Area Network

A huge network expanding more than MAN across countries ang going around the world. WAN exist globally without ties to a physical location such as the Internet, considered the largest WAN.

image.png

Types of cables (wired connectivity)

By now we know what are nodes and what is a network but how do we connect two or more nodes? What is the connecting media?

To connect the nodes to form a network a connecting medium is required to connect the different hosts.

  • A network can be made by using a wire to make a wired Network or without wires as a Wireless Network.

For a wired network, different categories of cables are available. Let's take look on them.

Twisted Pair Cable

Twisted pair cable is a type of cable in which each of the 2 wires are twisted around each other so to improve their performance. Twisting of cables is done to protect the data signals traveling inside the cable from the outside interference.

There are 2 types of twisted pair cable based on the layer of protection they have their on them.

  1. Shielded Twisted Pair (STP)
  2. Unshielded Twisted Pair (UTP)

Shielded twisted pair :- The shielded twisted pair cables are wrapped in a shield known as Sheath, providing fewer interruptions.

They can be overall shielded or individually shielded or a combination of both.

null.png

Unshielded Twisted Pair (UTP) :- These type of cable is not comes with internal shielding. The outer insulating jacket protects the cable from physical stress or damage but does not shield the cable from Electromagnetic interference.

image.png

Coaxial Cable

A coaxial cable is a type of electrical cable consisting of an inner or core conductor surrounded by a concentric conducting shield.

The two are separated by dielectric (insulting material) and finally wrapped in a plastic jacket.

image.png

Fiber Optic Cable

They are similar to an electric cable, but contain on or more optical fibers that are used to carry light through them. It is the fastest cable and costly also.

image.png

Wireless medium

Wireless medium or networks use wireless signals such as Radio or Infrared waves for propagation and network.

WLAN, WPAN or WMAN are some example of wireless network

image.png

Networking Devices

There are lots of networking devices that contribute to make a network possible so with the help of those devices we can setup and establish a network.

There are different types of networking devices that works on different layers of the OSI Model.

Don't know OSI Model? Don't worry we will discuss it later.

Some of the devices we are going to discuss are :-

  1. Repeater
  2. Bridge.
  3. Hub
  4. Switch
  5. Router

Repeater

image.png

A repeater is a simple networking device whose job is to repeat the signals inside the network. This is a kind of re-transmission of signals and data

In simple terms a repeater re-transmits and boost the signals from one device to other device.

The retransmission is useful in cases where attenuation needs to be taken into consideration. By attenuation we mean loss or degradation of the amplitude or the strength of the signals.

while the message on signals on its way from the sender to receiver it's get attenuated. This attenuation or loss of signals tan take place due to leakage of signals from cable or from climate change or from temperature or from any radiation outside the environment.

The repeater make sure the loss in signals or attenuation is covered up.

null (1).png

Repeater is a two port device i.e. it has only two ports it can repeat and boost signals only for two devices that are connected to it.

Repeater works on first layer (physical layer) of the OSI model.

Hub

image.png

Hub is another networking device which connects nodes together and forms a network. Interesting thing is Hub can also repeat the signals, boost the signal from sender to receiver.

Repeater is only two port device we cannot connect more than 2 devices with repeater. and here hub comes into picture.

Hub has more than 2 ports. Hub is kind of multiport repeater.

Beside repeating and boosting the signals, the hubs are also used to make networks by using their multiple ports.

Several hubs can join together to form a even bigger network, for example :- we can join 5 to 6 devices to one hub and another devices to second hub and then join both hub to create a bigger network.

Just like repeater hub also works on layer1 or physical layer of OSI Model.

Hub is not an intelligent device means it circulates the message to all the device which are connected to hub.

For example :- If 3 devices are connected with Hub like PC1, PC2, PC3, if PC1 wants to send message to PC3 the message is not just move to PC3 it also goes to PC2.

There are two types of Hub depending on how they work with supply of energy

  1. Active Hub :- Active hub operates on power supply. These type of Hub needs supply of electricity because they amplify or boost the signals which requires external energy. These hub can regenerate bad signals as well as amplify an attenuated signals too.

  2. Passive Hub :- Passive hub do not need external electricity to work, These hub simply connect two devices and do nothing else. They nether regenerate the signals nor amplify them, they just pass the incoming signals from the sender to receiver as it is.

Bridge

image.png

Bridge is another networking device and as the name suggest it servers as the bridge or link between two networks or the two nodes.

A bridge connects two and only two devices because just like repeater it is two port device.

A bridge works on the layer2 or Data Link Layer of the OSI model.

NOTE :- A bridge can connect two networks only and only if they are in same subnets.

Don't know subnet?? Don't worry we will discuss it later on the same blog. But for now know that Subnets are the smaller part of network.

A bridge uses MAC address of the nodes to distinguish between them and also on what subnet each node is? So using MAC address a bridge can identify which node is where and which node is on which side of network.

Using a MAC address table commonly known as CAM Table of bridge it knows where every node lies on the network.

Switch

image.png

Switch is a multi-port networking device that is used to connect different networks together.

Switch is generally used for creating subnet works within a main network. Just like bridge a switch can connect network only and only if subnets are same.

Switch is able to setup the connection between different subnets but it won't be able to communicate because of lack of routing functionality.

Switches can be of multiple number of ports depending on how many devices they need to connect. They can have 8/12/1/24 ports. All these ports are used to connect separate network to each other

Switch also uses MAC (Media Access Control) addresses learned in its hardware and MAC tables to ensure connectivity between networks.

Switches works on Layer 2 or Data Link Layer of the OSI Model. But there is a special type of switch known as layer 3 switch which works on the layer 3 or network layer of the OSI model

In simple terms we can say a layer 3 switch is a combination of router and as well as switch.

Router

image.png

Router is a multi-port networking device whose job is to connect the different networks together.

The purpose of router is to make communication possible between different subnets that are formed by the switch.

A router routes the traffics or the messages across different network by using layer 3 address or an IP address. These Ip address helps in transferring the messages across different subnets.

unlike hub Router is an intelligent device, it does not floods the entire network with broadcasting the message every time.

Every nodes address is noted in it's address tables thus, it knows which node belongs to which network and which subnet.

image.png

Layer 3 Switch (Additional)

A normal switch cannot connect nodes on different subnets because a routing functionality is mandatory to communicate with each other.

A more improved and advance switch provides routing functionality too just like router. and such switch is known as layer 3 switch or multi layer switch.

As the name suggest this device works on layer 3 (Network Layer) of the OSI model.

This device uses IP address which is a layer 3 address and thus, it is considered as layer 3 device.

A layer 3 switch can do everything that a layer 2 switch can do and it has the routing functionality also. So a layer 3 switch is combination of normal switch + Router

Network Addresses essentials

In the real world every house has an address associated with it. Generally this is because to help the people know, where the particular house or building is located. we can reach to any house with the help of it's address commonly known as house address.

Similarly, in computer network every node needs an address so that it can be found on the network. This address helps the other nodes to reach to other nodes using the nodes address. Such address in terms of networking is known as node network address.

Because the networking devices works on different layers of the OSI model we have different network layer address accordingly. We just need to know about 2 types of address Logical & Physical

Logical and Physical Network address

Logical Address

A logical address are set to be logical because of the fact they can change their value depending on where they are located in the network, that is because these are temporary addresses that are assigned by the network or the DHCP.

When these network or DHCP server change the logical address of a node also changes.

For example if we are sitting in office our address is different as compared to when we are sitting in our home.

This is the concept of logical address. These address is known as IP address or Internet Protocol Address.

Physical Address

Now the question here is since these logical address keep on changing depending on the location of the node, how a node can distinguish if it is talking to the new node or the old once whose just address is changed.

Since our logical address keeps on changing we have a permanent address that helps in identifying our node uniquely. This address is known as MAC address or Media Access Control Address. This is the permanent address and never changes just like the address of our home.

image.png

IP Address

Logical address is commonly known as IP address. An Ip address or Internet Protocol address is a network address used for recognizing nodes and devices and also sends information between them.

This Address stores the location of the node in the network. it tells where the node is located in the network.

In network we always need IP address that helps to reach the nodes.

IP addresses are assigned by IANA (Internet Assigned Numbers Authority)

"Let's say we brought a brand new laptop to our home and we are opening it for the first time and we have not configured it at all, when we open it for first time our laptop will connect to DHCP Server and it will request for an IP address or logical address, that time the DHCP server issues an IP address to our network so that it can connect to the internet that address is known as IP address."

An Ip address is consist of combination of Alpha numerals which are separated by dot (.). An example of an IP address will be 192.168.30.15

In the above example there are 4 columns these column representing the different parts of the network. we will discuss about these parts later.

IP Address are of 2 types : IPv4 and IPv6

IPv4 :- An IPv4 address is of 32 bits meaning they use 32 bits addresses that can reach up to (2^32) i.e. 4294967296 addresses.

Looks huge right? but this IPv4 address falls short due to increasing number of nodes joining internet everyday.

Example of IPv4 address is :- 192.168.30.25

Each part of IPv4 address is known as an octet because it contains 8 bits or 8 binary digits, so 4 times 8 is 32 bit.

image.png

IPv6 :- An Ipv6 address is of 128 bits meaning they use 128 bits addresses that can reach up to approximately 3.4x10^38 address.

There are so many addresses in IPv6 that i thing we will never be out of limit of IPv6 address

IPv6 address is separated by colon (:) not dot (.)

Example :- 2005:0db8:0e00:0000:0001:8a2e:0370:7334 is an 128 bit IPv6 address.

IPv6 address is hexadecimal notation but IPv4 is binary notation

MAC Address

MAC Address or Media Access Controller address is the physical address which is permanent address for the node. It never change except we force them to change.

MAC Addresses are 48 bits or 6 bytes in size. These are unique identifiers that a node or machine can have, permanently.

MAC address is splitted into 2 parts :- OUI part and NIC address part.

OUI or Organizationally Unique Identifier :- The OUI number is the first 24 bits or 3 bytes an the remaining last 24 bits is NIC number.

The OUI is the unique to the network card, Network card is hardware inside our laptop, computer etc. through which we can access internet.

The OUI tells us which organization like Lenovo, intel etc. produced the Network card in our device OUI is unique to organization.

NIC number :- This represents the serial number that is assigned to the adapter or the network card by the manufacturer.

null (2).png

Since MAC address is permanent address of node it cannot be same for two nodes.

Ex: 00-1A-73-C8-D7-FD is MAC address of 48 bits in size with 001A73 as OUI number & C8D7FD as its NIC number

MAC addresses is represented in Hexadecimal notations

image.png

OOOHHHH!! so much to reading right? so now I am going to end this blog here. But next part of this blog will come soon! stay updated for that.

Meanwhile feel free to comment on this blog.

See you in next blog. ๐Ÿ˜Š๐Ÿ˜Š

Thank you so much for reading.

Did you find this article valuable?

Support WeMakeDevs by becoming a sponsor. Any amount is appreciated!

ย