CN Unit 1
CN Unit 1
CN Unit 1
SYLLABUS:
Network hardware, Network software, OSI, TCP/IP Reference models, Example
Networks: ARPANET, Internet.
Physical Layer: Guided Transmission media: twisted pairs, coaxial cable, fiber
optics, Wireless Transmission.
Data link layer: Design issues, framing, Error detection and correction.
I. Network Definition:
A network can be defined as two or more computers connected together in such a way that they
can share resources.
The purpose of a network is to share resources.
A resource may be:
• A file
• A folder
• A printer
• A disk drive
• Or just about anything else that exists on a computer.
A network is simply a collection of computers or other hardware devices that are connected
together, either physically or logically, using special hardware and software,
To allow them to exchange information and cooperate. Networking is the term that describes
the processes involved in designing, implementing, upgrading, managing and otherwise
working with networks and network technologies.
Advantages of Networking
• Connectivity and Communication
• Data Sharing
• Hardware Sharing
• Internet Access
• Internet Access Sharing
• Data Security and Management
• Performance Enhancement and Balancing
• Entertainment
A local area network (LAN) is a computer network covering a small geographic area, like a
home, office, or group of buildings
– small size
– transmission technology
• single cable
• 10Mbps ~ 10Gb/s
• 10Gb/s : 10,000,000.000 bps
– topology:
• bus
– Ethernet (IEEE 802.3): 10 or 100 Mbps (10Gb/s)
• ring
– IBM token ring (IEEE 802.5): 4 or 16 Mbps
A metropolitan area network (MAN) is a network that interconnects users with computer
resources in a geographic area or region larger than that covered by even a large local area
network (LAN) but smaller than the area covered by a wide area network (WAN). The term is
applied to the interconnection of networks in a city into a single larger network (which may then
also offer efficient connection to a wide area network). It is also used to mean the
Sreedevi Kadiyala Page 2
interconnection of several local area networks by bridging them with backbone lines. The latter
usage is also sometimes referred to as a campus network.
• Wide Area Network (WAN) is a computer network that covers a broad area (i.e., any
network whose communications links cross metropolitan, regional, or national
boundaries). Or, less formally, a network that uses routers and public communications
links
• The largest and most well-known example of a WAN is the Internet.
• WANs are used to connect LANs and other types of networks together, so that users and
computers in one location can communicate with users and computers in other locations
A topology is a way of “laying out” the network. Topologies can be either physical or logical.
Physical topologies describe how the cables are run.
Logical topologies describe how the network messages travel
Types of Topologies
• Bus (can be both logical and physical)
• Star (physical only)
• Ring (can be both logical and physical)
• Mesh (can be both logical and physical)
• Hybrid
Bus Topology
2. STAR Topology
• Star topologies are easy to install. A cable is run from each workstation to the hub. The
hub is placed in a central location in the office.
• Star topologies are more expensive to install than bus networks, because there are several
more cables that need to be installed, plus the cost of the hubs that are needed.
3. Ring Topology:
• Each computer connects to two other computers, joining them in a circle creating a
unidirectional path where messages move workstation to workstation.
• Each entity participating in the ring reads a message, then regenerates it and hands it to
its neighbor on a different network cable.
• The mesh topology is the simplest logical topology in terms of data flow, but it is the
most complex in terms of physical design.
• In this physical topology, each device is connected to every other device
• This topology is rarely found in LANs, mainly because of the complexity of the cabling.
• If there are x computers, there will be (x × (x–1)) ÷ 2 cables in the network. For example,
if you have five computers in a mesh network, it will use 5 × (5 – 1) ÷ 2, which equals 10
cables. This complexity is compounded when you add another workstation.
5. Hybrid topology: A hybrid topology is a type of network topology that uses two or more
differing network topologies. These topologies can include a mix of bus topology,
mesh topology, ring topology, star topology, and tree topology
• Switch:
– Split large networks into small segments, decreasing the number of users sharing
the same network resources and bandwidth.
– Understands when two devices want to talk to each other, and gives them a
switched connection
– Helps prevent data collisions and reduces network congestion, increasing network
performance.
– Most home users get very little, if any, advantage from switches, even when
sharing a broadband connection.
• Bridge
Resides on Layer 2 of the OSI model.
– Connects two LANs and forwards or filters data packets between them.
– Creates an extended network in which any two workstations on the linked LANs
can share data.
– Transparent to protocols and to higher level devices like routers.
– Forward data depending on the Hardware (MAC) address, not the Network
address (IP).
– Resides on Layer 2 of the OSI model.
• Repeater
– Used to boost the signal between two cable segments or wireless access points.
– Can not connect different network architecture.
– Does not simply amplify the signal, it regenerates the packets and retimes them.
Resides on Layer 1 of the OSI model
• Router
– A device that connects any number of LANs.
– Uses standardized protocols to move packets efficiently to their destination.
– More sophisticated than bridges, connecting networks of different types (for
example, star and token ring)
– Forwards data depending on the Network address (IP), not the Hardware (MAC)
address.
– Routers are the only one of these four devices that will allow you to share a single
IP address among multiple network clients.
– Resides on Layer 3 of the OSI model.
• Additional Network Hardware Devices
– Network Interface Cards (NICs)
• Puts the data into packets and transmits packet onto the network.
• May be wired or wireless.
– Gateway
Network Software:
o OSI stands for Open System Interconnection is a reference model that describes how
information from a software application in one computer moves through a physical
medium to the software application in another computer.
o OSI consists of seven layers, and each layer performs a particular network function.
o OSI model was developed by the International Organization for Standardization (ISO) in
1984, and it is now considered as an architectural model for the inter-computer
communications.
o The OSI model is divided into two layers: upper layers and lower layers.
o The upper layer of the OSI model mainly deals with the application related issues, and
they are implemented only in the software. The application layer is closest to the end
user. Both the end user and the application layer interact with the software applications.
An upper layer refers to the layer just above another layer.
o The lower layer of the OSI model deals with the data transport issues. The data link layer
and the physical layer are implemented in hardware and software. The physical layer is
the lowest layer of the OSI model and is closest to the physical medium. The physical
layer is mainly responsible for placing the information on the physical medium.
There are the seven OSI layers. Each layer has different functions. A list of seven layers are
given below:
1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
Sreedevi Kadiyala Page 8
OSI Model's 7 Layers
Application to Application
APPLICATION APPLICATION
Application to Application
PRESENTATION PRESENTATION
Application to Application
SESSION SESSION
Hop to Hop
DATA LINK Switch DATA LINK
Hop to Hop
29
When we transfer information from one device to another, it travels through 7 layers of OSI
model. First data travels down through 7 layers from the sender’s end and then climbs back 7
layers on the receiver’s end.
Each layer adds specific information to ensure the data reaches its destination correctly, and
these steps are reversed upon arrival.
Step 2: Mail application prepares for data transmission like encrypting data and formatting it
for transmission. (This happens in Layer 6: Presentation Layer)
Step 3: There is a connection established between the sender and receiver on the internet.
(This happens in Layer 5: Session Layer)
Step 4: Email data is broken into smaller segments. It adds sequence number and error-
checking information to maintain the reliability of the information. (This happens in Layer 4:
Transport Layer)
Step 5: Addressing of packets is done in order to find the best route for transfer. (This
happens in Layer 3: Network Layer)
Step 6: Data packets are encapsulated into frames, then MAC address is added for local
devices and then it checks for error using error detection. (This happens in Layer 2: Data
Link Layer)
Step 7: Lastly Frames are transmitted in the form of electrical/ optical signals over a physical
network medium like ethernet cable or WiFi.
The lowest layer of the OSI reference model is the physical layer. It is responsible for the
actual physical connection between the devices. The physical layer contains information in the
form of bits. It is responsible for transmitting individual bits from one node to the next. When
receiving data, this layer will get the signal received and convert it into 0s and 1s and send
them to the Data Link layer, which will put the frame back together.
• Bit Synchronization: The physical layer provides the synchronization of the bits by
providing a clock. This clock controls both sender and receiver thus providing
synchronization at the bit level.
• Bit Rate Control: The Physical layer also defines the transmission rate i.e. the number of
bits sent per second.
• Physical Topologies: Physical layer specifies how the different, devices/nodes are
arranged in a network i.e. bus, star, or mesh topology.
• Transmission Mode: Physical layer also defines how the data flows between the two
connected devices. The various transmission modes possible are Simplex, half-duplex and
full-duplex.
Note:
• Hub, Repeater, Modem, and Cables are Physical Layer devices.
• Network Layer, Data Link Layer, and Physical Layer are also known as Lower
Layers or Hardware Layers.
The data link layer is responsible for the node-to-node delivery of the message. The main
function of this layer is to make sure data transfer is error-free from one node to another, over
the physical layer. When a packet arrives in a network, it is the responsibility of the DLL to
transmit it to the Host using its MAC address.
The packet received from the Network layer is further divided into frames depending on the
frame size of the NIC(Network Interface Card). DLL also encapsulates Sender and Receiver’s
MAC address in the header.
• Framing: Framing is a function of the data link layer. It provides a way for a sender to
transmit a set of bits that are meaningful to the receiver. This can be accomplished by
attaching special bit patterns to the beginning and end of the frame.
• Physical Addressing: After creating frames, the Data link layer adds physical addresses
(MAC addresses) of the sender and/or receiver in the header of each frame.
• Error Control: The data link layer provides the mechanism of error control in which it
detects and retransmits damaged or lost frames.
• Flow Control: The data rate must be constant on both sides else the data may get corrupted
thus, flow control coordinates the amount of data that can be sent before receiving an
acknowledgment.
• Access Control: When a single communication channel is shared by multiple devices, the
MAC sub-layer of the data link layer helps to determine which device has control over the
channel at a given time.
Note:
• Packet in the Data Link layer is referred to as Frame.
• Data Link layer is handled by the NIC (Network Interface Card) and device drivers of host
machines.
• Switch & Bridge are Data Link Layer devices.
The network layer works for the transmission of data from one host to the other located in
different networks. It also takes care of packet routing i.e. selection of the shortest path to
• Routing: The network layer protocols determine which route is suitable from source to
destination. This function of the network layer is known as routing.
• Logical Addressing: To identify each device inter-network uniquely, the network layer
defines an addressing scheme. The sender & receiver’s IP addresses are placed in the
header by the network layer. Such an address distinguishes each device uniquely and
universally.
Note:
• Segment in the Network layer is referred to as Packet.
• Network layer is implemented by networking devices such as routers and switches.
The transport layer provides services to the application layer and takes services from the
network layer. The data in the transport layer is referred to as Segments. It is responsible for
the end-to-end delivery of the complete message. The transport layer also provides the
acknowledgment of the successful data transmission and re-transmits the data if an error is
found.
At the sender’s side: The transport layer receives the formatted data from the upper layers,
performs Segmentation, and also implements Flow and error control to ensure proper data
transmission. It also adds Source and Destination port numbers in its header and forwards the
segmented data to the Network Layer.
Note: The sender needs to know the port number associated with the receiver’s application.
Generally, this destination port number is configured, either by default or manually. For
example, when a web application requests a web server, it typically uses port number 80,
because this is the default port assigned to web applications. Many applications have default
ports assigned.
At the receiver’s side: Transport Layer reads the port number from its header and forwards
the Data which it has received to the respective application. It also performs sequencing and
reassembling of the segmented data.
• Segmentation and Reassembly: This layer accepts the message from the (session) layer,
and breaks the message into smaller units. Each of the segments produced has a header
associated with it. The transport layer at the destination station reassembles the message.
• Service Point Addressing: To deliver the message to the correct process, the transport
layer header includes a type of address called service point address or port address. Thus by
specifying this address, the transport layer makes sure that the message is delivered to the
correct process.
Sreedevi Kadiyala Page 13
Services Provided by Transport Layer
• Connection-Oriented Service
• Connectionless Service
In this type of transmission, the receiving device sends an acknowledgment, back to the
source after a packet or group of packets is received. This type of transmission is reliable and
secure.
2. Connectionless service: It is a one-phase process and includes Data Transfer. In this type
of transmission, the receiver does not acknowledge receipt of a packet. This approach allows
for much faster communication between devices. Connection-oriented service is more reliable
than connectionless Service.
Note:
This layer is responsible for the establishment of connection, maintenance of sessions, and
authentication, and also ensures security.
Functions of the Session Layer
• Session Establishment, Maintenance, and Termination: The layer allows the two
processes to establish, use, and terminate a connection.
• Synchronization: This layer allows a process to add checkpoints that are considered
synchronization points in the data. These synchronization points help to identify the error
so that the data is re-synchronized properly, and ends of the messages are not cut
prematurely and data loss is avoided.
• Dialog Controller: The session layer allows two systems to start communication with each
other in half-duplex or full-duplex.
Note:
• All the below 3 layers(including Session Layer) are integrated as a single layer in
the TCP/IP model as the “Application Layer”.
• Implementation of these 3 layers is done by the network application itself. These are also
known as Upper Layers or Software Layers.
• Device or Protocol Use : NetBIOS, PPTP.
Let us consider a scenario where a user wants to send a message through some Messenger
application running in their browser. The “Messenger” here acts as the application layer
which provides the user with an interface to create the data. This message or so-called Data is
compressed, optionally encrypted (if the data is sensitive), and converted into bits (0’s and
1’s) so that it can be transmitted.
The presentation layer is also called the Translation layer. The data from the application
layer is extracted here and manipulated as per the required format to transmit over the
network.
At the very top of the OSI Reference Model stack of layers, we find the Application layer
which is implemented by the network applications. These applications produce the data to be
transferred over the network. This layer also serves as a window for the application services to
access the network and for displaying the received information to the user.
Introduction TCP/IP
The Internet Protocol Suite (commonly known as TCP/IP) is the set of communications
protocols used for the Internet and other similar networks.
APPLICATION Layer: This layer also contains the high level protocols. The main issue
with this layer is the ability to use both TCP and UDP protocols.
TRANSPORT Layer: This layer acts as the delivery service used by the application layer.
Sreedevi Kadiyala Page 16
Again the two protocols used are TCP and UDP.
The choice is made based on the application's transmission reliability requirements.
The transport layer also handles all error detection and recovery.
INTERNET Layer: This layer is also known as Internet layer. The main purpose of this
layer is to organize or handle the movement of data on network.
Physical &Data link Layer: This layer is also known as network interface layer
This layer normally consists of device drivers in the OS and the network interface card
attached to the system.
Both the device drivers and the network interface card take care of the communication
details with the media being used to transfer the data over the network
PHYSICAL LAYER:
• Guided media, which are those that provide a conduit from one device to another,
include twisted-pair cable, coaxial cable, and fiber- optic cable.
• Twisted pair cable: Consists of two insulated copper wires arranged in a regular spiral
pattern to minimize the electromagnetic interference between adjacent pairs
• Often used at customer facilities and also over distances to carry voice as well as data
communications
Low frequency transmission medium
• Higher bandwidth
– 400 to 600Mhz
– up to 10,800 voice conversations
• Can be tapped easily (pros and cons)
• Much less susceptible to interference than twisted pair
Fiber Optic Cable: Relatively new transmission medium used by telephone companies
in place of long-distance trunk lines
EXAMPLES:
Intranet: An intranet is a private network that is contained within an enterprise. It may consist
of many interlinked local area networks and also use leased lines in the wide area network.
An intranet uses TCP/IP,HTTP, and other Internet protocols and in general looks like a private
version of the Internet. With tunnenling, companies can send private messages through the
public network, using the public network with special encryption/decryption and other security
safeguards to connect one part of their intranet to another.
The data link layer is the second layer from the bottom in the OSI (Open System
Interconnection) network architecture model. It is responsible for the node-to-node delivery of
data. Its major role is to ensure error-free transmission of information. DLL is also responsible
for encoding, decoding, and organizing the outgoing and incoming data.
This is considered the most complex layer of the OSI model as it hides all the underlying
complexities of the hardware from the other above layers. In this article, we will discuss Data
Link Layer in Detail along with its functions, and sub-layers.
The data link layer is further divided into two sub-layers, which are as follows:
Framing:
The packet received from the Network layer is known as a frame in the Data link layer. At the
sender’s side, DLL receives packets from the Network layer and divides them into small
frames, then, sends each frame bit-by-bit to the physical layer. It also attaches some special
bits (for error control and addressing) at the header and end of the frame. At the receiver’s
end, DLL takes bits from the Physical layer organizes them into the frame, and sends them to
the Network layer.
Addressing
The data link layer encapsulates the source and destination’s MAC address/ physical address
in the header of each frame to ensure node-to-node delivery. MAC address is the unique
hardware address that is assigned to the device while manufacturing.
Flow Control
If the receiver’s receiving speed is lower than the sender’s sending speed, then this can lead to
an overflow in the receiver’s buffer and some frames may get lost. So, it’s the responsibility
of DLL to synchronize the sender’s and receiver’s speeds and establish flow control between
them.
Access Control
When multiple devices share the same communication channel there is a high probability of
collision, so it’s the responsibility of DLL to check which device has control over the channel
and CSMA/CD and CSMA/CA can be used to avoid collisions and loss of frames in the
channel.
Framing
The data link layer encapsulates each data packet from the network layer into frames that are
then transmitted.
• Frame Header
• Payload field that contains the data packet from network layer
• Trailer
Data-link layer uses error control techniques to ensure that frames, i.e. bit streams of data, are
transmitted from the source to the destination with a certain extent of accuracy.
Errors
When bits are transmitted over the computer network, they are subject to get corrupted due to
interference and network problems. The corrupted bits leads to spurious data being received by
the destination and are called errors.
Types of Errors
Errors can be of three types, namely single bit errors, multiple bit errors, and burst errors.
• Single bit error − In the received frame, only one bit has been corrupted, i.e. either
changed from 0 to 1 or from 1 to 0.
• Multiple bits error − In the received frame, more than one bits are corrupted.
• Burst error − In the received frame, more than one consecutive bits are corrupted.
• Error detection − Error detection involves checking whether any error has occurred or
not. The number of error bits and the type of error does not matter.
• Error correction − Error correction involves ascertaining the exact number of bits that
has been corrupted and the location of the corrupted bits.
For both error detection and error correction, the sender needs to send some additional bits
along with the data bits. The receiver performs necessary checks based upon the additional
redundant bits. If it finds that the data is free from errors, it removes the redundant bits before
passing the message to the upper layers.
There are three main techniques for detecting errors in frames: Parity Check, Checksum,
and Cyclic Redundancy Check (CRC).
Parity Check
The parity check is done by adding an extra bit, called parity bit to the data to make a number of
1s either even in case of even parity or odd in case of odd parity.
While creating a frame, the sender counts the number of 1s in it and adds the parity bit in the
following way
• In case of even parity: If a number of 1s is even then parity bit value is 0. If the number
of 1s is odd then parity bit value is 1.
• In case of odd parity: If a number of 1s is odd then parity bit value is 0. If a number of 1s
is even then parity bit value is 1.
On receiving a frame, the receiver counts the number of 1s in it. In case of even parity check, if
the count of 1s is even, the frame is accepted, otherwise, it is rejected
The parity check is suitable for single bit error detection only.
Checksum
Cyclic Redundancy Check (CRC) involves binary division of the data bits being sent by a
predetermined divisor agreed upon by the communicating system. The divisor is generated
using polynomials.
• Here, the sender performs binary division of the data segment by the divisor. It then
appends the remainder called CRC bits to the end of the data segment. This makes the
resulting data unit exactly divisible by the divisor.
• The receiver divides the incoming data unit by the divisor. If there is no remainder, the
data unit is assumed to be correct and is accepted. Otherwise, it is understood that the
data is corrupted and is therefore rejected.
Error correction techniques find out the exact number of bits that have been corrupted and as
well as their locations. There are two principle ways
* * *