Professional Documents
Culture Documents
Fundamentals of Networking
Objectives
In this Section, you will learn about:
Layered Task
Upon reaching its destination, the signal passes into layer 1 and is
transformed back into digital form. The data units then move back up
through the OSI layers.
As each block of data reaches the next higher layer, the headers and
trailers attached to it at the corresponding sending layer are removed,
and actions appropriate to that layer are taken.
By the time it reaches layer 7, the message is again in a form appropriate
to the application and is made available to the recipient.
Encapsulation
A packet (header and data) at level 7 is encapsulated in packet at level 6.
The whole packet at level 6 is encapsulated in a packet at level 5, and so
on.
In other words, the data portion of a packet at level N - 1 carries the
whole packet (data and header and maybe trailer) from level N.
The concept is called encapsulation; level N - 1 is not aware of which part of the
encapsulated packet is data and which part is the header or trailer.
For level N - 1, the whole packet coming from level N is treated as one integral
unit.
Physical Layer
Physical layer coordinates the functions required to carry a bit stream
over a physical medium.
It deals with the mechanical and electrical specifications of the interface
and transmission medium.
It also defines the procedures and functions that physical devices and
interfaces have to perform for transmission to occur.
Physical layer is responsible for movements of individual bits from one hop (node) to the
next.
Cont’d
The physical layer is also concerned with the following:
Physical characteristics of interfaces and medium: The physical layer defines the
characteristics of the interface between the devices and the transmission
medium. It also defines the type of transmission medium.
Representation of bits: The physical layer data consists of a stream of bits
(sequence of 0s or 1s) with no interpretation. To be transmitted, bits must be
encoded into signals - electrical or optical. The physical layer defines the type of
encoding (how 0s and 1s are changed to signals)
Data rate: The transmission rate - the number of bits sent each second - is also
defined by the physical layer. In other words, the physical layer defines the
duration of a bit, which is how long it lasts.
Synchronization of bits: The sender and receiver not only must use the same bit
rate but also must be synchronized at the bit level. In other words, the sender
and the receiver clocks must be synchronized.
Line configuration: The physical layer is concerned with the connection of
devices to the media (point – to – point or multipoint).
Physical topology: The physical topology defines how devices are connected to
make a network.
Transmission mode: The physical layer also defines the direction of transmission
between two devices: simplex, half-duplex, or full-duplex.
Data Link Layer
Data link layer transforms the physical layer, a raw transmission facility, to a
reliable link.
It makes the physical layer appear error-free to the upper layer (network layer).
The following figure shows the relationship of the data link layer to the network
and physical layers.
Data link layer is responsible for moving frames from one hop (node) to the next.
Layer 2 frame structure
Header Trailer
Start Frame Stop Frame
Data
(Flag) (Flag)
Address Type/Length FCS
Cont’d
Responsibilities of the data link layer include the following:
Framing: The data link layer divides the stream of bits received from the network
layer into manageable data units called frames.
Physical addressing: If frames are to be distributed to different systems on the
network, the data link layer adds a header to the frame to define the sender and/or
receiver of the frame. If the frame is intended for a system outside the sender‘s
network, the receiver address is the address of the device that connects the
network to the next one.
Flow control: If the rate at which the data are absorbed by the receiver is less than
the rate at which data are produced in the sender, the data link layer imposes a
flow control mechanism to avoid overwhelming the receiver.
Error control: The data link layer adds reliability to the physical layer by adding
mechanisms to detect and retransmit damaged or lost frames. It also uses a
mechanism to recognize duplicate frames. Error control is normally achieved
through a trailer added to the end of the frame.
Access control: When two or more devices are connected to the same link, data
link layer protocols are necessary to determine which device has control over the
link at any given time.
Cont’d
Hop-to-hop (node-to-node) delivery by data link layer
Cont’d
As the figure above shows, communication at the data link layer occurs between two
adjacent nodes.To send data from A to F, three partial deliveries are made.
First, the data link layer at A sends a frame to the data link layer at B (a router).
Second, the data link layer at B sends a new frame to the data link layer at E.
Finally, the data link layer at E sends a new frame to the data link layer at F.
Note that the frames that are exchanged between the three nodes have different
values in the headers. The frame from A to B has B as the destination address and A as
the source address. The frame from B to E has E as the destination address and B as
the source address. The frame from E to F has F as the destination address and E as the
source address. The values of the trailers can also be different if error checking
includes the header of the frame.
Framing
Data link layer, needs to pack bits into frames, so that each frame is
The simple act of inserting a letter into an envelope separates one piece of
In addition, each envelope defines the sender and receiver addresses since the
Framing in the data link layer separates a message from one source to a
Although the whole message could be packed in one frame, that is not
normally done.
One reason is that a frame can be very large, making flow and error
control very inefficient. When a message is carried in one very large
frame, even a single-bit error would require the retransmission of the
whole message. When a message is divided into smaller frames, a single-
bit error affects only that small frame.
Frames can be of fixed or variable size.
Cont’d
Fixed-Size Framing: In fixed-size framing, there is no need for defining the
This flag can create the same type of problem we saw in the byte-oriented protocols.
That is, if the flag pattern appears in the data, we need to somehow inform the receiver that
this is not the end of the frame. We do this by stuffing 1 single bit (instead of 1 byte) to
prevent the pattern from looking like a flag. The strategy is called bit stuffing. In bit stuffing, if
a 0 and five consecutive 1 bits are encountered, an extra 0 is added. This extra stuffed bit is
eventually removed from the data by the receiver.
Cont’d
Note that the extra bit is added after one 0 followed by five 1s regardless of
the value of the next bit. This guarantees that the flag field sequence does
not inadvertently appear in the frame.
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 mistaken the pattern 0111110 for a flag.
Cont’d
The above figure shows bit stuffing at the sender and bit removal at the receiver.
Note that even if we have a 0 after five 1s, we still stuff a 0. The 0 will be
removed by the receiver.
This means that if the flag like pattern 01111110 appears in the data, it will
change to 011111010 (stuffed) and is not mistaken as a flag by the receiver. The
real flag 01111110 is not stuffed by the sender and is recognized by the receiver
as a flag.
Flow Control
Flow control coordinates the amount of data that can be sent before receiving
an acknowledgment and is one of the most important duties of the data link
layer. In most protocols, flow control is a set of procedures that tells the sender
how much data it can transmit before it must wait for an acknowledgment from
the receiver.
The flow of data must not be allowed to overwhelm the receiver. Any receiving
device has a limited speed at which it can process incoming data and a limited
amount of memory in which to store incoming data.
The receiving device must be able to inform the sending device before those
limits are reached and to request that the transmitting device send fewer frames
or stop temporarily. Incoming data must be checked and processed before they
can be used.
The rate of such processing is often slower than the rate of transmission. For
this reason, each receiving device has a block of memory, called a buffer,
reserved for storing incoming data until they are processed. If the buffer begins
to fill up, the receiver must be able to tell the sender to halt transmission until
it is once again able to receive.
Encapsulation
As upper layer application data is determined for transmission over a network from
an end system, a series of processes and instructions must be applied to the data
before transmission can be successfully achieved.
encapsulation and for which each layer of the reference model is designed to
represent. 7 Application Data
6
Presentation layer Data
5
Session layer Data
4
Transport layer Data
3
Network layer Data
2
Data link layer Data
1
Physical layer
Communication Between Two End Stations
As part of the IEEE 802.3 Ethernet standard, data is encapsulated with
Data link layer frames are used to govern transmission over the
communications medium.
Frame Formats
Host A Host B
layer protocol. One common example of this is the Internet Protocol (IP) which is
represented by a hexadecimal value of 0x0800. Since
This value for IP represents a value greater than 0x0600, it is determined that the
header and is not so commonly applied the protocols in today’s networks, partially due to
the requirement for additional instructions which results in additional overhead per frame.
Some older protocols that have existed for many years but that are still applied in support
of Ethernet networks are likely to apply the IEEE 802.3 frame type. One clear example of
this is found in the case of the Spanning Tree Protocol (STP) that is represented by a value
of 0x03 within the type field of the SNAP header.
6 bytes 6 bytes 2 bytes 38-1492 bytes 4 bytes
D.MAC S.MAC Length LLC SNAP Data FCS
network using Media Access Control (MAC) addressing that allows end systems within a
multi access network to be distinguished.
The MAC address is a physical address that is burned into the network interface card to
This same MAC address is retrieved and used as the destination MAC address of the
intended receiver by the sender, before the frame is transferred to the physical layer for
forwarding over the connected medium.
(base 16) format and comprised of two parts that attempt to ensure that every
MAC address is globally unique.
The remaining 24 bits of the MAC address is a value that is incrementally and
48 bits
24 bits 24 bits
7 bits 0
Host A Host B
unicast
Host C Host D
Broadcast Frame Forwarding
. 48 bits
FF FF FF FF FF FF
Host A Host B
broadcast
Host C Host D
Multicast Frame Forwarding
48 bits
7 bits 1
Host A Host B
multicast
Host C Host D
Carrier Sense
Host A Host B Host C
Data
Frame Processing
. Host A Host B
Data
G0/0/1
G0/0/2 G0/0/3
association between a destination MAC address and the port interface via which
a frame should be forwarded.
47
The Initial State of The Switch
Switch A MAC Address Table
MAC Interface
G0/0/1
G0/0/2 G0/0/3
MAC Interface
00-01-02-03-04-AA G0/0/1
G0/0/1
G0/0/2 G0/0/3
are able to forward frames to destinations located via other switches within the
broadcast domain.
The failure however of any point-to-point switch link results in the immediate
isolation of the downstream switch and all end systems to which the link is
connected.
switching network.
Layer 2 Redundancy
. Switch A Switch B
00-01-02-03-04-AA
Switch A
Host B
Switch C
00-01-02-03-04-BB
00-01-02-03-04-AA
Switch A
MAC Interface
00-01-02-03-04-AA G0/0/3
00-01-02-03-04-AA G0/0/2
Host B
Switch C
00-01-02-03-04-BB
00-01-02-03-04-AA
Switch A
Host B
Switch C
00-01-02-03-04-BB
Non-Root Non-Root
This comprises of two parts, the first being a 16 bit bridge priority and the
The device that is said to contain the highest priority (smallest bridge ID) is
. Root
BPDU BPDU
Configuration TCN
Path Cost
Another feature of the BPDU is the propagation of two parameters relating
to path cost .
The root path cost (RPC) is used to measure the cost of the path to the
root bridge in order to determine the spanning tree shortest path, and
When the bridge is the root bridge, the root path cost is 0.
The path cost (PC) is a value associated with the root port, which is the port
on a downstream switch that connects to the LAN segment, on which a
designated switch or root bridge resides
Path Cost
.
Root
RPC 0 RPC 0
20000 20000
RPC 20000 20000
20000
20000
RPC 20000 RPC 20000 RPC 20000
20000
Root path cost is carried in the BPDU and used to determine the shortest
path to the root.
Path Cost Standards
.
Path Cost
Port Speed 802.1D 802.1t
Legacy
10 Mbps 99 1999999 1999
100 Mbps 18 199999 199
1 Gbps 4 20000 20
10 Gbps 2 2000 2
RPC 0 RPC 0
D D
R RPC 20000 R
A D
R R R
A 128.2
R
128.1
32768 00-01-02-03-04-CC
Where the root path cost is equal, a port identifier is used to determine the
active and alternate paths to the root.
Timers
The root bridge is responsible for the generation of configuration BPDU based
A Max Age timer is associated with each BDPU and represents life span of a
BPDU from the point of conception by the root bridge, and ultimately controls
the validity period of a BDPU before it is considered obsolete.
1/9/2022
Timers
.
BPDU Interval MSG Age: 0
(2 seconds) MAX Age: 20
BPDU BPDU
BPDU BPDU
BPDU
Switch B Switch C
32768 00-e0-fc-41-42-59
BPDU 32768 00-e0-fc-41-43-69
D A
Switch B Switch C
G0/0/2 G0/0/2
The Bridge ID and Root Path Cost are used to elect port roles.
Port State Transition
.
Disabled
① ⑤
⑤
③
Forwarding Blocking
⑤ ③
③
④ ⑤
Learning Listening
④
Root Failure
. Switch A
Root
Non root bridges wait for MAX Age before assuming loss of root.
Root
BPDU
Switch B Switch C
A
BPDU
A
R Switch C
32768 00-01-02-03-04-CC
A 00-01-02-03-04-AA
Switch A
MAC Interface
00-01-02-03-04-AA G0/0/3
00-01-02-03-04-BB G0/0/2
R
Host B
Switch C
00-01-02-03-04-BB
BPDU BPDU
TCN BPDU
TCN BPDU
G0/0/2 00-01-02-03-04-AA
Switch A G0/0/1 D
MAC Interface
00-01-02-03-04-AA G0/0/3
00-01-02-03-04-BB G0/0/2
Root G0/0/1
R 00-01-02-03-04-BB G0/0/1
Switch C Host B
00-01-02-03-04-BB
System Administration
Thank You…..!!!