CN Unit5
CN Unit5
Network Topology
Topology defines the structure of the network of how all the components are
interconnected to each other. There are two types of topology: physical and logical
topology.
Physical topology is the geometric representation of all the nodes in a network. There are
six types of network topology which are Bus Topology, Ring Topology, Tree Topology,
Star Topology, Mesh Topology, and Hybrid Topology.
1) Bus Topology
o The bus topology is designed in such a way that all the stations are connected
through a single cable known as a backbone cable.
o Each node is either connected to the backbone cable by drop cable or directly
connected to the backbone cable.
o When a node wants to send a message over the network, it puts a message over
the network. All the stations available in the network will receive the message
whether it has been addressed or not.
o The bus topology is mainly used in 802.3 (ethernet) and 802.4 standard networks.
o The backbone cable is considered as a "single lane" through which the message
is broadcast to all the stations.
o The most common access method of the bus topologies is CSMA (Carrier Sense
Multiple Access).
CSMA: It is a media access control used to control the data flow so that data integrity is
maintained, i.e., the packets do not get lost. There are two alternative ways of handling
the problems that occur when two nodes send the messages simultaneously.
o CSMA CD: CSMA CD (Collision detection) is an access method used to detect the
collision. Once the collision is detected, the sender will stop transmitting the data.
Therefore, it works on "recovery after the collision".
o CSMA CA: CSMA CA (Collision Avoidance) is an access method used to avoid the
collision by checking whether the transmission media is busy or not. If busy, then
the sender waits until the media becomes idle. This technique effectively reduces
the possibility of the collision. It does not work on "recovery after the collision".
o Low-cost cable: In bus topology, nodes are directly connected to the cable
without passing through a hub. Therefore, the initial cost of installation is low.
o Moderate data speeds: Coaxial or twisted pair cables are mainly used in bus-
based networks that support upto 10 Mbps.
o Limited failure: A failure in one node will not have any effect on other nodes.
o Extensive cabling: A bus topology is quite simpler, but still it requires a lot of
cabling.
o Reconfiguration difficult: Adding new devices to the network would slow down
the network.
2) Ring Topology
o The node that receives the message from the previous computer will retransmit
to the next node.
o It has no terminated ends, i.e., each node is connected to other node and having no
termination point.
o The most common access method of the ring topology is token passing.
o A token moves around the network, and it is passed from computer to computer
until it reaches the destination.
o The sender modifies the token by putting the address along with the data.
o The data is passed from one device to another device until the destination address
matches. Once the token received by the destination device, then it sends the
acknowledgment to the sender.
o Network Management: Faulty devices can be removed from the network without
bringing the network down.
o Product availability: Many hardware and software tools for network operation
and monitoring are available.
o Cost: Twisted pair cabling is inexpensive and easily available. Therefore, the
installation cost is very low.
o Failure: The breakdown in one station leads to the failure of the overall network.
o Reconfiguration difficult: Adding new devices to the network would slow down
the network.
o The central computer is known as a server, and the peripheral devices attached
to the server are known as clients.
o Limited failure: As each station is connected to the central hub with its own cable,
therefore failure in one cable will not affect the entire network.
o Familiar technology: Star topology is a familiar technology as its tools are cost-
effective.
o A Central point of failure: If the central hub or switch goes down, then all the
connected nodes will not be able to communicate with each other.
4) Tree topology
o Tree topology combines the characteristics of bus topology and star topology.
o A tree topology is a type of structure in which all the computers are connected
with each other in hierarchical fashion.
o The top-most node in tree topology is known as a root node, and all other nodes
are the descendants of the root node.
o There is only one path exists between two nodes for the data transmission. Thus,
it forms a parent-child hierarchy.
Advantages of Tree topology
o Easily expandable: We can add the new device to the existing network.
Therefore, we can say that tree topology is easily expandable.
o Easily manageable: In tree topology, the whole network is divided into segments
known as star networks which can be easily managed and maintained.
o Error detection: Error detection and error correction are very easy in a tree
topology.
o Limited failure: The breakdown in one station does not affect the entire network.
o Difficult troubleshooting: If any fault occurs in the node, then it becomes difficult
to troubleshoot the problem.
o High cost: Devices required for broadband transmission are very costly.
o Failure: A tree topology mainly relies on main bus cable and failure in main bus
cable will damage the overall network.
5) Mesh topology
o It does not contain the switch, hub or any central computer which acts as a central
point of communication.
o Full Mesh Topology: In a full mesh topology, each computer is connected to all
the computers available in the network.
o Partial Mesh Topology: In a partial mesh topology, not all but certain computers
are connected to those computers with which they communicate frequently.
Advantages of Mesh topology:
Reliable: The mesh topology networks are very reliable as if any link breakdown will not
affect the communication between connected computers.
Easier Reconfiguration: Adding new devices would not disrupt the communication
between other devices.
o Management: Mesh topology networks are very large and very difficult to
maintain and manage. If the network is not monitored carefully, then the
communication link failure goes undetected.
o Efficiency: In this topology, redundant connections are high that reduces the
efficiency of the network.
There are numerous computer equipment manufacturers in the world, and they
manufacture network hardware that would connect to certain computers only. Now, this
is a major problem since it would be very difficult to connect various systems having
different hardware.
So, the IEEE standards for computer networks developed IEEE 802 standards which
ensure that various devices having different network hardware can easily connect over
the network and exchange data. The IEEE 802 standards also make sure that the network
connectivity and management are easier.
IEEE 802.3 MAC sublayer
This is a LAN topology whose physical topology resembles that of bus topology, but its
logical topology is ring topology.
In token bus, a token is held by any one station. That station alone can transmit frames
and the rest of the stations need to receive to the station with the token.
The station can transmit any number of frames it wants, but, only till the time it has the
token. This time is called token holding time, or THT and is generally 10 msec.
Once THT is over, the station needs to stop its transmission and pass on the token to the
next station. This station is decided by the address of the station.
The station with the next address is passed the token, thus forming a logical ring.
IEEE 802.5 token ring follows ring topology, both logically and physically.
In this, each station has attached to it a ring interface unit or RIU. This RIU is responsible
for transmitting the message to the ring. That is, it simply receives the message from the
station and retransmits it to the ring.
Its working is similar to that of the token bus, but the difference lies in the way of passing
the token.
The token is passed to the station that is placed next to the station holding the
token physically. It thus forms the physical ring and the addressing is also done in order,
therefore forming a logical ring too.
IEEE standards in
Description
computer networks
It is used for token passing bus access methods and the physical
IEEE 802.4
layer specifications.
It is used for token ring access methods and the physical layer
IEEE 802.5
specifications.
IEEE 802.11 It is used in wireless LAN, MAC, and Physical layer specifications.
Can be used by the organization to ensure that any new product meets the
requirements of standards or not.
It can also be used to define the connectivity infrastructure of the network. For
example, individual networks, large-scale networks, etc.
The logical link control (LLC) is the upper sublayer of the data link layer of the open
system interconnections (OSI) reference model for data transmission. It acts act an
interface between the network layer and the medium access control (MAC) sublayer of
the data link layer.
The LLC sublayer is mainly used for its multiplexing property. It allows several network
protocols to operate simultaneously within a multipoint network over the same network
medium.
The primary function of LLC is to multiplex protocols over the MAC layer while
transmitting and likewise to de-multiplex the protocols while receiving.
LLC provides hop-to-hop flow and error control.
It allows multipoint communication over computer network.
Frame Sequence Numbers are assigned by LLC.
In case of acknowledged services, it tracks acknowledgements
Bridge in Computer Network
The bridge is a networking device in a computer network that is used to connect
multiple LANs to a larger LAN. The bridge is a networking device that connects the
larger LAN networks with the group of smaller LAN networks.
1. Transparent bridge
2. Source routing bridge
3. Translational bridge
Source Routing Bridge: Source routing bridges were developed and designed by IBM
specifically for token ring networks. The frame’s entire route is embedded with the data
frames by the source station to perform the routing operation so that once the frame is
forwarded it must follow a specific defined path/route.
Advantages:
Bridges can be used as a network extension like they can connect two network
topologies together.
It has a separate collision domain, which results in increased bandwidth.
It can create a buffer when different MAC protocols are there for different segments.
Highly reliable and maintainable. The network can be divided into multiple LAN
segments.
Simple installation, no requirement of any extra hardware or software except the
bridge itself.
Protocol transparency is higher as compared to other protocols.
Disadvantages:
Expensive as compared to hubs and repeaters.
Slow in speed.
Poor performance as additional processing is required to view the MAC address of the
device on the network.
As the traffic received is in bulk or is broadcasted traffic, individual filtering of data is
not possible.
During the broadcasting of data, the network has high broadcast traffic and broadcast
storms can be formed.
Uses of Bridge in Computer Network:
Bridges are used to increase the network capacity as they can integrate multiple
LANs together.
On receiving a data frame, databases use the bridge to decide whether to accept or
reject the data.
In the OSI model, it can be used to transmit the data to multiple nodes of the network.
Used to broadcast the data even if the MAC address or destination address is
unavailable.
It forwards data packets despite faulty nodes.
The data packet can be forwarded or discarded by the bridge when the MAC address
is available.
Functions of Bridges in the Network
The bridge is used to divide LANs into multiple segments.
To control the traffic in the network.
It can interconnect two LANs with a similar protocols.
It can filter the data based on destination/MAC address.
Routing:
Routing is the process of moving the data across a network from a source to a destination.
Routing algorithms are used to decide the route or the output line a packet should be
transmitted on. Routing algorithms determine the optimal path to reach a destination.
FIXED ROUTING
Fixed routing is used to find a single permanent route for each source-to-destination pair.
It determines the routes using a least-cost algorithm and the routes are fixed at least until
a change occurs in the network topology.
For example, VoIP data streams need to have high priority over other kind of traffic.
CRC checks the number of bits (1s) in the frame to determine whether the received
frame has an error or not. After confirming that is there no error in the frame, the frame
is forwarded out the appropriate port, toward its destination.
When an error is found in a frame, the switch discards the frame. Bandwidth consumed
by the corrupt data is reduced by discarding the error containing frame.
2. Fragment-free switching –
In this switching technique there is a trade-off between the high latency – high
integrity of store and forward switching and the low latency – reduced integrity of
fast-forward switching. The switch stores and perform a small error check on the
first 64 bytes of the frame before forwarding.
This switching technique includes the concept of store and forward switching and
fast-forward switching. This switching technique only stores the first 64 bytes of the
frame because the most network errors and collisions occur during the first 64 bytes
and tries to enhance fast-forward switching by doing a small error check to ensure
that a collision has not occurred before forwarding the frame.
The spanning tree protocol is also known as STP. It is a protocol that monitors the overall
performance of the network. The main task of the spanning tree protocol is to remove
the redundant link. This protocol uses the Spanning tree algorithm (STA), which is used
to detect the redundant link. The STA maintains the topology database that is used to find
the redundant links. If the redundant link is found, then the link gets disabled. Once the
redundant links are removed, then only those links will remain active which are chosen
by the STA. If a new link is added or some existing link is removed, then the STA will be
re-executed to adjust the changes.
A complete graph is a graph in which a line connects each pair of vertices. In other words,
we can say that all the points are connected by a maximum number of lines. In computer
networking, the complete graph can also be said as a fully meshed network.
Suppose there are three points, i.e., A, B, and C. Three lines connect these three points. A
line connects every two-point, and we get a complete graph.
The complete graph is formed when a maximum number of lines connects all the points,
whereas the spanning tree is formed when a minimum number of lines connects all the
points.
From the above complete graph, we can get three spanning trees.
o It is minimally connected.
The spanning tree protocol is a layer 2 protocol that tends to solve the problems when
the computers use the shared telecommunications paths on a local area network. When
they share the common path, if all the computers send the data simultaneously, it affects
the overall network performance and brings all the network traffic near a halt.
The spanning tree protocol (STP) overcomes this situation by using the concept of bridge
looping. Bridge looping is used when there are multiple connections between the two
endpoints, and messages are sent continuously, which leads to the flooding of the
network. To remove the looping, STP divides the LAN network into two or more
segments with the help of a device known as bridges. The bridge is used to connect the
two segments so when the message is sent, the message is passed through the bridge to
reach the intended destination. The bridge determines whether the message is for the
same segment or a different segment, and it works accordingly. This network
segmentation greatly reduces the chances of a network coming to a halt.
The following are the steps that spanning tree protocol uses:
o This protocol selects one switch as a root bridge where the root bridge is a central
point as when the message is sent; then it always passes through the bridge.
o It blocks the links that cause the looping on a network, and all the blocked links
are maintained as backups. It can also activate the blocked links whenever the
active link fails. Therefore, we can say that it also provides fault tolerance on a
network.
Ports in STP
o Root port: The root port is a port that has the lowest cost path to the root bridge.
o Designated port: The designated port is a port that forwards the traffic away
from the root bridge.
o Blocking port: The blocking port is a port that receives the frames, but it neither
forwards nor sends the frames. It simply drops the received frames.
o Backup port: The backup port is a port that provides the backup path in a
spanning
tree if a designated port fails. This port gets active immediately when the
designated port fails.
o Alternate port: The alternate port is a port that provides the alternate path to the
root bridge if the root bridge fails.
Suppose there are four switches A, B, C, and D on a local area network. There are
redundant links that exist among these interconnected devices. In the above figure, there
are two paths that exist, i.e., DBA and DCA. Link redundancy is good for network
availability, but it creates layer 2 loops. The question arises "how network blocks the
unwanted links to avoid the loops without destroying the link redundancy?". The answer
to this question is STP. First, STP chooses one switch as a root bridge. In the above case,
A switch is chosen as a root bridge. Next, other switches select the path to the root bridge,
having the least path cost. Now we look at the switch B. For switch B, there are two paths
that exist to reach switch A (root bridge), i.e., BDCA and BA. The path BDCA costs 7 while
the path BA costs 2. Therefore, path BA is chosen to reach the root bridge. The port at
switch B is selected as a root port, and the other end is a designated port. Now we look at
the switch C. From switch C, there are two paths that exist, i.e., CDBA and CA. The least-
cost path is CA, as it costs 1. Thus, it is selected as a root port, and the other end is selected
as a designated port. Now we look at the switch D. For switch D, there are two paths that
exist to reach switch A, i.e., DBA and DCA. The path DBA costs 4 while the DCA costs 5.
Therefore, path DBA is chosen as it has the least cost path. The port on D is selected as a
root port, and on the other end, switch B is selected as a designated port. In this example,
we have observed that the root bridge can contain many designated ports, but it does not
contain a root port.
SMTP Protocol
The SMTP model is of two types:
End-to-End Method
Store-and-Forward Method
The end-to-end model is used to communicate between different organizations
whereas the store and forward method is used within an organization. An SMTP client
who wants to send the mail will contact the destination’s host SMTP directly, to send
the mail to the destination. The SMTP server will keep the mail to itself until it is
successfully copied to the receiver’s SMTP.
The client SMTP is the one that initiates the session so let us call it the client-SMTP and
the server SMTP is the one that responds to the session request so let us call it receiver-
SMTP. The client-SMTP will start the session and the receiver SMTP will respond to the
request.
Model of SMTP System
In the SMTP model user deals with the user agent (UA), for example, Microsoft Outlook,
Netscape, Mozilla, etc. To exchange the mail using TCP, MTA is used. The user sending
the mail doesn’t have to deal with MTA as it is the responsibility of the system admin to
set up a local MTA. The MTA maintains a small queue of mail so that it can schedule
repeat delivery of mail in case the receiver is not available. The MTA delivers the mail
to the mailboxes and the information can later be downloaded by the user agents.
SMTP Model
Components of SMTP
Mail User Agent (MUA): It is a computer application that helps you in sending and
retrieving mail. It is responsible for creating email messages for transfer to the mail
transfer agent(MTA).
Mail Submission Agent (MSA): It is a computer program that receives mail from a
Mail User Agent(MUA) and interacts with the Mail Transfer Agent(MTA) for the
transfer of the mail.
Mail Transfer Agent (MTA): It is software that has the work to transfer mail from
one system to another with the help of SMTP.
Mail Delivery Agent (MDA): A mail Delivery agent or Local Delivery Agent is
basically a system that helps in the delivery of mail to the local system.
Working of SMTP
Below mentioned are the steps of the working of SMTP [Simple Mail Transfer Protocol].
Communication between the sender and the receiver: The sender’s user agent
prepares the message and sends it to the MTA. The MTA’s responsibility is to
transfer the mail across the network to the receiver’s MTA. To send mail, a system
must have a client MTA, and to receive mail, a system must have a server MTA.
Sending Emails: Mail is sent by a series of request and response messages between
the client and the server. The message which is sent across consists of a header and
a body. A null line is used to terminate the mail header and everything after the null
line is considered the body of the message, which is a sequence of ASCII characters.
The message body contains the actual information read by the receipt.
Receiving Emails: The user agent on the server-side checks the mailboxes at a
particular time of intervals. If any information is received, it informs the user about
the mail. When the user tries to read the mail it displays a list of emails with a short
description of each mail in the mailbox. By selecting any of the mail users can view
its contents on the terminal.
Working of SMTP
MIME Protocol
MIME stands for Multipurpose Internet Mail Extensions. It is used to extend the
capabilities of Internet e-mail protocols such as SMTP. The MIME protocol allows the
users to exchange various types of digital content such as pictures, audio, video, and
various types of documents and files in the e-mail. MIME was created in 1991 by a
computer scientist named Nathan Borenstein at a company called Bell Communications.
MIME is an e-mail extension protocol, i.e., it does not operate independently, but it helps
to extend the capabilities of e-mail in collaboration with other protocols such as SMTP.
Since MIME was able to transfer only text written file in a limited size English language
with the help of the internet. At present, it is used by almost all e-mail related service
companies such as Gmail, Yahoo-mail, Hotmail.
MIME protocol is used to transfer e-mail in the computer network for the following
reasons:
1. The MIME protocol supports multiple languages in e-mail, such as Hindi, French,
Japanese, Chinese, etc.
2. Simple protocols can reject mail that exceeds a certain size, but there is no word
limit in MIME.
3. Images, audio, and video cannot be sent using simple e-mail protocols such as
SMTP. These require MIME protocol.
4. Many times, emails are designed using code such as HTML and CSS, they are
mainly used by companies for marketing their product. This type of code uses
MIME to send email created from HTML and CSS.
MIME Header
MIME adds five additional fields to the header portion of the actual e-mail to extend the
properties of the simple email protocol. These fields are as follows:
1. MIME Version: It defines the version of the MIME protocol. This header usually has a
parameter value 1.0, indicating that the message is formatted using MIME.
2. Content Type: It describes the type and subtype of information to be sent in the
message. These messages can be of many types such as Text, Image, Audio, Video, and
they also have many subtypes such that the subtype of the image can be png or jpeg.
Similarly, the subtype of Video can be WEBM, MP4 etc.
3. Content Type Encoding: In this field, it is told which method has been used to convert
mail information into ASCII or Binary number, such as 7-bit encoding, 8-bit encoding, etc.
4. Content Id: In this field, a unique "Content Id" number is appended to all email
messages so that they can be uniquely identified.
5. Content description: This field contains a brief description of the content within the
email. This means that information about whatever is being sent in the mail is clearly in
the "Content Description". This field also provides the information of name, creation date,
and modification date of the file.
1. It is capable of sending various types of files in a message, such as text, audio, video
files.
2. It also provides the facility to send and receive emails in different languages like
Hindi, French, Japanese, Chinese etc.
3. It also provides the facility of connecting HTML and CSS to email, due to which
people can design email as per their requirement and make it attractive and
beautiful.