CN U3
CN U3
CN U3
Transport Framing
Network Error
control
Data Link
Flow
control
Physical
Transmission/reception of
frames
The Medium Access Sub layer
deals with
• ALOHA
• Carrier Sense Multiple Access Protocols(CSMA)
• Collision-Free Protocols
• Limited-Contention Protocols
• Wavelength Division Multiple Access Protocols
• Wireless LAN Protocols
ALOHA
When a first frame arrives, the When a node has a fresh frame to
node immediately transmits send, it waits until the beginning
of the next slot
CSMA Methods
1-persistent CSMA
non-persistent CSMA
p-persistent CSMA
1-persistent
When a station has data to send, it first listens to channel to see
if any one else is transmitting at that moment.
If the channel is busy, the station continuously senses until it
becomes idle.
When the station detects an idle channel, it transmits a frame.
If a collision occurs, the station waits a random amount of time
and starts all over again.
The station transmits with a probability of 1 whenever if finds
the channel idle.
Performance
1-persistent stations are selfish
If two or more stations becomes ready at the same time,
collision guaranteed
1-persistent
Comparison of the channel utilization versus load for various random access
protocols.
CSMA with Collision Detection
• In this method a station monitors the medium after
it sends a frame it check if the transmission was
successful.
• station aborts their transmissions as soon as they
detect a collision . To save time and bandwidth.
• If collision occurs a special signal has to be send,so
that other stops transmitting the data .this signal is
called jamming signal
CSMA/CD Protocol
• Use one of the CSMA persistence algorithm
(non-persistent, 1-persistent, p-persistent) for
transmission
• If a collision is detected by a station during its transmission
then it should do the following:
– Abort transmission and
– Transmit a jam signal to notify other stations of collision so that
they will discard the transmitted frame also to make sure that the
collision signal will stay until detected by all the station
– After sending the jam signal, backoff (wait) for a random amount
of time, then
– Transmit the frame again
of its own
signal, it means collision occurred
CSMA with Collision Detection
12.42
Wired LANs: Ethernet
13-43
MAC Sublayer
• In Standard Ethernet, the MAC sublayer governs
the operation of the access method.
• It also frames data received from the upper layer
and passes them to the physical layer.
• Frame Format
– The Ethernet frame contains seven fields: preamble,
SFD, DA, SA, length or type of protocol data unit
(PDU), upper-layer data, and the CRC
– It does not provide any mechanism for acknowledging
received frames, making it what is known as an
unreliable medium.
IEEE 802.3 MAC FRAME FORMAT:
Preamble: The first field of the 802.3 frame Contain 7bytes (56
bits) of alternating 0’s and 1’s.that alerts the receiving system to
the coming frame and enables it to synchronize.
The preamble is actually added at the physical layer and is not
formally part of the frame.
IEEE 802.3 MAC FRAME FORMAT:
•Start frame delimiter (SFD). The second field (l byte: 10101011) signals the
beginning of the frame. The SFD warns the station or stations that this is the
last chance for synchronization. The last 2 bits is 11 and alerts the receiver
that the next field is the destination address.
•Destination address (DA). The DA field is 6 bytes and contains the physical
address of the destination station or stations to receive the packet.
•Source address (SA). The SA field is also 6 bytes and contains the physical
address of the sender of the packet.
•Length or type. This field is defined as a type field or length field. The original
Ethernet used this field as the type field to define the upper-layer protocol
using the MAC frame. The IEEE standard used it as the length field to define
the number of bytes in the data field. Both uses are common today.
•Data. This field carries data encapsulated from the upper-layer protocols. It is
a minimum of 46 and a maximum of 1500 bytes
•CRC. The last field contains error detection information, in this case a CRC-32
FRAME LENGTH
• Ethernet has imposed restrictions on both the
minimum and maximum lengths of a frame
Addressing
• Each station on an Ethernet network (such as a PC,
workstation, or printer) has its own network interface card
(NIC). The NIC fits inside the station and provides the station
with a 6-byte physical address.
Addressing
• Ethernet address in hexadecimal notation
• The least significant bit of the first byte defines the type of address.
If the bit is 0, the address is unicast; otherwise, it is multicast
• The broadcast destination address is a special case of the multicast
address in which all bits are 1s
13-49
Unicast, Multicast & Broadcast Addressing
• Source Address is always Unicast means, frame comes from only one
station.
• Destination Address can be Unicast, Multicast , Broadcast
• Unicast Addressing : Defines only one recipient. Sender & Receiver
relationship is one-one.
• Multicast Addressing: Defines a group of addresses. Sender &
Receiver relationship is one-many.
• Broadcast Addressing: Defines a special case of Multicast Address in
which destination address is forty eight 1’s .
50
Standard Ethernet
• The original Ethernet was created in 1976 at Xerox’s Palo Alto
Research Center (PARC). Since then, it has gone through four
generations
13-51
Physical Layer: Ethernet
13-52
Figure 12-9
• MAC Sublayer
• CSMA/CD for the half-duplex approach
• No need for CSMA/CD for full-duplex Fast Ethernet
• Implementation
A Bridge
Multiport Bridge
• Filtering:
– A bridge has filtering capability. It can check the
destination address of a frame and decide if the
frame should be forwarded or dropped.
– If the frame is to be forwarded, the decision must
specify the port.
– A bridge has a table that maps addresses to ports.
Types of Bridges:
• Transparent Bridges.
• Source Routing Bridges.
Transparent Bridges
• A transparent bridge is a bridge in which the stations are
completely unaware of the bridge's existence.
• If a bridge is added or deleted from the system,
reconfiguration of the stations is unnecessary.
• Basic Function:
– Forwarding: Frames must be forwarded from one station
to another.
– Learning: The forwarding table is automatically made by
learning frame movements in the network.
– Prevention of Looping: Loops in the system must be
prevented.
Forwarding - 3 rules for forwarding the frame.
If destination and source LANs are the same
discard the frame.
If destination and source LANs are different ,
forward the frame.
If the destination LAN is unknown, use flooding.
Learning:
• The earliest bridges had forwarding tables that were static.
If a station was added or deleted, the table had to be
modified manually.
• A better solution to the static table is a dynamic table that
maps addresses to ports automatically.
• To make a table dynamic, we need a bridge that gradually
learns from the frame movements.
• To do this, the bridge inspects both the destination and the
source addresses. The destination address is used for the
forwarding decision (table lookup); the source address is
used for adding entries to the table and for updating
purposes.
A B
LAN 1
1 E
3
BRIDG
2 F
LAN 2
LAN 3
C D
A 1 A 1 A 1
E 3 E 3
B 1
(a) original (b) If A to D (c) If E to A (d) If B to C
Prevention of Looping:
– Transparent bridges work fine as long as there are no
redundant bridges in the system.
– Systems administrators, however, like to have redundant
bridges (more than one bridge between a pair of LANs) to
make the system more reliable. If a bridge fails, another
bridge takes over until the failed one is repaired or
replaced.
– Redundancy can create loops in the system, which is very
undesirable
– To solve the looping problem, the IEEE specification
requires that bridges use the spanning tree algorithm to
create a loopless topology.
Source Routing Bridges
• In source routing bridges, a sending station defines the
bridges that the frame must visit.
• The addresses of these bridges are included in the
frame.
• In other words, the frame contains not only the source
and destination addresses, but also the addresses of all
bridges to be visited.
• The source gets these bridge addresses through the
exchange of special frames with the destination prior
to sending the data frame.
• Token Ring networks mainly use source-routing
bridges.