Network Topology

What is Network Topology?

Network topology is the arrangement of the different networking elements like network links, computers, switches, nodes, Wi-Fi access points, laptops and other network devices in a computer network.
There are two types of Network Topologies:
  • Physical Network topology and,
  • Logical Network topology

What is a Physical topology?

A Physical topology defines how all the network devices are connected physically in a computer network. It mostly defines the physical connections among the devices.

What is a Logical topology?

A logical topology defines the logical connectivity of network devices on a computer network. So, it might happen that the devices connected in one type of physical topology might have different underlying logical topology.
If we elaborate more on the physical topology, it is essentially the placement of the various network components in a computer like the placement of the devices, the connection among the devices, installation of the cables etc. On the other hand, logical connection defines how data flows among the devices.
For example, let say there are five devices (A, B, C, D and E) that are connected in a row. This configuration of network devices might look more like a Bus topology. But let’s say device A can directly transmit the data to the device E. That means it looks more like a Circle which a Ring topology logically but a bus topology physically.

Type of Physical topology

  • Bus topology
  • Ring Topology
  • Star Topology
  • Mesh Topology
  • Tree topology

What is Bus topology?


In a network, when all the nodes are connected by a single physical cable and the central cable becomes the backbone of the network then, it is called as a Bus topology.
For illustration, remember the old fashioned computer labs. There, a common copper wire used to run across the lab and all the computers were tapped to the wire. So, the wire formed the backbone of the network while computers formed different nodes of the topology.
In a bus topology, when a data is sent from one to another through the central cable, the data travels in the form of a packet. The data packet contains the address of the destination machine.
Curious Case of Alex & Christina:
Let’s say, there are five machines in a Bus topology namely A, B, C, D & E connected to a central cable serially. Let’s say, Machine A is owned by Alex and Machine C is owned by Christina. Alex wants to send a message to Christina. So when a data packet is sent from Alex to Christina, that means from machine A to machine C, at first, machine B owned by Bob, checks the destination address inside the packet. Since the packet was not meant for Bob, it is forwarded on and reaches Christina.
Machine C owned by Christina matches the address of the packet with its own machine address and bingo! the message is for Christina, and hence, the machine C decides to receive the message. And that’s how machine A and Machine C communicates on a bus topology.
But there is a glitch. Now Bob, who owns the machine B, is jealous of Alex and Christina and he decides to read the message. So, he spoofs his machine address as Christina’s machine address and is successfully able to receive the data packet and the message inside that. This is called spoofing. However, we will talk about spoofing later in this series. Let’s first focus on the basics.

Advantage of Bus topology:

  • Minimal use of the physical resources

Disadvantage of the Bus topology:

  • A Single point of failure
Imagine if the cable breaks down, none of the nodes will be able to communicate with each other.

What is a Ring Topology?


Ring topology, also known as Ring network, is a type of network topology where each node is exactly connected to two other nodes, forward and backward, thus forming a single continuous path for signal transmission.

There are two types of the Ring Topology based on the data flow:
  • Unidirectional and,
  • Bidirectional
A Unidirectional ring topology handles data traffic in either clockwise or anticlockwise direction. This data network, thus, can also be called as a half-duplex network. A Unidirectional ring topology is thus easy to maintain compared to the bidirectional ring topology.
Ex: SONET network, SDH network etc.
A SONET/ SDH is a standardized network protocol that transfers data streams over optical fibres. Whereas, a bidirectional ring topology handles data traffic in both the direction and can be a full duplex network.

Token Passing:

Token passing in a Ring Topology is often a term which is talked about. So, a token contains a piece of information which is sent along with data by the source computer. In easier terms, a token is like a permission packet which allows a particular node the permission to release information over the network.
A token is regularly passed from one node to another. And if a node has some information to pass on the network, the node releases the information. If the node does not have any data to release on the network, then it transfers the token to the next node.
The nodes with token are the ones only allowed to send data. Other nodes have to wait for an empty token to reach them.

Advantages of Ring topology:

  • Reduced chances of data collision as each node release a data packet after receiving the token.
  • Token passing makes ring topology perform better than bus topology under heavy traffic
  • No need of server to control connectivity among the nodes
  • Equal access to the resources

Disadvantages of Ring topology:

  • In Unidirectional Ring, a data packet must pass through all the nodes.
Ex: Let’s say A, B, C, D and E are a part of the ring network. The data flow is from A towards B and henceforth. In this condition, if E wants to send a packet to D, the packet must traverse then entire network to reach D.
  • Single point of failure, that means if a node goes down entire network goes down.

What is Star Topology?


A star topology is a network topology in which all the network nodes are individually connected to a central switch, hub or computer which acts as a central point of communication to pass on the messages.
In a star topology, there are different nodes called hosts and there is a central point of communication called server or hub/Switch. Each host or computer is individually connected to the central hub/Switch. We can also term the server as the root and peripheral hosts as the leaves.
In this topology, if nodes want to communicate with a central node, then they pass on the message to the central server and the central server forwards their messages to the different nodes. Thus, they form a topology like the representation of a star.

How does communication happen in a Star topology?

Let’s say all the computers of a floor are connected to a common hub or switch. The switch maintains a CAM table in this case. The CAM table is Content Addressable Memory where hardware addresses of the all the connected devices are stored inside a memory in the switch.
For example, if computer A wants to send a data packet to computer B then computer A will forward the message to the switch. The switch will check the address of the destination computer and forward the message to the same.
In the case of a hub, a hub has no memory of its own. So when computer A sends a message to computer B, then hub announces “Hello all the ports connected to me, I have got a packet for this address. Who of you has this address?” This procedure is called ARP (Address Resolution Protocol) and using this network protocol the hub is able to find the address of the intended machine and hence, it transfers the packet to the destination machine.

Advantages of Star Topology:

  • Less damage in case of a single computer failure as it does not affect the entire network

Disadvantages of Star topology:

  • More cables are required to be connected because each computer individually connects to the central server
  • Single point of failure in case the server get down.

What is Mesh Topology?


A mesh topology is a network topology in which all the network nodes are individually connected to most of the other nodes. There is not a concept of a central switch, hub or computer which acts as a central point of communication to pass on the messages.
Unlike other network topologies, it can be divided into two kinds:
  • Fully connected mesh topology and,
  • Partially connected mesh topology
A fully connected mesh topology has all the nodes connected to every other node. If you know the graph theory, then it is like a fully connected graph where all the nodes are connected to every other node.
On the other hand, a partially connected mesh topology does not have all the nodes connected to each other.

Advantages of mesh topology:

  • Each connection can carry its own data load
  • It is robust
  • A fault is diagnosed easily
  • Provides security and privacy

Disadvantages of mesh topology:

  • Installation and configuration are difficult if the connectivity gets more
  • Cabling cost is more and the most in case of a fully connected mesh topology
  • Bulk wiring is required

What is tree topology?


A tree topology is a combination of a star network topology and a bus topology. In tree topology, nodes of the underlying bus network topology are replaced with a complete star topology.
There are certain special cases where tree topology is more effective:
  • Communication between two networks
  • A network structure which requires a root node, intermediate parents node and leaf nodes (just like we see in an n-tree) or a network structure which exhibits three level of hierarchy because two level of hierarchy is already displayed in the star topology.

Advantages of tree topology:

  • Scalable as leaf nodes can accommodate more nodes in the hierarchical chain.
  • A point to point wiring to the central hub as each intermediate node of a tree topology represents a node in the bus topology
  • Other hierarchical networks are not affected if one of them gets damaged
  • Easier maintenance and fault finding

Disadvantages of tree topology:

  • Huge cabling is needed
  • A lot of maintenance is needed
  • backbone forms the point of failure.

Different Networking Devices

Network Hub:


Network Hub is a networking device which is used to connect multiple network hosts. A network hub is also used to do data transfer. The data is transferred in terms of packets on a computer network. So when a host sends a data packet to a network hub, the hub copies the data packet to all of its ports connected to. Like this, all the ports know about the data and the port for whom the packet is intended, claims the packet.
However, because of its working mechanism, a hub is not so secure and safe. Moreover, copying the data packets on all the interfaces or ports makes it slower and more congested which led to the use of network switch.

Hub’s properties:

  • Works at the physical layer of the OSI layer
  • Uses ‘Store and forwarding’ when it receives a data packet
  • A virtual LAN cannot be created using a hub
  • Usually comes with 4 to 12 ports
  • Only transmits electrical signals or the bits (relate it with physical layer)
  • Does not use any software
  • Does not have its own memory for memorizing the devices connected over to the network
  • Cannot learn the MAC addresses and neither can forward them
  • Supports Half-duplex transmission mode
  • A hub has only one broadcast domain
  • Cannot support Spanning tree protocol
  • Packet collisions occur commonly inside a hub

Network Switch:


Like a hub, a switch also works at the layer of LAN (Local Area Network) but you can say that a switch is more intelligent than a hub. While hub just does the work of data forwarding, a switch does ‘filter and forwarding’ which is a more intelligent way of dealing with the data packets.
So, when a packet is received at one of the interfaces of the switch, it filters the packet and sends only to the interface of the intended receiver. For this purpose, a switch also maintains a CAM (Content Addressable Memory) table and has its own system configuration and memory. CAM table is also called as forwarding table or forwarding information base (FIB).


Switch’s properties:

  • Works at the Data link layer or layer two of the OSI model
  • Uses ‘filter and forwarding’ when it receives a data packet
  • A virtual LAN can be created using a Switch and it can also work as a multi-port bridge
  • Usually comes with 24 to 48 ports
  • Transmits Frames (layer 2 packets) and Layer 3 packets of the OSI model
  • Uses its software for admin access and other configurations
  • Has its own memory for memorizing the devices connected over to the network
  • Can learn the MAC addresses and stores those addressed in a CAM (Content Addressable Memories)
  • Supports Half as well as full duplex transmission mode
  • A hub has only one broadcast domain
  • Can support Spanning tree protocol
  • No packet collisions occur commonly inside a hub

Modem:


A Modem is somewhat a more interesting network device in our daily life. So if you have noticed around, you get an internet connection through a wire (there are different types of wires) to your house. This wire is used to carry our internet data outside to the internet world.
However, our computer generates binary data or digital data in forms of 1s and 0s and on the other hand, a wire carries an analog signal and that’s where a modem comes in.
A modem stands for (Modulator+Demodulator). That means it modulates and demodulates the signal between the digital data of a computer and the analogue signal of a telephone line.

Network Router:




A router is a network device which is responsible for routing traffic from one to another network. These two networks could be a private company network to a public network. You can think of a router as a traffic police who directs different network traffic to different directions.
Bridge:

If a router connects two different types of networks, then a bridge connects two subnetworks as a part of the same network. You can think of two different labs or two different floors connected by a bridge.

Repeater:



A repeater is an electronic device that amplifies the signal it receives. In other terms, you can think of repeater as a device which receives a signal and retransmits it at a higher level or higher power so that the signal can cover longer distances.
For example, inside a college campus, the hostels might be far away from the main college where the ISP line comes in. If the college authority wants to pull a wire in between the hostels and main campus, they will have to use repeaters if the distance is much because different types of cables have limitations in terms of the distances they can carry the data for.
When these network devices take a particular configurational shape on a network, their configuration gets a particular name and the whole formation is called Network topology. In certain circumstances when we add some more network devices to a network topology, its called Daisy chaining.

Network Layer Of OSI Mode: Functionalities and Protocols


Network Layer:

Network layer is the third layer in the OSI model and here are some of the functionalities of the network layer:
  • Logical Addressing

In the internet world, there are two kinds of addressing, data link layer addressing and logical addressing at the network layer. While physical addressing at the data link layer is defined by the MAC address of a device, on the other hand, IP addressing is defined at the network layer of the OSI model. IP addressing is also known as logical addressing.
  • Routing

Routing is a method to route a data packet from source to destination. We can think of routing as follows:
  • When you want to access some data from Facebook, you open your laptop, type Facebook’s URL and send an HTTP request to facebook.com for some data.
  • Since Facebook’s server is situated outside your local area network, your request is forwarded to Facebook through the default gateway or router of your institution.
  • This forwarding of a data request to the destined server or user is known as routing.
This functionality is done at the network layer of the OSI model.
  • Fragmentation and Reassembly

The network layer must send messages down to the data link layer for transmission. The data that network layer receives is in the form of a packet and the data that data link layer forwards is called a frame
Fragmentation and reassembly have to be done by the network layer because some data link layer technologies have limits on the length of any message that can be sent. If the packet that the network layer wants to send is too large, the network layer must split the packet up, send each piece to the data link layer, and then have pieces reassembled once they arrive at the network layer on the destination machine.
  • Path determination

Between two computers on the internet, thousands of path topology may exist to connect the one device to another. Some of the networks might be private networks; to use some of the networks to send your data you might have to pay; some of the networks en route might be very busy. But network layer is so smart to find out these things within milliseconds.
Some of the other functionalities of the network layer which can be regulated using different protocols working at the network layer are:
  • ICMP (Internet Control Message Protocol): It is used by network devices, like routers, to send error messages indicating, for example, that a requested service is not available or that a host or router could not be reached.
  • IGMP (Internet Group Management Protocol): IGMP protocol is used by hosts and adjacent routers on IPv4 networks to establish multicast group memberships
  • IPsec (Internet Protocol Security): Internet Protocol Security is a protocol suite for secure Internet Protocol (IP) communications by authenticating and encrypting each IP packet of a communication session.
  • RIP (Routing Information Protocol): The Routing Information Protocol (RIP) is a routing protocol which employs the hop count as a routing metric.

Data Link Layer Of OSI Model


The data link layer is the penultimate or the second lowermost in the OSI model. The data link layer is made up of two sublayers:

  • MAC (Media Access Control) Layer
  • LLC (Logical Link Control) Layer
Both of these two sublayers are responsible for different functions for the data link layer. Today, we are going to talk about the LLC layer in details.

LLC (Logical Link Control)  layer:

LLC layer is also known as the logical link control. As it is evident from the name itself that for the data link layer, the LLC layer serves the purpose of providing end to end flow, error control, and multiplexing different protocols over the Mac layer of the data link layer.
For example:
Let’s assume that I am running Windows 10 and I want to do a video chat with my friend who is sitting across oceans in Germany. Now, here is what happens when we start the video chat:
  • Multiplexing

So when I start video chatting, my application, that maybe Skype, starts generating video data packets. However, the data link layer has some restrictions like a packet size cannot be greater than a particular size, let’s say X bytes in total. That implies that the data packets have to be broken down into different chunks and those data packets have to be transmitted chunk by chunk.
Why so?
Let’s say you send data packets of longer sizes. Then, if that data packet is lost, you will have to send those packets once again. And the larger the size of the packet is, the larger bandwidth will be required to resend those data packets. That’s why an optimized frame size has been defined for the size of a data packet for data link layer.
So, now the data packets have been broken into frames and they will be sent chunk by chunk across the internet. So when my data link layer breaks the videos in chunks, it is smart enough to mark those frames with some cues. This allows my friend’s data link layer to exactly know the order of the frames so that it can re-arrange the frames back in order.
  • Flow control

Another thing that LLC layer is responsible for is flow control. Let’s take a look at the flow control this way.
I am a not-so-rich person so I cannot afford a laptop and I am still working on old Windows PC with 256 Mb RAM. On the other hand, my girlfriend can afford a brand new laptop that was just launched in the market.
So when we video chat, because of the HD quality camera from her laptop, the video size I receive outsizes my video sent to her from my poor camera. Does that mean that we should run out of sync? No, that does not happen, right?
And that’s where exactly flow control comes into the picture. LLC layer makes sure that one fast computer does not overrun a slower one. For that purpose, the concept of ‘Ack’ acknowledgment has come into the picture. For every frame received or sent, I must send/receive an ack respectively to be in sync.
  • Error control

LLC layer uses CRC (Cyclic Redundancy Check) to check frame errors at data link layer. This is more like providing a preview of a bigger picture to your friend that where he/ she is going wrong.

MAC  (Media Access Layer) layer:

MAC layer is also known as Media Access Layer. As it is evident from the name itself that for the Data link layer, the MAC layer serves the purpose of managing the media access to different devices.
For example:
Let’s say there is a bus topology in which many computers are connected in a series. However, there is only one common media cable on which all the data has to be transferred.
We know the data is carried over on a cable in terms of electric signals. So, if more than one computer sends an electric signal at the same time, there will be a signal collision which will turn into the data packets loss on the wire. And that’s where MAC layer comes into the picture.

Channel access control Mechanisms applied by Mac layer:

Different kind of channel access control mechanisms are applied by the MAC layer for media access and here are some of the popular channel access control mechanisms:
  • Token passing
  • CSMA/ CD
  • CSMA/ CA
  • Slotting mechanism etc.

Token Passing:

A token is passed among the data competitors for a limited amount of time to release the data on the common channel. There are many variants of this mechanisms. Here are some:
  • For the quality of service, the token is passed for longer times to a particular node
  • A node with more data gets the token for the longer time.

CSMA/ CD:

CSMA/ CD stand for Carrier sense multiple access with collision detection (CSMA/CD). It’s a media access control method used most notably in local area networking using early Ethernet technology.
When two nodes send data packet at the same time, then a collision happens. When a collision happens, a jam signal is sent along the wire which tells all the nodes that there has been a collision in the wire. All the nodes stop sending data for a while, for a random time interval before resuming the sending process again.

CSMA/ CA:

CSMA/ CA stand for Carrier sense multiple access with collision Avoidance (CSMA/CA).
CSMA/ CA came into the picture because the problem with CSMA/ CD was that it detected collision after it happened. That means the damage was already done and the mechanism was looking for the recovery after the damage.
However, in the case of CSMA/ CA, the data packet will only be sent if the media is free from packets. When a node senses that there is some transmission going on the media channel then it will wait for a random time before sensing the media channel once again.

Slots:

Slotting mechanism mostly came from the Aloha system. However, the Aloha system has also seen a lot of modifications.
Like in pure aloha, all the nodes sent packets at any time but this mechanism was improved in slotted aloha where all the nodes could send packets only at the beginning, at one slot.