module_2_ccn PPT

Download as pdf or txt
Download as pdf or txt
You are on page 1of 81

Data link layer

9.1 INTRODUCTION

Topics discussed in this section:


Nodes and Links
Services
9.2 LINK LAYER ADDRESSING/
LINK ADDRESS/PHYSICAL ADDRESS/MAC
ADDRESS

Topics discussed in this section:


Three types of addresses
Address Resolution Protocol (ARP)
Figure 9.5 IP addresses and link-layer addresses in a small internet
Three Types of addresses

Unicast Address
Each host or each interface of a router is assigned a unicast address.
Unicasting means one-to-one communication. A frame with a unicast
address destination is destined only for one entity in the link.
A3:34:45:11:92:F1
Multicast Address
Some link-layer protocols define multicast addresses. Multicasting
means one-to-many communication. However, the jurisdiction is local
(inside the link).
A2:34:45:11:92:F1
Broadcast Address
Some link-layer protocols define a broadcast address. Broadcasting
means one-to-all communication. A frame with a destination broadcast
address is sent to all entities in the link.

FF:FF:FF:FF:FF:FF
Figure 9.6 Position of ARP in TCP/IP protocol suite

❑ The ARP protocol is one of the auxiliary protocols defined in the


network layer. It belongs to the network layer, but it maps an IP
address to a logical-link address.

❑ ARP accepts an IP address from the IP protocol, maps the address


to the corresponding link-layer address, and passes it to the data-link
layer.
Figure 9.7 ARP operation
Figure 9.8 ARP Packet Format

Hardware: LAN or WAN protocol


Protocol: Network-layer protocol
Figure 9.9 Example 9.4
11.1 Data Link Control (DLC) SERVICES

Topics discussed in this section:


Framing
Flow control and Error control
Connectionless and Connection oriented
11-1 FRAMING

The data link layer needs to pack bits into frames, so


that each frame is distinguishable from another. Our
postal system practices a type of framing. The simple
act of inserting a letter into an envelope separates one
piece of information from another; the envelope serves
as the delimiter.

Frame size:

Fixed-Size Framing
Variable-Size Framing
VARIABLE-SIZE FRAMING

TWO APPROACHES:
1.a character/byte-oriented framing
2.a bit oriented framing
Figure 11.1 A frame in a character-oriented protocol

Header: Source & Destination Address and control information


Trailer: Error detection or Error correction redundant bits
Flag: 8-bit or 1-byte to separate one frame from another
Figure 11.2 Byte stuffing and unstuffing

11.16
Note

Byte stuffing is the process of adding 1


extra byte whenever there is a flag or
escape character in the text.

11.17
Figure 11.3 A frame in a bit-oriented protocol

11.18
Figure 11.4 Bit stuffing and unstuffing

11.19
Note

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.

11.20
Multiple Access Control
Figure 12.1 Taxonomy of multiple-access protocols
12-1 RANDOM ACCESS

In random access or contention methods, no station is superior


to another station and none is assigned the control over another.
No station permits, or does not permit, another station to send.
At each instance, a station that has data to send uses a
procedure defined by the protocol to make a decision on
whether or not to send.

Topics discussed in this section:

12.1.1 ALOHA
12.1.2 Carrier Sense Multiple Access
12.1.3 Carrier Sense Multiple Access with Collision Detection
12.1.4 Carrier Sense Multiple Access with Collision Avoidance
Figure 12.2 Frames in a pure ALOHA network
Figure 12.3 Procedure for pure ALOHA protocol
Figure 12.4 Vulnerable time for pure ALOHA protocol
Note

The throughput for pure ALOHA is


S = G × e −2G .
G the average number of frames generated by the system during one frame
transmission time
The maximum throughput
Smax = 0.184 when G= (1/2).
Example 12.3
A pure ALOHA network transmits 200-bit frames on a
shared channel of 200 kbps. What is the throughput if the
system (all stations together) produces
a. 1000 frames per second b. 500 frames per second
c. 250 frames per second.
Solution
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, this is 1
frame per millisecond. The load is 1. In this case
S = G× e−2 G or S = 0.135 (13.5 percent). This means
that the throughput is 1000 × 0.135 = 135 frames. Only
135 frames out of 1000 will probably survive.
Example 12.3 (continued)
b. If the system creates 500 frames per second, this is
(1/2) frame per millisecond. The load is (1/2). In this
case S = G × e −2G or S = 0.184 (18.4 percent). This
means that the throughput is 500 × 0.184 = 92 and that
only 92 frames out of 500 will probably survive. Note
that this is the maximum throughput case,
percentagewise.

c. If the system creates 250 frames per second, this is (1/4)


frame per millisecond. The load is (1/4). In this case
S = G × e −2G or S = 0.152 (15.2 percent). This means
that the throughput is 250 × 0.152 = 38. Only 38
frames out of 250 will probably survive.
Slotted ALOHA
Figure 12.5 Frames in a slotted ALOHA network
Figure 12.6 Vulnerable time for slotted ALOHA protocol
Note

The throughput for slotted ALOHA is


S = G × e−G .
The maximum throughput
Smax = 0.368 when G = 1.
Example 12.4
A slotted ALOHA network transmits 200-bit frames on a
shared channel of 200 kbps. What is the throughput if the
system (all stations together) produces
a. 1000 frames per second b. 500 frames per second
c. 250 frames per second.
Solution
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, this is 1
frame per millisecond. The load is 1. In this case
S = G× e−G or S = 0.368 (36.8 percent). This means
that the throughput is 1000 × 0.0368 = 368 frames.
Only 386 frames out of 1000 will probably survive.
Example 12.4 (continued)
b. If the system creates 500 frames per second, this is
(1/2) frame per millisecond. The load is (1/2). In this
case S = G × e−G or S = 0.303 (30.3 percent). This
means that the throughput is 500 × 0.0303 = 151.
Only 151 frames out of 500 will probably survive.

c. If the system creates 250 frames per second, this is (1/4)


frame per millisecond. The load is (1/4). In this case
S = G × e −G or S = 0.195 (19.5 percent). This means
that the throughput is 250 × 0.195 = 49. Only 49
frames out of 250 will probably survive.
Carrier sense multiple access (CSMA)

• To minimize the chance of collision and, therefore, increase the


performance, the CSMA method was developed.

• The chance of collision can be reduced if a station senses the


medium before trying to use it.

• Carrier sense multiple access (CSMA) requires that each station


first listen to the medium (or check the state of the medium)
before sending. In other words, CSMA is based on the principle
“sense before transmit” or “listen before talk.”
Figure 12.7 Space/time model of the collision in CSMA
Figure 12.8 Vulnerable time in CSMA
Figure 12.9 Behavior of three persistence methods
Figure 12.10 Flow diagram for three persistence methods
Figure 12.11 Collision of the first bit in CSMA/CD
Figure 12.12 Collision and abortion in CSMA/CD
Figure 12.13 Flow diagram for the CSMA/CD
Figure 12.14 Energy level during transmission, idleness, or collision
Figure 12.15 CSMA/CA

• Interframe Space (IFS)


• Contention Window
• Acknowledgements
Note

In CSMA/CA, the IFS can also be used to


define the priority of a station or a frame.
Note

In CSMA/CA, if the station finds the


channel busy, it does not restart the
timer of the contention window;
it stops the timer and restarts it when
the channel becomes idle.
Figure 12.16
Flow diagram for CSMA/CA
Figure 12.17
CSMA/CA and NAV
CSMA/CA and CSMA/CD

https://www.youtube.com/watch?v=iKn0GzF5-IU
In CSMA/CD, the data rate is 10 Mbps, the distance between station
A and C is 2km, and the propagation speed is 2 x 108 mls. Station A
starts sending a long frame at time t1=0; station C starts sending a
long frame at time t2=3µs. The size of the frame is long enough to
guarantee the detection of collision by both stations.
Find:
a. The time when station C hears the collision (t3)
b. The time when station A hears the collision (t4)
c. The number of bits station A has sent before detecting the collision.
d. The number of bits station C has sent before detecting the collision.
Figure 12.11 Collision of the first bit in CSMA/CD
Chapter 3.2

Connecting Devices and


Virtual LANs

13.64
Chapter 3.2

13.65
Figure 17.1 Three categories of connecting devices

13.66
17.1.1 Hubs

❑ A repeater has no filtering capability.

13.67
17.1.1 Hubs

❑ A repeater has no filtering capability.

13.68
17.1.2 Link – Layer Switches (or Switch)

❑ A link-layer switch has a table used in filtering


decisions.
❑ A link-layer switch does not change the link-layer
(MAC) addresses in a frame.

13.69
Transparent Switches

1. Frames must be forwarded from one station to another.

2. The forwarding table is automatically made by learning frame

movements in the network.

3. Loops in the system must be prevented.

13.70
Transparent Switches
Learning Switch

13.71
Transparent Switches

Looping
Problem

13.72
Spanning Tree Algorithm (Example)
Step 1: Actual system of connected LANs

Step 2: Graphical Representation and cost assigned to each arc

13.73
Contd…

Step 3 : Finding the shortest paths and the spanning tree in a system of switches

13.74
Contd…
Step 4: Forwarding and blocking ports after using spanning tree algorithm

13.75
17.2 VIRTUAL LANS

• A virtual local area network (VLAN) as a local area


network configured by software, not by physical wiring.

• A virtual connection between two stations belonging to


two different physical LANs

13.76
Figure 17.11 A switch using VLAN software

• The whole idea of VLAN technology is to divide a LAN into


logical, instead of physical, segments.

13.77
Figure 17.12 Two switches in a backbone using VLAN software

13.78
13.79
3. Create system of four LANS with four Switches. The Switches connects the LANS as follows.
1. S1 connects LAN1 and LAN2
2. S2 connects LAN1 and LAN3
3. S3 connects LAN2 and LAN4
4. S4 connects LAN3 and LAN4
Choose S1 as root switch. Show the forwarding and blocking ports after applying the spanning tree.

13.80

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy