0% found this document useful (0 votes)
5 views

unit I PPT2

Uploaded by

Thangaaruna M
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

unit I PPT2

Uploaded by

Thangaaruna M
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 134

191CS54 – Computer Networks

Syllabus
• Course Plan
NETWORK
• A network is a set of devices (often referred to
as nodes) connected by communication links.
• A node can be a computer, printer, or any
other device capable of sending or receiving
data generated by other nodes on the network.
• When we communicate, we are sharing
information. This sharing can be local or
remote.
---------------
Line configuration / line
connectivity
1.POINT TO POINT
2. MULTIPOINT
CHARACTERISTICS OF A NETWORK
The effectiveness of a network depends on the following characteristics.
• Fault Tolerance
• Scalability
– Grow based on the needs
– Have good performance after growth
• Quality of Service(QOS)
– Set priorities
– Manage data traffic to reduce delay, data loss etc.,
• Security
• Delivery: The system must deliver data to the correct destination.
• Accuracy: The system must deliver data accurately.
• Timeliness: The system must deliver data in a timely manner.
CRITERIA NECESSARY FOR AN
EFFECTIVE AND EFFICIENTNETWORK
A network must be able to meet a certain number of criteria. The
most important of these are performance, reliability, and security.
• Factors that affect the Performance of a network:
– Number of users
– Type of transmission medium
– Capabilities of the connected hardware
• Factors that affect the Reliability of a network:
– Efficiency of software
– Frequency of failure
– Recovery time of a network after a failure
• Factors that affect the Security of a network:
– Protecting data from unauthorized access and viruses
COMPONENTS

Message - It is the information to be communicated. Popular forms of


information include text, pictures, audio, video etc.
Sender - It is the device which sends the data messages. It can be a computer,
workstation, telephone handset etc.
Receiver – It is the device which receives the data messages. It can be a
computer, workstation, telephone handset etc.
Transmission Medium - It is the physical path by which a message travels
from sender to receiver. Some examples include twisted-pair wire, coaxial
cable, radio waves etc.
Protocol - It is a set of rules that governs the data communications. It
represents an agreement between the communicating devices. Without a
protocol, two devices may be connected but not communicating.
KEY ELEMENTS OF PROTOCOL

• Syntax: Refers to the structure or format of the


data , meaning the order in which they are
presented.
• Semantics: Refers to the meaning of each
section of bits.
• Timing: Refers to two characteristics.
– When data should be sent.
– How fast they can be sent.
TRANSMISSION MODES
Simplex Mode

EXAMPLE: The radio station ,


Keyboard , Mouse
Half – Duplex Mode

EXAMPLE: Walkie-talkie
Full-Duplex Mode
NETWORK TOPOLOGY
• Arrangement of nodes of a computer network.
• Topology can be viewed as,
– Physical Topology
– Logical Topology
• Types:
– Bus (Ethernet)
– Ring (Industrial control systems-monitor and control processes)
– Star (airports, hospitals, banks, and educational institutions)
– Mesh (smart home systems)
– Hybrid
BUS
RING
STAR
EXTENDED STAR TOPOLOGY
MESH
NETWORK TYPES
• A computer network is a group of computers linked
to each other that enables the computer to
communicate with another computer and share their
resources, data, and applications.
• A computer network can be categorized by their
size.
• A computer network is mainly of three types:
– Local Area Network (LAN)
– Wide Area Network (WAN)
– Metropolitan Area Network (MAN)
Local Area Network
Local Area Network (LAN)
• A group of computers connected to each other
in a small area such as building, office.
• Used for connecting two or more personal
computers through a communication medium
such as twisted pair, coaxial cable, etc.
• The data is transferred at an extremely faster
rate in Local Area Network.
• LAN can be connected using a common cable
or a Switch.
Advantages of LAN
• Resource Sharing
• Software Applications Sharing.
• Easy and Cheap Communication
• Centralized Data.
• Data Security
• Internet Sharing
DisadvantagesofLAN
• High Setup Cost
• Data Security Threat
• LAN Maintenance Job
• Covers Limited Area
WIDE AREA NETWORK (WAN)
• A Wide Area Network is a network that
extends over a large geographical area such as
states or countries.
• A Wide Area Network is quite bigger network
than the LAN.
• The internet is one of the biggest WAN in the
world.
Advantages:
•Large Geographical area
•Centralized data
•Exchange messages
•Sharing of software and resources
•High bandwidth
Disadvantages:
•Security issue
•Needs Firewall & antivirus software
•High Setup cost
•Troubleshooting problems
METROPOLITAN AREA NETWORK
(MAN)
• covers a larger geographic area by interconnecting a
different LAN to form a larger network.
• covers towns and cities (50 km)
• adequate for distributed computing applications.
• various LANs are connected to each other through a
telephone exchange line.
TRANSMISSION MEDIA
• Transmission media is a communication channel that carries the information
from the sender to the receiver.
• Data is transmitted through the electromagnetic signals.
• The main functionality of the transmission media is to carry the information in
the form of bits (Either as Electrical signals or Light pulses).
• It is a physical path between transmitter and receiver in data communication.
• The characteristics and quality of data transmission are determined by the
characteristics of medium and signal.
• Transmission media is of two types:
– Guided Media(Wired)
– UnGuided Media(wireless).
• Inguided (wired) media, medium characteristics are more important whereas, in
unguided (wireless) media, signal characteristics are more important.
• Different transmission media have different properties such as bandwidth, delay,
cost and ease of installation and maintenance.
• The transmission media is available in the
lowest layer of the OSI reference model,i.e.,
Physical layer.
FACTORS FOR DESIGNING THE
TRANSMISSION MEDIA
• Bandwidth: All the factors are remaining constant, the
greater the bandwidth of a medium, the higher the data
transmission rate of a signal.
• Transmission impairment: When the received signal is
not identical to the transmitted one due to the
transmission impairment. The quality of the signals will
get destroyed due to transmission impairment.
• Interference: An interference is defined as the process
of disrupting a signal when it travels over a
communication medium on the addition of some
unwanted signal.
CAUSES OF TRANSMISSION
IMPAIRMENT

Attenuation: Attenuation means the loss of energy, i.e., the strength of the
signal decreases with increasing the distance which causes the loss of
energy.
Distortion: Distortion occurs when there is a change in the shape of the
signal. This type of distortion is examined from different signals having
different frequencies. Each frequency component has its own propagation
speed, so they reach at a different time which leads to the delay distortion.
Noise: When data is travelled over a transmission medium, some
unwanted signal is added to it which creates the noise.
TYPES
GUIDED MEDIA
• It is defined as the physical medium through
which the signals are transmitted.
• It is also known as Bounded media.
• Types of Guided media:
– Twisted Pair Cable
– Coaxial Cable
– Fibre Optic Cable
TWISTED PAIR CABLE

• Twisted pair is a physical media made up of a pair of


cables twisted with each other.
• A twisted pair cable is cheap as compared to other
transmission media.
• Installation of the twisted pair cable is easy, and it is a light
weight cable.
• The frequency range for twisted pair cable is from 0 to
3.5KHz.
• A twisted pair consists of two insulated copper wires
arranged in a regular spiral pattern.
Unshielded Twisted Pair

An unshielded twisted pair is widely used in telecommunication. Following


are the categories of the unshielded twisted pair cable:
Category1:Suportslow-speeddata.
Category2:Itcansupportupto4Mbps.
Category3:Itcansupportupto16Mbps.
Category4:Itcansupportupto20Mbps.
Category5:Itcansupportupto200Mbps.
Advantages :
It is cheap.
Installation of the unshielded twisted pair is easy.
It can be used for high-speed LAN.

Disadvantage:
This cable can only be used for shorter distances because of attenuation.
Shielded Twisted Pair

A shielded twisted pair is a cable that contains the mesh surrounding


the wire that allows the higher transmission rate.
Advantages :
The cost of the shielded twisted pair cable is not very high and not very low.
Installation of STP is easy.
It has higher capacity as compared to unshielded twisted pair cable.
It is shielded that provides the higher data transmission rate.
Disadvantages:
It is more expensive as compared to UTP and coaxial cable.
It has a higher attenuation rate.
COAXIAL CABLE
• Coaxial cable (Coax) is a very commonly used transmission media, for
example, TV wire is usually a coaxial cable.
• The name of the cable is coaxial as it contains two conductors parallel
to each other.
• It has a higher frequency as compared to Twisted pair cable.
• The inner conductor of the coaxial cable is made up of copper, and the
outer conductor is made up of copper mesh.
• The middle core is made up of non-conductive cover that separates the
inner conductor from the outer conductor.
• The middle core is responsible for the data transferring where as the
copper mesh prevents from the EMI(Electro magnetic interference).
• Common applications of coaxial cable are Cable TV networks and
traditional Ethernet LANs.
Coaxial Cable Standards
• Coaxial cables are categorized by their Radio Government(RG) ratings.
• Each RG number denotes a unique set of physical specifications, including the wire gauge of the
inner conductor, the thickness and type of the inner insulator, the construction of the shield, and the
size and type of the outer casing.
• Each cable defined by an RG rating is adapted for a specialized function.
Types of Coaxial cable:
• Base band transmission: It is defined as the process of transmitting a single signal at high speed.
• Broad band transmission: It is defined as the process of transmitting multiple signals
simultaneously.
Advantages:
• The data can be transmitted at high speed.
• It has better shielding as compared to twisted pair cable.
• It provides higher bandwidth.
Disadvantages:
• It is more expensive as compared to twisted pair cable.
• If any fault occurs in the cable causes the failure in the entire network.

FIBRE OPTIC CABLE
Fibre optic cable is a cable that uses electrical signals for communication.
• Fibre optic is a cable that holds the optical fibres coated in plastic that are used to send the data by pulses
of light.
• The plastic coating protects the optical fibres from heat, cold, electromagnetic interference from other
types of wiring.
• Fibre optics provide faster data transmission than copper wires.
Basic elements of Fibre optic cable:
• Core: The optical fibre consists of a narrow strand of glass or plastic known as a core. A core is a light
transmission area of the fibre.The more the area of the core, the more light will be transmitted into the
fibre.
• Cladding: The concentric layer of glass is known as cladding. The main functionality of the cladding is to
provide the lower refractive index at the core interface as to cause the reflection within the core so that the
light waves are transmitted through the fibre.
• Jacket:The protective coating consisting of plastic is known as a jacket. The main purpose of a jacket is to
preserve the fibre strength, absorb shock and extra fibre protection.
Advantages:
– Greater Bandwidth
– Less signal attenuation
– Immunity to electromagnetic interference
– Resistance to corrosive materials
– Light weight
– Greater immunity to tapping
Disadvantages:
– Requires Expertise for Installation and maintenance
– Unidirectional light propagation.
– Higher Cost.
Propagation Modes of Fibre Optics
• Current technology supports two
modes(multimode and single mode) for
propagating light along optical channels, each
requiring fiber with different physical
characteristics.
• Multimode can be implemented in two forms:
– step-index
– graded-index.
Multimode Propagation
• Multimode is so named because multiple
beams from a light source move through the
core in different paths.
• How these beams move within the cable
depends on the structure of the core.
Single mode
• Single-mode uses step-index fiber and a highly focused source of
light that limits beams to a small range of angles, all close to the
horizontal.
• The single-mode fiber itself is manufactured with a much smaller
diameter than that of multimode fibre, and with substantially lower
density(index of refraction).
• The decrease in density results in a critical angle that is close
enough to 90° to make the propagation of beams almost horizontal.
• In this case, propagation of different beams is almost identical, and
delays are negligible. All the beams arrive at the destination
“together” and can be recombined with little distortion to the
signal.
UNGUIDED MEDIA
• An unguided transmission transmits the
electromagnetic waves without using any physical
medium. Therefore it is also known as wireless
transmission.
• In unguided media, air is the media through which the
electromagnetic energy can flow easily.
• Unguided transmission is broadly classified into three
categories :
– Radio Waves, Microwaves , Infrared
RADIO WAVES
– Radio waves are the electromagnetic waves that are
transmitted in all the directions of free space.
– Radio waves are omnidirectional, i.e., the signals are
propagated in all the directions.
– The range in frequencies of radio waves is from 3Khz
to 1Khz.
– In the case of radio waves, the sending and receiving
antenna are not aligned, i.e., the wave sent by the
sending antenna can be received by any receiving
antenna.
– An example of the radio wave is FM radio.
• Applications of Radio waves:
– A Radio wave is useful for multicasting when there is
one sender and many receivers.
– An FM radio, television, cordless phones are
examples of a radio wave.
• Advantages of Radio waves:
– Radio transmission is mainly used for wide area
networks and mobile cellular phones.
– Radio waves cover a large area, and they can
penetrate the walls.
– Radio transmission provides a higher transmission
rate.
MICRO WAVES
Microwaves are of two types - Terrestrial microwave &
Satellite microwave
Terrestrial Microwave
– Terrestrial Microwave transmission is a technology that
transmits the focused beam of a radio signal from one
ground-based microwave transmission antenna to another.
– Microwaves are the electromagnetic waves having the
frequency in the range from 1GHz to 1000 GHz.
– Microwaves are unidirectional as the sending and receiving
antenna is to be aligned, i.e., the waves sent by the sending
antenna are narrowly focused.
– In this case, antennas are mounted on the towers to send a
beam to another antenna which is km away.
– It works on the line of sight transmission, i.e., the antennas
mounted on the towers are at the direct sight of each other.
Characteristics of Terrestrial Microwave:
• Frequency range: The frequency range of terrestrial microwave is from 4-6
GHz to 21-23 GHz.
• Bandwidth: It supports the bandwidth from 1 to 10 Mbps.
• Short distance: It is inexpensive for short distance.
• Long distance: It is expensive as it requires a higher tower for a longer
distance.
• Attenuation: Attenuation means loss of signal. It is affected by environmental
conditions and antenna size.
Advantages of Terrestrial Microwave:
– Microwave transmission is cheaper than using cables.
– It is free from land acquisition as it does not require any land for the installation of
cables.
– Microwave transmission provides an easy communication in terrains as the installation
of cable in terrain is quite a difficult task.
– Communication over oceans can be achieved by using microwave transmission.
Disadvantages of Terrestrial Microwave:
– Eavesdropping.
– Out of phase signal
– Susceptible to weather condition
Satellite Microwave
– A satellite is a physical object that revolves
around the earth at a known height.
– Satellite communication is more reliable
nowadays as it offers more flexibility than
cable and fibre optic systems.
– We can communicate with any point on the
globe by using satellite communication.
– The satellite accepts the signal that is
transmitted from the earth station, and it
amplifies the signal. The amplified signal is
retransmitted to another earth station.
Advantages of Satellite Microwave:
– The coverage area of a satellite microwave is more than the terrestrial
microwave.
– The transmission cost of the satellite is independent of the distance from
the centre of the coverage area.
– Satellite communication is used in mobile and wireless communication
applications.
– It is easy to install.
– It is used in a wide variety of applications such as weather forecasting,
radio/TV signal broadcasting, mobile communication, etc.
Disadvantages of Satellite Microwave:
– Satellite designing and development requires more time and higher cost.
– The Satellite needs to be monitored and controlled on regular periods so
that it remains in orbit.
– The life of the satellite is about 12-15 years. Due to this reason, another
launch of the satellite has to be planned before it becomes non-functional.
INFRARED WAVES
– An infrared transmission is a wireless technology used for
communication over short ranges.
– The frequency of the infrared in the range from 300 GHz to 400
THz.
– It is used for short-range communication such as data transfer
between two cell phones, TV remote operation, data transfer between
a computer and cell phone and devices that resides in the same
closed area.
Characteristics of Infrared:
– It supports high bandwidth, and hence the data rate will be very high.
– Infrared waves cannot penetrate the walls. Therefore, the infrared
communication in one room cannot be interrupted by the nearby
rooms.
– An infrared communication provides better security with minimum
interference.
– Infrared communication is unreliable outside the building because
the sun rays will interfere with the infrared waves.
Layering and Protocols
• Abstraction—the hiding of details behind a well-defined
interface and it is the fundamental tool used by system
designers to manage complexity.
• Abstractions naturally lead to layering.
• The general idea is that you start with the services offered
by the underlying hardware and then add a sequence of
layers, each providing a higher (more abstract) level of
service.
• The services provided at the high layers are implemented
in terms of the services provided by the low layers.
• Layering provides two nice features.
– It decomposes the problem of building a network into
more manageable components.
– It provides a more modular design. If you decide that
you want to add some new service, you may only
need to modify the functionality at one layer, reusing
the functions provided at all the other layers.

Application programs Application programs


Process-to-process channels Request/Reply Message stream
Channel channel
Host-to-host connectivity Host-to-host connectivity
Hardware Hardware
Layering as a foundation, we are now ready to
discuss the architecture of a network.

The abstract objects (important aspect of the


system) that make up the layers of a network
system are called protocols.

Each protocol defines two different interfaces.


Protocol Graph
Represent the suite of protocols that make up a network
system with a protocol graph. The nodes of the graph
correspond to protocols, and the edges represent a
depends on relation.
Encapsulation- High-level messages are
encapsulated inside of low-level messages.
OSI LAYER
• The ISO was one of the first organizations to formally
define a common way to connect computers.
• Their architecture, called the Open Systems
Interconnection (OSI) architecture defines a partitioning
of network functionality into seven layers.
• It is a model for understanding and designing a network
architecture that is flexible, robust and interoperable.
• It is not a protocol.
• It is only a guideline and hence it is referred as OSI
reference model.
• The purpose of OSI model is to show how to facilitate
communication between different systems without
requiring changes to the logic of the underlying hardware
and software.
Organization Of The OSI Layers
OSI Reference Model
Physical Layer
The physical layer coordinates the functions required to transmit
a bit stream over a physical medium.
The physical layer is concerned with the following functions:
– Physical characteristics of interfaces and media-The
physical layer defines the characteristics of the interface
between the devices and the transmission medium.
– Representation of bits - To transmit the stream of bits, it
must be encoded to signals. The physical layer defines the
type of encoding.
– Signals: It determines the type of the signal used for
transmitting the information.
– Data Rate or Transmission rate - The number of bits sent
each second –is also defined by the physical layer.
– Synchronization of bits- The sender and receiver must
be synchronized at the bit level. Their clocks must be
synchronized.
– Line Configuration-In a point-to-point configuration,
two devices are connected together through a dedicated
link. In a multipoint configuration, a link is shared
between several devices.
– Physical Topology - The physical topology defines
how devices are connected to make a network. Devices
can be connected using a mesh, bus, star or ring
topology.
– Transmission Mode-The physical layer also defines
the direction of transmission between two devices:
simplex, half-duplex or full-duplex.
Data Link Layer
• It is responsible for transmitting frames from one node to the
next node. The other responsibilities of this layer are ,
– Framing - Divides the stream of bits received into data
units called frames.
– Physical addressing – If frames are to be distributed to
different systems on the network , data link layer adds a
header to the frame to define the sender and receiver.
– Flow control- If the rate at which the data are absorbed by
the receiver is less than the rate produced in the sender, the
Data link layer imposes a flow ctrl mechanism.
– Error control- Used for detecting and retransmitting
damaged or lost frames and to prevent duplication of
frames. This is achieved through a trailer added at the end of
the frame.
– Medium Access control -Used to determine which device
has control over the link at any given time.
Network Layer
• This layer is responsible for the delivery of
packets from source to destination. It determines
the best path to move data from source to the
destination based on the network conditions, the
priority of service, and other factors. The other
responsibilities of this layer are
– Logical addressing - If a packet passes the network
boundary, we need another addressing system for
source and destination called logical address. This
addressing is used to identify the device on the internet.
– Routing – Routing is the major component of the
network layer, and it determines the best optimal path
out of the multiple paths from source to the destination.
Transport Layer
• Responsible for Process to Process delivery
• Ensures whether the message arrives in order or
not
• Port addressing / Service Point addressing
• Segmentation and reassembly
• Connection control
• Flow control
• Error Control
Session Layer
• Establishes, manages and terminates
connections between applications
• Dialog control - allows the communication
between two processes which can be either
half-duplex or full-duplex
• Synchronization - adds some checkpoints
when transmitting the data in a sequence
Presentation Layer
• concerned with the syntax and semantics of
information exchanged between two systems
• Translation
• Encryption and decryption
• Compression and expansion
Application Layer
• Enables the user to access the network
• Handles issues such as network transparency,
resource allocation, etc.
• Allows the user to log on to remote user
• FTAM (File Transfer, Access, Management)
• Mail services
• Directory services
Connecting Devices
• used to connect hosts together to make a
network or to connect networks together to
make an internet
• operate in different layers of the Internet
model
• divided into five different categories on the
basis of layers in which they operate in the
network
• Devices which operate below the physical
layer - Passive hub
• Devices which operate at the physical layer -
Repeater
• Devices which operate at the physical and
data link layers - Bridge
• Devices which operate at the physical layer,
data link layer and network layer –Router
• Devices which operate at all five layers -
Gateway
Hubs
• Several networks need a central location to
connect media segments together. These
central locations are called as hubs
• organizes the cables and transmits incoming
signals to the other media segments
• Types
– Passive hub
– Active Hub
– Intelligent Hub
Passive hub
• connector, which connects wires coming
from the different branches.
• By using passive hub, each computer can
receive the signal which is sent from all other
computers connected in the hub
Active Hub
• It is a multiport repeater, which can
regenerate the signal.
• It is used to create connections between two
or more stations in a physical star topology.

Intelligent Hub
• Intelligent hub contains a program of
network management and intelligent path
selection
Repeaters
• receives the signal and it regenerates the
signal in original bit pattern before the signal
gets too weak or corrupted.
• works on physical layer.
• has no filtering capability
• Used to expand the coverage area of the
network, repropagate a weak or broken signal
and or service remote nodes.
• amplify the received/input signal to a higher
frequency domain
• also known as signal boosters or range
extender.
• It cannot connect two LANs, but it connects
two segments of the same LAN
Bridges
• operate in physical layer as well as data link layer.
• As a physical layer device, they regenerate the
receive signal.
• As a data link layer, the bridge checks the physical
(MAC) address contained in the frame.
• has a filtering feature.
• It can check the destination address of a frame and
decides, if the frame should be forwarded or
dropped.
• used to connect two or LANs working on the same
protocol.
Types of Bridges
 Transparent Bridges
stations are completely unaware of the bridge’s
existence i.e. whether or not a bridge is added or deleted
from the network , reconfiguration of the stations is
unnecessary.
 Source Routing Bridges
routing operation is performed by source station and
the frame specifies which route to follow.
 Translation Bridges
connect networks with different architectures, such
as Ethernet and Token Ring. These bridges appear as:
– Transparent bridges to an Ethernet host
– Source-routing bridges to a Token Ring host
Switches
• small hardware device which is used to join multiple
computers together with one LAN
• allows us to interconnect links to form a large
network.
• data link layer device.
• multi port bridge with a buffer .
• used to forward the packets based on MAC addresses.
• operated in full duplex mode.
• Packet collision is minimum as it directly
communicates between source and destination.
• It does not broadcast the message
• used to transfer the data only to the device that
has been addressed
• Input ports receive stream of packets, analyzes the
header, determines the output port and passes the
packet onto the fabric.
• Ports contain buffers to hold packets before it is
forwarded.
• If buffer space is unavailable, then packets are
dropped.
• If packets at several input ports queue for a single
output port, then only one of them is forwarded.
Types of Switch
• Two- Layer Switch
– performs at the physical and the data link layer.
– make a filtering decision bases on the MAC
address of the received frame.
• Three- Layer Switch
– a router.
– The switching fabric in a three-layer allows a faster
table lookup and forwarding mechanism
Routers
• three-layer device operates in the physical, data-link, and
network layers.
• As a physical-layer device, it regenerates the signal it
receives.
• As a link-layer device, the router checks the physical
addresses (source and destination) contained in the packet.
• As a network-layer device, a router checks the network-layer
addresses.
• device like a switch that routes data packets based on their
IP addresses.
• connects the LANs and WANs on the internet.
• internetworking device.
• The key function of the router is to determine
the shortest path to the destination.
• Router has a routing table, which is used to
make decision on selecting the route.
• The routing table is updated dynamically
based on which they make decisions on
routing the data packets
Gateway
• operates in all five layers of the internet or
seven layers of OSI model.
• combination of hardware and software.
• connects two independent networks.
• more complex than switch or router.
• works as the messenger agents that take data
from one system, interpret it, and transfer it to
another system.
• also called protocol converters
• accepts a packet formatted for one protocol and
converts it to a packet formatted to another
protocol before forwarding it.
• The gateway must adjust the data rate, size and
data format.
Brouter
• hybrid device combines the features of both bridge and
router.
• Functions as a bridge for nonroutable protocols and a
router for routable protocols.
• As a router, it is capable of routing packets across
networks.
• As a bridge, it is capable of filtering local area network
traffic.
• Provides the best attributes of both a bridge and a router
• Operates at both the Data Link and Network layers and
can replace separate bridges and routers.
NETWORK SOFTWARE
Network architectures and protocol
specifications are essential things, but a good
blueprint is not enough to explain the
phenomenal success of the Internet.
One thing that has made the Internet such a
runaway success is the fact that so much of its
functionality is provided by software running
in general-purpose computers.
• The place to start when implementing a
network application is the interface exported by
the network.
• when we refer to the interface “exported by the
network,” we are generally referring to the
interface that the OS provides to its networking
subsystem. This interface is often called the
network application programming interface
(API).
• The main abstraction of the socket interface, not
surprisingly, is the socket.
• A good way to think of a socket is as the point
where a local application process attaches to the
network.
• The interface defines operations for creating a
socket, attaching the socket to the network,
sending/ receiving messages through the socket,
and closing the socket.
• To simplify the discussion, we will limit
ourselves to showing how sockets are used with
TCP.
1. The first step is to create a socket, which is done with the following
operation:
int socket(int domain, int type, int protocol)
• The reason that this operation takes three arguments is that the socket
interface was designed to be general enough to support any underlying
protocol suite.
• Specifically, the domain argument specifies the protocol family that is
going to be used:
– PF INET denotes the Internet family.
– PF UNIX denotes the Unix pipe facility.
– PF PACKET denotes direct access to the network interface (i.e., it
bypasses the TCP/IP protocol stack).
• The type argument indicates the semantics of the communication.
– SOCK STREAM is used to denote a byte stream.
– SOCK DGRAM is an alternative that denotes a message-oriented
service, such as that provided by UDP.
• The protocol argument identifies the specific protocol that is going to be
2. The next step depends on whether you are a client or a
server.
– int bind(int socket, struct sockaddr *address, int addr len)
– int listen(int socket, int backlog)
– int accept(int socket, struct sockaddr *address, int *addr
len)
• The bind operation, as its name suggests, binds the
newly created socket to the specified address. This is
the network address of the local participant.
• Note that, when used with the Internet protocols,
address is a data structure that includes both the IP
address of the server and a TCP port number
• The port number is usually some well-known number
specific to the service being offered.
• The listen operation then defines how many
connections can be pending on the specified socket.
• Finally, the accept operation carries out the passive
open.
• It is a blocking operation that does not return until a
remote participant has established a connection, and
when it does complete it returns a new socket that
corresponds to this just-established connection, and the
address argument contains the remote participant’s
address.
• Note that when accept returns, the original socket that
was given as an argument still exists and still
corresponds to the passive open; it is used in future
invocations of accept.
• On the client machine, the application process performs an active
open; that is, it says who it wants to communicate with by
invoking the following single operation:
– int connect(int socket, struct sockaddr *address, int addr len)
• This operation does not return until TCP has successfully
established a connection, at which time the application is free to
begin sending data. In this case, address contains the remote
participant’s address.
• In practice, the client usually specifies only the remote
participant’s address and lets the system fill in the local
information. Whereas a server usually listens for messages on a
well-known port, a client typically does not care which port it
uses for itself; the OS simply selects an unused one.
• Once a connection is established, the application
processes invoke the following two operations to send
and receive data:
– int send(int socket, char *message, int msg len, int
flags)
– int recv(int socket, char *buffer, int buf len, int
flags)
• The first operation sends the given message over the
specified socket, while the second operation receives
a message from the specified socket into the given
buffer. Both operations take a set of flags that control
certain details of the operation.
Performance
• Network performance is measured in using:
– Bandwidth
– Throughput
– Latency
– Jitter
– Round Trip Time
BANDWIDTH
The bandwidth of a network is given by the number of bits that can be
transmitted over the network in a certain period of time.
Bandwidth can be measured in two different values: bandwidth in hertz and
bandwidth in bits per second.
Bandwidth in Hertz
• Bandwidth in hertz refers to the range of frequencies contained in a composite
signal or the range of frequencies a channel can pass.
• For example , we can say the bandwidth of a subscriber telephone line is 4kHz.
Bandwidth in Bits per Seconds
• Bandwidth in Bits per Seconds refers to the number of bits transmitted per second.
• For example, the bandwidth of a network is a maximum of 100 Mbps. This means
that this network can send100 Mbps.
Relationship
• There is an explicit relationship between the bandwidth in hertz and bandwidth in
bits per second.
• Basically, an increase in bandwidth in hertz means an increase in bandwidth in bits

per second.
Latency
Bandwidth-Delay Product
JITTER
ROUND-TRIP TIME(RTT)
• RTT refers to how long it takes to send a
message from one end of a network to the
other and back, rather than the one-way
latency. This is called as round trip time(RTT)
of the network.
Data Link Control Services

1. Framing
2. Flow Control
3. Error Control
Framing
• The data link layer packs the bits of a message into frames, so
that each frame is distinguishable from another.

• Framing in the data link layer separates a message from source


to a destination by adding a sender address and a destination
address.
• The destination address defines where the packet is to go. The
sender address helps the recipient acknowledge the receipt.
Frame Size
– Frames can be of fixed or variable size.
– Frames of fixed size are called cells. In
fixed-size framing, there is no need for
defining the boundaries of the frames, the
size itself can be used as a delimiter.
– In variable-size framing, we need a way to
define the end of one frame and the
beginning of the next.
– Two approaches were used.
• Character-oriented approach
• Bit-oriented approach.
Character-Oriented Framing
•In character-oriented (byte-oriented) framing data
to be carried are 8-bit characters.
•Any character used for the flag could also be part
of the information.
•Byte Stuffing (or) Character Stuffing
Byte Stuffing (or) Character Stuffing
In byte stuffing, a special byte is added to the data
section of the frame when there is a character with
the same pattern as the flag.
Bit-Oriented Framing
• In bit-oriented framing , the data section of a
frame is a sequence of bits to be interpreted by
the upper layer as text, graphic, audio, video,
and so on.
•Most protocols use a special 8-bit pattern flag,
01111110, as the delimiter to define the
beginning and the end of the frame
Bit stuffing
– Bit stuffing is the process of adding one extra 0 whenever
five consecutive 1s follow a 0 in the data, so that the
receiver does not mistake the pattern 0111110 for a flag.
– In bit stuffing, if a 0 and five consecutive 1 bits are
encountered, an extra 0 is added.
Flow Control
• Reliable Transmission service is provided by the
combination of two fundamental mechanisms
– Acknowledgments
– Timeouts
• An acknowledgment (ACK for short) is a small control
frame that a protocol sends back to its peer saying that it has
received an earlier frame.
• The receipt of an acknowledgment indicates to the sender of
the original frame that its frame was successfully delivered.
• If the sender does not receive an acknowledgment after a
reasonable amount of time, then it retransmits the original
frame. This action of waiting a reasonable amount of time is
called a timeout.
The general strategy of using
acknowledgments and timeouts to implement
reliable delivery is sometimes called
automatic repeat request (normally
abbreviated ARQ).
The techniques used for reliable transmission
are,
1. Stop-and-wait
2. Sliding Window
Stop-and-wait
• The idea of stop-and-wait is straightforward.
After transmitting one frame, the sender waits
for an acknowledgment before transmitting the
next frame.
• If the acknowledgment does not arrive after a
certain period of time, the sender times out and
retransmits the original frame.
• Suppose the sender sends a frame and the receiver
acknowledges it, but the acknowledgment is either
lost or delayed in arriving. This situation is
illustrated in timelines (c) and (d).
• In both cases, the sender times out and retransmits
the original frame, but the receiver will think that
it is the next frame, since it correctly received and
acknowledged the first frame. This has the
potential to cause duplicate copies of a frame to
be delivered.
• To address this problem, the header for a
stop-and-wait protocol usually includes a 1-
bit sequence number—that is, the sequence
number can take on the values 0 and 1—and
the sequence numbers used for each frame
alternate.
• Thus, when the sender retransmits frame 0,
the receiver can determine that it is seeing a
second copy of frame 0 rather than the first
copy of frame 1.
Sliding Window
• The Sliding Window is a method of flow control
in which a sender can transmit the several frames
before getting an acknowledgement.
• In Sliding Window Control, multiple frames can
be sent one after the another due to which
capacity of the communication channel can be
utilized efficiently.
• A single ACK acknowledge multiple frames.
• Sliding Window refers to imaginary boxes at
both the sender and receiver end.
• The window can hold the frames at either end,
and it provides the upper limit on the number of
frames that can be transmitted before the
acknowledgement.
• Frames can be acknowledged even when the
window is not completely filled.
• The window has a specific size in which they
are numbered as modulo-n means that they are
numbered from 0 to n-1.
• For example, if n=8, the frames are
numbered from
0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1........
• The size of the window is represented
as n-1. Therefore, maximum n-1
frames can be sent before
acknowledgement.
• When the receiver sends the ACK, it
includes the number of the next frame
that it wants to receive.
• For example, to acknowledge the string of
frame sending with frame number 4, the
receiver will send the ACK containing the
number 5.
• When the sender sees the ACK with the
number 5, it got to know that the frames from
0 through 4 have been received.
Sender Window
• At the beginning of a transmission, the sender
window contains n-1 frames.
• When a frame is sent, the size of the window
shrinks.
• For example, if the size of the window is ‘w’ and
if three frames are sent out, then the number of
frames left out in the sender window is w-3.
• Once the ACK has arrived, then the sender
window expands to the number which will be
equal to the number of frames acknowledged by
ACK.
Receiver Window
• At the beginning of transmission, the receiver
window does not contain n frames, but it
contains n-1 spaces for frames.
• When the new frame arrives, the size of the
window shrinks.
• For example, the size of the window is wand if
three frames are received then the number of
spaces available in the window is (w-3).
• Once the acknowledgement is sent, the receiver
window expands by the number equal to the
number of frames acknowledged.

You might also like