0% found this document useful (0 votes)
17 views102 pages

Introduction To Networking 2024

A computer network consists of interconnected devices that share resources using communication protocols over various topologies, such as LAN, MAN, and WAN. The OSI model outlines the layered architecture for network communication, while various hardware components like servers, clients, and connecting devices (e.g., routers, switches) facilitate data transfer. Different topologies, including star, bus, and ring, have unique advantages and disadvantages affecting cost, reliability, and flexibility.

Uploaded by

kashishj405
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views102 pages

Introduction To Networking 2024

A computer network consists of interconnected devices that share resources using communication protocols over various topologies, such as LAN, MAN, and WAN. The OSI model outlines the layered architecture for network communication, while various hardware components like servers, clients, and connecting devices (e.g., routers, switches) facilitate data transfer. Different topologies, including star, bus, and ring, have unique advantages and disadvantages affecting cost, reliability, and flexibility.

Uploaded by

kashishj405
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 102

Tasneem Mirza

 A computer network is a group of computers/devices(Nodes) that use a set


of common communication protocols over digital interconnections(links)
in a topology for the purpose of sharing resources located on or provided by
the network nodes.
 The nodes of a computer network may include personal computers, servers,
networking hardware,
Eg: Computers, printers, mobile phones, …
Routers, switches, bridges, hubs
 The interconnections between nodes are formed from a broad spectrum of
telecommunication network technologies, based on physically wired and
wireless technologies.
Eg : optic fiber
coaxial cable Wired
twisted pair
radio, microwave, satellite - wireless
 A communication protocol is a set of rules for exchanging information

over a network.
Topology : Ring, Star, Bus, Tree, Mesh
Topologies
What is a Computer Network
LAN, MAN & WAN

Network in small geographical Area (Room, Building or a Campus) is


called LAN (Local Area Network)

Network in a City is call MAN (Metropolitan Area Network)

Network spread geographically (Country or across Globe) is called


WAN (Wide Area Network)
• A LAN is a network that is used for communicating among
computer devices, usually within an office building or home
• LAN’s enable the sharing of resources such as files or
hardware devices that may be needed by multiple users
• Is limited in size, typically spanning a few hundred meters,
and no more than a mile
• Is very fast, with speeds from 10 Mbps to 10 Gbps
• Requires very little wiring, typically a single cable connecting
to each device
• Has lower cost compared to MAN’s or WAN’s
 The communication infrastructures that have been
developed in and around large cities.
 MAN or Metropolitan Area Network is typically a

more extensive network when compared to LANs but


is smaller than WANs.
 This network ranges between several buildings in the

same city. Man networks are connected via fiber optic


cable (usually high-speed connection).
 Cities and government bodies usually manage MANs.
 WAN or Wide Area Network is the most significant network
type connecting computers over a wide geographical area,
such as a country, continent. WAN includes several LANs,
MANs.
 An example of WAN is the Internet, which connects billions
of computers globally.
 The Internet, as we know it today, is essentially the ultimate
wide-area network, spanning the entire globe.
 The Open System Interconnection Reference Model (OSI
Reference Model or OSI Model) is an abstract description for
layered communications and computer network
protocol design.
 It divides network architecture into seven layers which, from
top to bottom, are the Application, Presentation, Session,
Transport, Network, Data Link, and Physical Layers. It is
therefore often referred to as the OSI Seven Layer Model.
 To reduce the complexity in the network, most networks are
organized as a series of layers .
 The basic idea of a layered architecture is to divide the design into
small pieces.
 The number of layers, the name of each layer, the contents of each
layer, and the function of each layer differ from network to network.
 Each layer offers certain services to the layer above it.
 Layer n on one machine carries on a conversation with layer n on
another machine. The rules and conventions used in this
conversation are collectively known as the layer n protocol.
 A protocol is an agreement between the communicating parties on
how communication is to proceed.
The OSI
reference
model.

14
 How Data Flows through the OSI Layers
 Computer networks components comprise both
physical components as well as the software required
for installing computer networks.
 Hardware components :

◦ server
◦ client
◦ transmission medium and
◦ connecting devices.
 Software components:
o operating system and
o protocols.
 Servers: Servers are high-configuration computers that
manage the resources of the network. The network operating
system is typically installed in the server and so they give
user accesses to the network resources. Servers can be of
various kinds: file servers, database servers, print servers etc.

 Clients: Clients are computers that request and receive


service from the servers to access and use the network
resources.

 Transmission Media: Transmission media are the channels


through which data is transferred from one device to another
in a network. Transmission media may be guided media like
coaxial cable, fibre optic cables etc; or maybe unguided
media like microwaves, infra-red waves etc.
 Interconnecting Devices: Connecting devices act as
middleware between networks or computers by binding
the network media together. Some of the common
connecting devices are:
Network Interface Card(NIC)
Routers
Bridges
Hubs
Repeaters
Gateways
Switches
1. Network Interface Card
The network interface card (or NIC for short) is the network
adapter that all devices must have in order to be part of a
network. On desktop computers, network interface cards
allow Ethernet cables to be plugged in, as this is the main
method of establishing network connections on desktop
computers.
Repeaters
 A repeater operates at the physical layer means it is a purely hardware

device.
 Why use repeaters?

10 Base 2 Repeater 10 Base 2


(10 MBps 200 mtr) (10 MBps 200 mtr)

 The strength of the signal will go down after 200 mtr- No repeater
 With a repeater -If a device is sending a signal, after 200 there will be
attenuation (signal weakening) but because of the repeater , the signal can
travel even after 200 meters. Hence increases the distance covered by the
signal.
Repeaters
 Its job is to regenerate the signal(original voltage value) over the same

network before the signal becomes too weak or corrupted so as to extend


the length to which the signal can be transmitted over the same network.
An important point to be noted about repeaters is that they do not amplify
the signal.
 It is only a 2 port device.

 It operates at physical layer only.

 No filtering capability – Cannot read source and destination addresses,

hence not capable of selective forwarding. Uses flooding


Hub
 A hub is basically a multiport repeater.
 Layer 1 device(Physical layer)
 A signal received at any port on the hub is retransmitted on all other
ports.
 Network segments that employ hubs are often described as having a
star topology, in which the hub forms the wiring centre of the star.
Hubs cannot filter data, so data packets are sent to all connected
devices.
 Also, they do not have intelligence to find out best path for data
packets which leads to inefficiencies and wastage.
HUB
If a message comes in destined for computer “A”, that
message is sent out to all the other ports, regardless of
which computer “A” is.

Incoming data passing through a hub.


 When computer “A” responds, its response also goes out to every other port on the
hub.

 Every computer connected to the hub “sees” everything every other


computer on the hub does. It’s up to the computers themselves to decide if
a message is for them and whether or not it should be paid attention to.
Bridge
 Bridges can be used to connect LANs of different types.

 Hubs are also used to connect 2 LANs but they have to be identical.

 Secondly bridges have only 2 ports.

 Third- Bridges performs the function of forwarding i.e if a packet

arrives on a bridge , it forwards it.


 A bridge operates at data link layer. A bridge is a repeater, with

add on functionality of filtering content by reading the addresses of


source and destination.
 Bridge M4
M6 M7
M2
P1
Bridge P2

M1 M3 M5
 Bridge interfaces are port P1 and Port2
 M1, M2, M3 and M4 are to the left of the interface (P1) and

M5, M6, M7 to the right(P2)


 If M1 is sending a packet to M7 , Packet contains Source and

destination MAC address.


 Bridges can check the MAC address and decide if the packet

has to be forwarded or not.


 Eg: if M1 to M7 – forward

 if M1 to M3 – don’t forward
How does it decide ?
M6 M7
M2 M4
P1
Bridge P2

Bridges are of 2 types


M1 M3 M5
1. Static
2. Dynamic /Transparent (Learning bridge)
 Static

Bridges maintain a table MAC address – Port No.


Network Admin manually types which machine is connected to which port

MAC Port
M1 P1
M2 P1
M3 P1
M4 P1
M5 P2
M6 P2
M7 P2

If M1 wants to send a message to M5 , the bridge checks the table and decides if to
forward or not
Drawback of Static table
 The table has to be maintained manually. Eg: if a machine

changes interface, then the network admin has to manually


change the table.
M6 M7
M2 M4
P1
Bridge P2

M1 M3 M5
Dynamic bridge
 Initially the table is empty.

 Bridge does not know which machine is connected to which

interface.
 If M1 has to send a packet to M6, Source address- M1,

Destination address- M6, table is consulted ,but the entry is


missing.
 Bridge has learnt that the packet came from M1 at port 1

 An entry is made in the table that M 1 is at Port 1. The packet is

broadcasted.
 And when the reply(Ack) come in from M6 to M1 (SA – M6 and

DA –M1) to the bridge it learns that M6 is connected to P2.


Switch
 Brigdes are 2 port device

 But switches are multi port devices.

 Also called as a multiport bridge Eg: 8,24.48 etc ports

 Switch is data link layer device.

 Different devices can be connected to its port including a

router.
 Switches can perform error checking before
forwarding data, which are very efficient by not
forwarding packets that have errors or forwarding
good packets selectively to correct devices only.
 Switches can also read the MAC address and

selectively forward the packets


Routers
 A router is a device like a switch that routes data packets based on their IP

addresses. Router is mainly a Network Layer device.


i.e. it can check IP addresses
Functions of routers :
1. Forwarding :

If a packet is to be sent from HA to HB(Host on n/w A to Host on n/w B),


then the packet contains the source and destination IP address (MAC
addresses are used at Layer 2 only (only in a LAN), But if a packet has to be
sent outside a n/w, then IP addresses are used
 When a packet reaches a router, router forwards the packet based on an
inbuilt routing table. Routing table gives information about the networks it
is connected to. It checks which direction, it has to send (forward the
packet)

 If a packet is unable to decide then it uses flooding, send the packet to all
the interfaces.
2. Filtering
 Decide whether to forward /block the packet (if the packet is

meant for the same network to which it interfaces.


3. Routing
 Routers have the ability to make intelligent decisions as to the

best path for delivery of data on the network.


 Routers normally connect LANs and WANs together and have

a dynamically updating routing table based on which they


make decisions on routing the data packets.
The pattern of interconnection of nodes in a network is called the
TOPOLOGY.
Factors to be considered for selection of the choice of topology:
1.Cost : For a network to be cost effective, one would try to minimize
installation cost
2. Flexibility: he topology should allow for easy reconfiguration of
the network. This involves moving existing nodes and adding new
ones.
3. Reliability :The topology chosen for the network can help by
allowing the location of the fault to be detect ed and to provide some
means of isolating it.
1. Star Topology
This topology consists of a central node to which all other nodes
are connected by a single path. It is the topology used in most
existing information networks involving data processing or
voice communications.
Advantages of the Star Topology
1. Ease of service: The star topology has a number of concentration

points (where connections are joined). These provide for easy


reconfiguration of the network.
2. One connection per device: Connection points in any network are
inherently prone to failure in the star topology, failure of a single
connection typically involves disconnecting one no de from an
otherwise fully functional network.
3. Centralized control/problem diagnosis : Faults are easily detected
and isolated. Easy to disconnect failing nodes from the system.
4. Simple access protocols: Any given connection in a star network involves
only the central node. In this situation, contention for who has control of
the medium for the transmission purposes is easily solved. Thus in a star
network, access protocols are very simple.
Disadvantages of the Star Topology.
1.Long cable length: Because each node is directly connected to the centre,
the star topology necessitates a large quantity of cable.
2.Central node dependency: If the central node in a star network
fails, the entire network is rendered inoperable.
The Bus Topology
This consists of a single length of the transmission medium (normally
coaxial cable) onto which the various nodes are attached.
Advantages of the Linear Topology
1.Short cable length and simple wiring layout: Because there is a
single common data path connecting all nodes, the linear topology
allows a very short cable length to be used. This decreases the
installation cost, and also leads to a simple, easy to maintain wiring
layout.
2. Easy to extend: Additional nodes can be connected to an existing
bus network at any point along its length. More extensive additions
can be achieved by adding extra segments connected by a repeater.
Disadvantages of the Bus (Linear) Topology
1. Fault diagnosis is difficult: Although simplicity of the bus
topology means that there is very little to go wrong, fault detection is
not simple. Detection of a fault may have to be performed from many
points in the network.
2.Fault isolation is difficult: In the star topology, a defective node
can easily be isolated from the network by removing its connection at
the centre. If a node is faulty on the bus, it must be rectified at the
point where the node is connected to the network.
3.Nodes must be intelligent: Each node on the network is directly
connected to the central bus. This means that some way of deciding
who can use the network at any given time must be performed in each
node.
4. A cable break can disable the entire network
3. Ring Topology
In this case, each node is connected to two and only two
neighbouring nodes.
Data is accepted from one of the neighbouring nodes and is
transmitted onwards to another.
Thus data travels in one direction only, from node to node
around the ring. After passing through each node, it returns to
the sending node, which removes it.
Advantages of Ring Topology
1.Short cable length. The amount of cabling involved in a ring
topology is comparable to that of a bus and is small relative to that
of a star.
Drawbacks of Ring Topology
1. Each packet of data must pass through all the computers between
source and destination, slower than star topology
2. If one workstation or port goes down, the entire network gets
affected
Mesh topology
 Mesh technology is an arrangement of the network in which

computers are interconnected with each other through various


redundant connections.
 There are multiple paths from one computer to another

computer. It does not contain the switch, hub or any central


computer which acts as a central point of communication.
Full Mesh Topology: In a full mesh topology, each computer is
connected to all the computers available in the network.
Mesh topology can be formed by using the formula:
Number of cables = (n*(n-1))/2; (n-no. of nodes)
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.
 Fast Communication: Communication is very fast

between the nodes.


 Easier Reconfiguration: Adding new devices would

not disrupt the communication between other devices.


Disadvantage of Mesh Topology
Cost: A mesh topology contains a large number of
connected devices such as a router and more
transmission media than other topologies.
Efficiency: In this topology, redundant connections are
high that reduces the efficiency of the network.
 The Open System Interconnection Reference Model (OSI
Reference Model or OSI Model) is an abstract description for
layered communications and computer network
protocol design.
 It divides network architecture into seven layers which, from
top to bottom, are the Application, Presentation, Session,
Transport, Network, Data Link, and Physical Layers. It is
therefore often referred to as the OSI Seven Layer Model.
 To reduce the complexity in the network, most networks are
organized as a series of layers .
 The basic idea of a layered architecture is to divide the design into
small pieces.
 The number of layers, the name of each layer, the contents of each
layer, and the function of each layer differ from network to network.
 Each layer offers certain services to the layer above it.
 Layer n on one machine carries on a conversation with layer n on
another machine. The rules and conventions used in this
conversation are collectively known as the layer n protocol.
 A protocol is an agreement between the communicating parties on
how communication is to proceed.
 The basic elements of a layered model are services, protocols
and interfaces.
 A service is a set of actions that a layer offers to another
(higher) layer.
 Protocol is a set of rules that a layer uses to exchange
information with a peer entity.
 Between the layers service interfaces are defined. The
messages from one layer to another are sent through those
interfaces.
 The benefits of the layered models are modularity and clear
interfaces
 In reality, no data are directly transferred from layer n on one
machine to layer n on another machine.
 Instead, each layer passes data and control information to the
layer immediately below it, until the lowest layer is reached.
 Below layer 1 is the physical medium through which actual
communication occurs.
 Virtual communication is shown by dotted lines and physical
communication by solid lines.
The OSI
reference
model.

54
 Each layer adds (or encapsulates) some form of header or trailer.
(Layer 2, the Data Link layer, is responsible for adding a trailer)
as the data flow from Device A to Device B.
 When the end system receives the unstructured bit stream from

the physical wire, each layer removes the header information


applicable to it until the application receives the data.
 Eg: An email is sent from Device A to Device B

1. An application, such as an email program, creates data that will


be sent by an end user, such as an email message. The
Application layer (layer 7) places a header (encapsulation) field
that contains information such as screen size and fonts,
and passes the data to the Presentation layer (layer 6).
2. The Presentation layer places layer 6 header information(PH)
and will then pass the new data to the Session layer (layer 5).
3. The Session layer follows the same process by adding layer 5
header information(SH).
4.The Transport layer places layer 4 information in the
header(TH), and passes it to the Network layer (layer 3).
5. The Network layer places layer 3 header information(NH),
such as the source and destination address so the Network
layer can determine the best delivery path for the packets, and
passes this data to the Data Link layer (layer 2).
6. The Data Link layer places layer 2 header(DH) and trailer
information(DT) such as a Frame Check Sequence (FCS) to ensure
that the information is not corrupt, and passes this new data to the
Physical layer (layer 1) for transmission across the media.
7. The bit stream is then transmitted as ones and zeros on the Physical
layer.
8. Steps 1 through 7 occur in reverse order on the destination device.
Device B collects the raw bits from the physical wire and passes them
up the Data Link layer. The Data Link layer removes the headers and
trailers and passes the remaining information to the Network layer
and so forth until data is received by the Application layer.
Eventually, Device B will receive an email notification displaying a
message to indicate that a new email message has been received.
 How Data Flows through the OSI Layers
1. Reliability
 Network channels and components may be unreliable, resulting in loss of bits while

data transfer. So, an important design issue is to make sure that the information
transferred is not distorted.
2. Scalability
 Networks are continuously evolving. The sizes are continually increasing leading to

congestion. Also, when new technologies are applied to the added components, it may
lead to incompatibility issues. Hence, the design should be done so that the networks
are scalable and can accommodate such additions and alterations.
3. Addressing
 At a particular time, innumerable messages are being transferred between large numbers

of computers. So, a naming or addressing system should exist so that each layer can
identify the sender and receivers of each message.
1. .
4. Error Control
 Unreliable channels introduce a number of errors in the data

streams that are communicated. So, the layers need to agree


upon common error detection and error correction methods so
as to protect data packets while they are transferred.
5. Flow Control
 If the rate at which data is produced by the sender is higher

than the rate at which data is received by the receiver, there


are chances of overflowing the receiver. So, a proper flow
control mechanism needs to be implemented.
6. Statistical Multiplexing
 It is not feasible to allocate a dedicated path for each message while

it is being transferred from the source to the destination. So, the data
channel needs to be multiplexed, so as to allocate a fraction of the
bandwidth or time to each host.
7.Routing
 There may be multiple paths from the source to the destination.

Routing involves choosing an optimal path among all possible


paths, in terms of cost and time. There are several routing
algorithms that are used in network systems
8. Security
 A major factor of data communication is to defend it against threats

like eavesdropping and surreptitious alteration of messages. So,


there should be adequate mechanisms to prevent unauthorized
access to data through authentication and cryptography.
1. Application layer
 The Application Layer is the one at the top - it’s what most
users see.
 In the OSI model, this is the layer that is the “closest to the end
user”.
 Applications that work at Layer 7 are the ones that users
interact with directly.
 A web browser (Google Chrome, Firefox, Safari, etc.) or other app
- Skype, Outlook, Office - are examples of Layer 7 applications.
 Applications such as web browsers, for example, use HTTP or
HTTPS (protocol ) to transmit data to the presentation layer,
directly below the application layer.
2. Presentation Layer
1. Conversion
 The data that the presentation layer receives from the application

layer is a series of characters and numbers.


 The data must be converted to bit streams to be readable by the

receiving computer. On the sender's end, the presentation layer


translates the data from a user-dependent format to the common
binary format.
 At the receiver's end, their presentation layer translates the binary

data , receiver-dependent format.


2. Encryption/Decryption
 Encryption is the process of scrambling data so that it's

unreadable to unauthorized parties, and decryption is the


process of converting the scrambled data back to a readable
form.
 Because computer systems often handle sensitive

information, the presentation layer performs both of these


important security tasks.
 On the sender's end, the layer encrypts the transmitting data

before it enters session layer. On the receiver's side, the


presentation layer decrypts the data so it can display properly
on the application layer.
3. Compression/Decompression
 Compression is the process of reducing data size.

 This process is helpful for transmitting data because

smaller files transmit more quickly.


 The presentation layer performs compression on the

sender's side to reduce the bandwidth of the transmitting


data and accelerate its rate of transmission.
3. Session layer
 The session layer is an important layer as it is responsible for

maintaining a session between two end-user applications.


Functions of session Layer
1. Authentication

2. Authorization

3. Session restoration and Checkpoint

1.Authentication
 Authentication is the process of verifying who you are.

 Logging on to a sever with a username and password is authentication.

The main purpose of authentication is security.


 Without authentication, user's data stored on a server is unsafe on the

grounds that everyone can get it from the server.


 Eg: user trying to log into a banking portal
2. Authorization
Authorization is the process of verifying what a user is entitled

to do or can access on a given server.


Describes the rights/privileges a user has.
3. Session restoration and check pointing
It adds synchronization points or checkpoints in data streams for

long communications.
This ensures that data streams up to the checkpoints are

successfully received and acknowledged.


In case of any failures, only the streams after the checkpoints

have to be re-transmitted.
Eg: session restoration-restoration of multiple tabs of a browser in
case of network interruption.
Checkpointing-downloading a long YouTube video
NOTE: The coding for presentation and session layer is provided
by the application and not the operating system
4. Transport Layer
 Responsible for process to process delivery of the entire

message.
 Computers often run several processes at the same time. For

this reason, process-to-process delivery means delivery not only


from one computer to the other but also from a specific process
on one computer to a specific process on the other.
 The transport layer header therefore must include a type of

address called a port address.


Port address guides the data to reach to the correct server
application from your computer and come back to the correct
application to your computer.
The transport layer can be either
Connection less or connection oriented
1. Connection oriented
 Makes a connection with the transport layer at the destination

machine first before delivering the packets.


 When the connection is established a sequence of packets

from source to the destination can be sent one after another on


the same path and in sequential order.
 When all packets of message have been delivered, the

connection is terminated
Connection Less ( as Internet)
 It sends the data, but does not establish and verify a

connection between hosts before sending data.

 Treats each packet independently, the packets in a message


may or may not travel the same path to their destination.
Transport Layer
 The physical address, also known as the MAC(Media Access
control) address, is the address of a node as defined by its LAN.
It is included in the frame used by the data link layer.
 It is the lowest-level address. The size and format of these
addresses vary depending on the network.
 For example, Ethernet uses a 6-byte (48-bit) physical address
that is imprinted on the network interface card (NIC).
 Most local area networks use a 48-bit (6-byte) physical address
written as 12 hexadecimal digits; every byte (2 hexadecimal
digits) is separated by a colon, as shown below.
 Eg 07:01:02:01:2C:4B
Physical Address
 A node with physical address 10 sends a frame to a node with physical address 87.
The two nodes are connected by a LAN. At the data link layer, this frame contains
physical (link/MAC) addresses in the header. These are the only addresses needed.
The rest of the header contains other information needed at this level. The trailer
usually contains extra bits needed for error detection. The data link layer at the
sender receives data from an upper layer. It encapsulates the data in a frame,
adding a header and a trailer. The header, among other pieces of information,
carries the receiver and the sender physical (link) addresses.
 The frame is propagated through the LAN. Each node with a physical address other
than 87 drops the frame because the destination address in the frame does not
match its own physical address. The intended destination computer, however, finds
a match between the destination address in the frame and its own physical address.
The frame is checked, the header and trailer are dropped, and the data part is
decapsulated and delivered to the upper layer.
Physical addresses

packet packet
discarded discarded
1 packet
87 10 Data accepted
87 10 Data

2 3
4

76 TCP/IP Protocol Suite


Logical Address
•Logical addresses are necessary for universal communications that are
independent of underlying physical networks.
•Physical addresses are not adequate in an internetwork
environment.
•A universal addressing system is needed in which each host can be
identified uniquely, regardless of the underlying physical network.
•The logical addresses are designed for this purpose.
A logical address in the Internet is currently a 32- bit address that can
uniquely define a host connected to the Internet.
•No two hosts on the Internet can have the same IP address.
•The physical addresses will change from hop to hop,but the logical
addresses remain the same
 The Figure below shows a part of an internet with two routers
connecting three LANs. Each device (computer or router) has a pair
of addresses (logical and physical) for each connection.
 The computer with logical address A and physical address 10 needs
to send a packet to the computer with logical address P and physical
address 95.
 The sender encapsulates its data in a packet at the network layer and
adds two logical addresses (A and P).
 The network layer, however, needs to find the physical address of
the next hop before the packet can be delivered. The network layer
consults its routing table and finds the logical address of the next
hop (router 1) to be F.
Figure 2.17 Example 2.5: logical addresses

79 TCP/IP Protocol Suite


IP address: Defines the host among the different hosts in
the world.

After host is selected , the port address defines one of the


processes on this particular host.
5. Network Layer
Functions
1. Host to Host delivery : Using IP address

Network

Network Network

B1 B2
A2 A1

H
R1
A4 Eg: Transmitting R2
A3 a message from A2 to B2 is
t the responsibility of the network Layer
 Ip address of the source and destination is added at the
network layer of the source machine.
 IP address consists of net id and host id

 Network ID determine which network and host id determines

which host on that network.


2. Routing :
 When a packet reaches an intermediate node(router), it

determines the next hop to the destination( to achieve the


shortest path to the destination).
 Router has the intelligence to decide on the optimal path using

a routing algorithm.
3. Fragmentation :
When data reaches the network layer, terminology used in
packet.
 From the source machine if the packet has to pass through a
router, the router might have a size constraint based on its
buffer size
i.e it can accept packets of only a certain size.
 Hence network layer perform fragmentation to pass the data to

the next router.


4. Congestion control
 Each network has a limitation of number of packets it can

transfer at a time. If it exceeds its capacity , congestion sets in.


 Two algorithms used to control congestion is token bucket and

leaky bucket .
6. Data Link Layer
 When sending data to the physical layer it puts a header(MAC

address) and a frame check sequence(trailer).


 When obtaining data from the Physical layer, the Data Link layer

checks for physical transmission errors and packages bits into data
"frames".
 The data link layer provides error-free transfer of data frames

from one node to another over the physical layer.


 The data link layer is divided into two sub layers: The Media

Access Control (MAC) layer and the Logical Link Control (LLC)
layer.
 Data Link Layer Functions
1. Framing: Divide the stream of bits received from network layer
into data units called frames
2. Physical Addressing: The Data Link layer adds a header to the
frame in order to define physical address of the sender or receiver of
the frame, if the frames are to be distributed to different systems on
the network.
3. Flow Control: A flow control mechanism allows two stations
working at different speeds to communicate with each other.
When a data frame (Layer-2 data) is sent from one host to another
over a single medium, it is required that the sender and receiver
should work at the same speed. If sender is sending too fast the
receiver may be overloaded, (swamped) and data may be lost.
4. Error Control:
 Add mechanisms to detect and retransmit damaged or lost frames.

 Prevent also duplication of frames.

 Error control is normally achieved through a trailer added to the end

of frame.
5. Access Control: Protocols of this layer determine which of the
devices has control over the link at any given time, when two or
more devices are connected to the same link.
7. Physical layer
 It provides the hardware means of sending and receiving data on a

carrier.
Functions
1.Representation of Bits: Data in this layer consists of stream of bits. The
bits must be encoded into signals for transmission. It defines the type of
encoding i.e. how 0's and 1's are changed to signal.
2. Data Rate: This layer defines the rate of transmission which is the
number of bits per second.
3. Synchronization: It deals with the synchronization of the transmitter
and receiver. The sender and receiver are synchronized at bit level.
4. Interface: The physical layer defines the transmission interface
between devices and transmission medium.
5. Line Configuration: This layer connects devices with the medium:
Point to Point configuration(dedicated link between 2 devices) and
Multipoint configuration(shared link between more than 2 devices)
6.Topologies: Devices must be connected using the following
topologies: Mesh, Star, Ring and Bus.
7.Transmission Modes: Physical Layer defines the direction of
transmission between two devices: Simplex(signals can flow only in
one direction), Half Duplex(signals can flow in both directions not
at the same time). Full Duplex(signals can flow in both directions at
the same time).
OSI Model
Data
Layer Function
unit
7. Application Application process
Data representation,
Data 6. Presentation
Host encryption and decryption
layers 5. Session Interhost communication
Segme End-to-end connections
4. Transport
nts and reliability, Flow control
Path determination and
Packet 3. Network
logical addressing
Media
Frame 2. Data Link Physical addressing
layers
Media, signal and binary
Bit 1. Physical
transmission
Going from layer 7 to 1: All People Seem To Need Data
Processing
91
 The Internet Protocol Suite (commonly known as TCP/IP)
is the set of communications protocols used for
the Internet and other similar networks.
 It is named from two of the most important protocols in it:
◦ the Transmission Control Protocol (TCP)(layer 4) and
◦ the Internet Protocol (IP)(layer 3), which were the first two
networking protocols defined in this standard.

92
1. Application layer
 User interacts directly with the application software, where
application process creates user data and transmits this data to other
application process on same or another host via one of the transport
layer protocol (TCP or UDP).
 Application layer protocols:
 HTTP(hyper text transfer protocol): Is the protocol that web
browsers and web servers use to communicate with each other.
 FTP protocol : Used to exchange computer files within hosts. Setting
up an FTP server becomes necessary for businesses that manage
their own network and need to establish a file transfer (exchange of
documents) between company employees.
 DNS protocol: Domain names are alphabetic which are easier to
remember. Internet is however based on IP addresses.DNS involves
converting a host name into its IP address.
 2. Transport layer
Transport layer is the third layer in the TCP/IP reference model.
The transport layer receives the data from the application layer and
splits it into separate packets, with an order number and port
number. It is also responsible for error and flow control.
The core protocols of transport layer are Transmission Control
Protocol (TCP) and User Datagram Protocol (UDP).
 TCP - is a connection-oriented protocol.

Connection-oriented - Establishes a logical connection between


sender and receiver before sending any data packets.
UDP - is a connectionless, protocol. Connectionless - Establishing a
connection between sender and receiver is not required.
3. Network layer
The network layer is responsible for attaching the sender and
destination IP address. The IP addresses combined with the ports
create sender and receiver sockets. It is also responsible for
packet routing, forwarding the data packets to the next router
towards their destination.
The protocol at the network layer is called the Internet protocol.
 IP prepares segments received from Transport layer for delivery by

splitting them into units called IP datagrams. Splitting is required if the


packet exceeds the allowable byte size for network.
 IP attaches an IP header to the segment or packet's header, in addition to

the information that is added by TCP or UDP. Information in the IP


header includes the IP addresses of the sending and receiving hosts.
4. Data Link Layer Functions
1. Framing: Divide the stream of bits received from network layer
into data units called frames
2. Physical Addressing: The Data Link layer adds a header to the
frame in order to define physical address of the sender or receiver of
the frame, if the frames are to be distributed to different systems on
the network.
3. Flow Control: A flow control mechanism to avoid a fast
transmitter from running a slow receiver by buffering the extra bit is
provided by flow control. This prevents traffic jam at the receiver
side.
4. Error Control:
 Add mechanisms to detect and retransmit damaged or lost frames.

 Prevent also duplication of frames.

 Error control is normally achieved through a trailer added to the end

of frame.
5. Access Control: Protocols of this layer determine which of the
devices has control over the link at any given time, when two or
more devices are connected to the same link.
5. Physical layer
 It provides the hardware means of sending and receiving data on a

carrier.
Functions
1.Representation of Bits: Data in this layer consists of stream of bits. The
bits must be encoded into signals for transmission. It defines the type of
encoding i.e. how 0's and 1's are changed to signal.
2. Data Rate: This layer defines the rate of transmission which is the
number of bits per second.
3. Synchronization: It deals with the synchronization of the transmitter
and receiver. The sender and receiver are synchronized at bit level.
4. Interface: The physical layer defines the transmission interface
between devices and transmission medium.
5. Line Configuration: This layer connects devices with the medium:
Point to Point configuration and Multipoint configuration
6.Topologies: Devices must be connected using the following
topologies: Mesh, Star, Ring and Bus.
7.Transmission Modes: Physical Layer defines the direction of
transmission between two devices: Simplex, Half Duplex, Full
Duplex.
OSI TCP/IP

1. The OSI model is a reference model. 1. The TCP/IP model is an implementation of


the OSI model. It is a client server model
used for transmission of data over the
internet.
2.The OSI model has 7 layers. 2. The TCP/IP model has only 5 layers.

3. Layers- Application, Presentation, Session, 3. Layers- Application, Transport, Network,


Transport, Network, Data Link, Physical. Data Link, Physical.

4. Separate Presentation and Session Layer 4. TCP/IP combines the presentation and session
layer into its application layer

5 The OSI model supports both 5. The TCP/IP model supports only
connection-less and connection- Connectionless communication in transport
oriented communication in the layer.
transport layer
6. Theoretical model Model around which Internet is developes

You might also like