Chapter 2
Chapter 2
2/22/2024 2
Protocols and protocol layering (TCP/ IP)
❑ Network Protocols:
▪ A protocol is a set of rules that governs data communications.
▪ A protocol defines what is communicated, how it is communicated, and when it is
communicated.
▪ To request any service or exchange any information between 2 devices there must be an
agreed set of commands and data formats.
▪ For instance, for one computer to send a message to another computer, the first computer
must perform the following general steps:
✓ Break the data into small sections called packets.
✓ Add addressing information to the packets identifying the source and destination
computers.
✓ Deliver the data to the network interface card for transmission over the network.
2/22/2024 3
Cont ….
▪ The receiving computer must perform the same steps, but in reverse order.
✓ Timing: refers to when data should be sent and how fast they can be sent
2/22/2024 4
Protocol layering
▪ Protocol layering is a common technique to simplify networking designs by dividing them
into functional layers, and assigning protocols to perform each layer's task.
▪ For example, it is common to separate the functions of data delivery and connection
▪ Thus, one protocol is designed to perform data delivery, and another protocol layered
▪ The data delivery protocol is fairly simple and knows nothing of connection management.
▪ The connection management protocol is also fairly simple, since it doesn't need to
concern itself with data delivery.
2/22/2024 5
Cont …
▪ The most important layered protocol designs are:
2/22/2024 6
OSI and TCP/IP Layers Correspondence
2/22/2024 7
Cont …
5 Session 5 Session
4 Transport 4 Transport
3 Network 3 Network
2 Data Link 2 Data Link
1 Physical 1 Physical
2/22/2024 8
OSI Model Analogy Application Layer - Source Host
After riding your new bicycle a few times in New York, you decide that you
want to give it to a friend who lives in Addis Ababa, Ethiopia.
2/22/2024 9
Presentation Layer - Source Host
2/22/2024 10
Session Layer - Source Host
Call your friend and make sure you have his correct address.
2/22/2024 11
Transport Layer - Source Host
2/22/2024 12
Network Layer - Source Host
❑ Put your friend's complete mailing address (and yours) on each box.
❑ Since the packages are too big for your you determine that you need to
go to the post office.
13
2/22/2024
Data Link Layer – Source Host
2/22/2024 14
Physical Layer - Media
2/22/2024 15
Data Link Layer - Destination
Ethiopia
2/22/2024 16
Network Layer - Destination
Upon examining the destination address, Adis Ababa post office determines
that your boxes should be delivered to your written home address.
2/22/2024 17
Transport Layer - Destination
Your friend calls you and tells you he got all 3 boxes and he is
having another friend named BOB reassemble the bicycle.
2/22/2024 18
Session Layer - Destination
2/22/2024 19
Presentation Layer - Destination
2/22/2024 20
Application Layer - Destination
2/22/2024 21
Layer 7: The Application Layer
▪ The application layer running on the sending system (COMPUTER) is responsible
2/22/2024 22
Cont …
Layer 6: The Presentation Layer
Performs three major functionalities:-
✓ Translation
✓ Data compression
✓ Encryption
Layer 5: session layer
So it performs:
✓ Session management
✓ Authentication and
✓ Authorization
On layers 5-7 the data package is in the form of data stream.
2/22/2024 23
Cont …
Layer 4: The Transport Layer
▪ The transport layer is responsible for
✓ Segmentation
✓ Flow control
✓ Error correction
▪ Protocols:
✓ Transmission Control Protocol (TCP) – Connection Oriented
✓ User Datagram Protocol (UDP) – Connectionless.
Layer 3: The Network Layer
▪ The network layer is responsible for working with
✓ Logical addressing
✓ Path determination
✓ Routing 24
2/22/2024
Cont …
Layer 2: The Data Link Layer
▪ The data link layer is responsible for physical addressing.
▪ MAC addressing of the sender and receiver for each packet to form a frame.
▪ Data unit used at data link layer is called a frame.
Layer 1: The Physical Layer
▪ The bottom layer of the OSI hierarchy is concerned only with moving bits of data on
the network medium.
▪ Responsible for converting the data frame to a pattern of signals (on and off) that will
be used to send the data across the communication medium.
▪ On the receiving system, the signals will be converted to frame by the data link layer
and then passed up to the network layer for further processing.
▪ Cable, connectors, repeaters, transmitters, receivers, are associated with physical layer.
2/22/2024 25
Cont …
Application Allows access to network resources.
SMTP SNMP
Transport
TCP UDP
Network
ICMP IP IGMP
Link
hardware
ARP RARP
interface
Media
2/22/2024 27
Cont …
Application
Message
Presentation Applications
Session
Segment
Transport TCP UDP
Network Datagram
IP
Frame
Data Link Protocols defined by
the underlying networks Bits
Physical
2/22/2024 28
TCP/IP and Addressing
Application Processes
layer
Transport
Port
TCP UDP
layer address
IP and other IP
Network
protocols
layer address
Data link
Underlying
layer Physical
physical
networks (MAC)
Physical address
2/22/2024 layer 29
Networking and Internetworking Devices
▪ Network devices are components used to connect computers or other electronic
devices together so that they can share files or resources like printers or fax
machines.
▪ Devices used to setup a Local AreaNetwork (LAN) are the most common types of
network devices used by the public.
▪ An internetwork is a collection of individual networks, connected by intermediate
networking devices, that functions as a single large network.
▪ An internet is an interconnection of individual networks.
▪ To create an internet, we need internetworking devices called routers and
gateways.
▪ Each of these device interact with protocols at different layers of the OSI model
30
Cont…
Connecting Devices
Internetworking
Networking Devices
Devices
31
Connecting Devices and layers of OSI Model
32
Repeaters
▪ As signals travel along a cable, they degrade and become distorted in a process called
"attenuation."
➢ Repeaters take a weak signal from one segment, regenerates it, and passes it to the
next segment.
➢A repeater works at the physical layer of the OSI Reference Model to regenerate the
network's signals and resend them out on other segments.
➢It connects two segments of the same network ,overcoming the distance limitations of
the transmission media.
33
Repeater and OSI model
▪ A repeater forwards every frame; it has no filtering capability
▪ A repeater is a generator , not an amplifier.
▪ Repeaters can connect segments that have the same access method.(CSMA/CD ,
Token Passing, Polling , etc.).
34
Cont …
35
Function of repeater
36
Bridges
▪ As a data link layer device, the bridge can check the PHYSICAL / MAC addresses
(source and destination) contained in the frame.
▪ It can check the destination address of a frame and decide if the frame should be
forwarded or dropped.
37
Cont …
38
Cont …
39
How Bridges Work
▪ If the destination device is on the same segment as the frame, the bridge blocks
the frame from going on to other segments.
✓filtering.
▪ If the destination device is on a different segment, the bridge forwards the frame
to the appropriate segment.
▪ If the destination address is unknown to the bridge, the bridge forwards the
frame to all segments except the one on which it was received.
✓flooding.
40
Cont …
41
Function of Bridges
42
Characteristics of Bridges s
❑ Routing Tables
▪ Is used to determine the network of destination station of a received
packet.
❑ Filtering
▪ Is used by bridge to allow only those packets destined to the remote
network.
▪ Packets are filtered with respect to their destination and multicast
addresses.
❑ Forwarding
▪ The process of passing a packet from one network to another.
❑ Learning Algorithm
▪ The process by which the bridge learns how to reach stations on the
internetwork.
43
Advantages and Disadvantages of Bridges
❑ Advantages of using a bridge
✓ Extend physical network.
✓ Reduce network traffic with minor segmentation.
✓ Creates separate collision domains.
✓ Reduce collisions.
✓ Connect different architecture.
Disadvantages of using bridges
✓ Slower than repeaters due to filtering.
✓ Do not filter broadcasts.
✓ More expensive than repeaters.
44
Hub
▪ A hub is used as a central point of connection among media segments.
▪ Types of HUBS :
1. Active Hubs
✓ Most hubs are active; that is, they regenerate and retransmit signals in the
same way as a repeater does.
45
Cont …
2 . Passive Hubs
✓ They act as connection points and do not amplify or regenerate the signal; the
signal passes through the hub.
3. Intelligent
46
Cont…
✓ The receptacles on the front of the hub are called ports.
✓ There are usually from 4 to 32 ports on a hub, depending on the size of the network.
✓ Some hubs have an additional interface port that connects to another hub, thus increasing
the size of the network.
47