Mac: Media Access Control Address
Mac: Media Access Control Address
Characteristics
The MAC address that is considered to be the distinguishing number
of the hardware is globally unique. This lets us identify each device
within a connected network.
The total length MAC address in byte is 6 (or 48 bits). According to
the IEEE 802 standards, this address is written in three commonly
used formats:
Six two-digits hexadecimals separated by hyphens (-) like
45-67-89-AB-12-CD .
Six two-digits hexadecimals separated by colons (:) like
45:67:89:AB:DE:23 .
Four three-digits hexadecimals separated by dots (.) like
ABCD.4567.1238 .
The right 24 bits (4 bytes) of the address is termed
as Organizationally Unique Identifier (OUI) number. This OUI number
is assigned by Internet Assigned Number Authority (IANA). This
globally unique OUI number will always remain the same for NICs
manufactured by the same company. The left 24 bits (4 bytes) of the
address is termed as Network Interface Controller Specific
(NICS), which is responsible for communication either by using
cables or wirelessly over a computer network.
Types of MAC address
Unicast MAC address
Unicast MAC address represents a specific NIC or onboard NIC ports in
the network.
Parts of a Frame
Framming Approches
LINE DISCIPLINE
Line Discipline is a functionality of the Data link layer that provides the
coordination among the link systems. It determines which device can
send, and when it can send the data.
ENQ/ACK
Poll/select
ENQ/ACK
Working of ENQ/ACK
The transmitter transmits the frame called an Enquiry (ENQ) asking
whether the receiver is available to receive the data or not.
The receiver responses either with the positive acknowledgement(ACK) or
with the negative acknowledgement(NACK) where positive
acknowledgement means that the receiver is ready to receive the
transmission and negative acknowledgement means that the receiver is
unable to accept the transmission.
Following are the responses of the receiver:
If the response to the ENQ is positive, the sender will transmit its
data, and once all of its data has been transmitted, the device
finishes its transmission with an EOT (END-of-Transmission) frame.
If the response to the ENQ is negative, then the sender disconnects
and restarts the transmission at another time.
If the response is neither negative nor positive, the sender assumes
that the ENQ frame was lost during the transmission and makes
three attempts to establish a link before giving up.
POLL/SELECT
Working of Poll/Select
The Poll mode is used when the primary device wants to receive
some data from the secondary device.
When a primary device wants to receive the data, then it asks each
device whether it has anything to send.
Firstly, the primary asks (poll) the first secondary device, if it
responds with the NACK (Negative Acknowledgement) means that
it has nothing to send. Now, it approaches the second secondary
device, it responds with the ACK means that it has the data to send.
The secondary device can send more than one frame one after
another or sometimes it may be required to send ACK before
sending each one, depending on the type of the protocol being
used.
FLOW CONTROL
It is a set of procedures that tells the sender how much data it can
transmit before the data overwhelms the receiver.
The receiving device has limited speed and limited memory to store
the data. Therefore, the receiving device must be able to inform the
sending device to stop the transmission temporarily before the
limits are reached.
It requires a buffer, a block of memory for storing the information
until they are processed.
Stop-and-wait
Sliding window
a) Stop-and-wait
Advantage of Stop-and-wait
The Stop-and-wait method is simple as each frame is checked and
acknowledged before the next frame is sent.
Disadvantage of Stop-and-wait
Stop-and-wait technique is inefficient to use as each frame must
travel across all the way to the receiver, and an acknowledgement
travels all the way before the next frame is sent. Each frame sent and
received uses the entire time needed to traverse the link.
b) Sliding Window
Sender Window
Receiver Window
Suppose the size of the window is 7 means that the receiver window
contains seven spaces for seven frames. If the one frame is received,
then the receiver window shrinks and moving the boundary from 0
to 1. In this way, window shrinks one by one, so window now
contains the six spaces. If frames from 0 through 4 have sent, then
the window contains two spaces before an acknowledgement is
sent.
Example
Suppose that we have sender window and receiver window each of size
4. So the sequence numbering of both the windows will be 0,1,2,3,0,1,2
and so on. The following diagram shows the positions of the windows
after sending the frames and receiving acknowledgments.
ERROR CONTROL
Error control in data link layer is the process of detecting and correcting
data frames that have been corrupted or lost during transmission.
In case of lost or corrupted frames, the receiver does not receive the
correct data-frame and sender is ignorant about the loss. Data link layer
follows a technique to detect transit errors and take necessary actions,
which is retransmission of frames whenever error is detected or frame is
lost. The process is called Automatic Repeat Request (ARQ).
I. The sending device keeps a copy of the last transmitted frame until
the acknowledgement is received. Keeping the copy allows the
sender to retransmit the data if the frame is not received correctly.
II. Both the data frames and the ACK frames are numbered alternately
0 and 1 so that they can be identified individually. Suppose data 1
frame acknowledges the data 0 frame means that the data 0 frame
has been arrived correctly and expects to receive data 1 frame.
III. If an error occurs in the last transmitted frame, then the receiver
sends the NAK frame which is not numbered. On receiving the NAK
frame, sender retransmits the data.
IV. It works with the timer. If the acknowledgement is not received
within the allotted time, then the sender assumes that the frame is
lost during the transmission, so it will retransmit the frame.
II. Lost Frame: Sender is equipped with the timer and starts when the
frame is transmitted. Sometimes the frame has not arrived at the
receiving end so that it can be acknowledged neither positively nor
negatively. The sender waits for acknowledgement until the timer
goes off. If the timer goes off, it retransmits the last transmitted
frame.
SLIDING WINDOW ARQ
Go-Back-N ARQ
o Both the sender and the receiver have buffers called sending
window and receiving window respectively.
o The sender sends multiple frames based upon the sending-
window size, without receiving the acknowledgment of the
previous ones.
o The receiver also receives multiple frames within the receiving
window size.
o The receiver keeps track of incoming frame’s sequence
numbers, buffers the frames in memory.
o It sends ACK for all successfully received frames and sends
NACK for only frames which are missing or damaged.
o The sender in this case, sends only packet for which NACK is
received.
MULTI ACCESS COMMUNICATION
If there is a dedicated link between the sender and the receiver then
data link control layer is sufficient, however if there is no dedicated link
present then multiple stations can access the channel simultaneously.
Hence multiple access protocols are required to decrease collision and
avoid crosstalk.
In this, all stations have same superiority that is no station has more
priority than another station. Any station can send data depending on
medium’s state (idle or busy). It has two features:
1. There is no fixed time for sending data
2. There is no fixed sequence of stations sending data
The Random access protocols are further subdivided as:
a) ALOHA
It is designed for wireless LAN (Local Area Network) but can also be used
in a shared medium to transmit data. Using this method, any station can
transmit data across a network simultaneously when a data frameset is
available for transmission.
Aloha Rules
Pure Aloha
The mode of random access in which users can transmit at any time is
called pure Aloha. This technique is explained below in a stepwise manner.
Step 1 − In pure ALOHA, the nodes transmit frames whenever there is
data to send.
Step 2 − When two or more nodes transmit data simultaneously, then
there is a chance of collision and the frames are destroyed.
Step 3 − In pure ALOHA, the sender will expect acknowledgement from
the receiver.
Step 4 − If acknowledgement is not received within specified time, the
sender node assumes that the frame has been destroyed.
Step 5 − If the frame is destroyed by collision the node waits for a random
amount of time and sends it again. This waiting time may be random
otherwise the same frames will collide multiple times.
Step 6 − Therefore, pure ALOHA says that when the time-out period
passes, each station must wait for a random amount of time before re-
sending its frame. This randomness will help avoid more collisions.
1. The total vulnerable time of pure Aloha is 2 * Tfr (Frame transmission
time)
2. Maximum throughput occurs when G = 1/ 2 that is 18.4%.
3. Successful transmission of data frame is S = G * e ^ - 2 G.
Slotted ALOHA
c) CSMA/ CD
3. CHANNELIZATION PROTOCOLS
a) FDMA
b) TDMA
c) CDMA
RARP
RARP is an abbreviation for Reverse Address Resolution
Protocol. RARP is a TCP/IP protocol that is responsible for the translation
of Physical Address (e.g. – Ethernet address) to be translated into an IP
address.
When a framework with a local disk is bootstrapped, it generally
accepts its IP address from a configuration document that's read from a
disk file. But a system without a disk, including an X terminal or a diskless
workstation, needs some other way to accept its IP address.
The feature of RARP is for the diskless framework to read its specific
hardware address from the interface card and send a RARP request asking
for someone to reply with the diskless systems IP address.
Steps to Achieve the IP Address from RARP Server:
1. Source Device “Generates RARP Request Message” – The source
device generates a RARP Request message. The Source puts its own
data link-layer address as both the Sender Hardware Address and
also the Target Hardware Address. It leaves both the Sender Protocol
Address and the Target Protocol Address blank.
2. Source Device “Broadcasts RARP Request Message” – The source
broadcasts the ARP Request message on the local network.
3. Local Devices “Process RARP Request Message” – The message is
received by each device on the local network and processed. Devices
that are not configured to act as RARP servers ignore the message.
4. RARP Server Generates RARP Reply Message: Any device on the
network that is a RARP server responds to the broadcast from the
source device. It generates a RARP Reply and sets the Sender
Hardware Address and Sender Protocol Address to its own hardware
and IP address of course. It then sets the Target Hardware Address to
the hardware address of the original source device. It looks up in a
table the hardware address of the source, determines that device’s IP
address assignment, and puts it into the Target Protocol Address
field.
5. RARP Server Sends RARP Reply Message: The RARP server sends
the RARP Reply message unicast to the device looking to be
configured.
6. Source Device Processes RARP Reply Message: The source device
processes the reply from the RARP server. It then configures itself
using the IP address in the Target Protocol Address supplied by the
RARP server.
RARP ARP
RARP stands for Reverse ARP stands for Address Resolution
Address Resolution Protocol Protocol
In RARP, we find our own IP In ARP, we find the IP address of a
address remote machine
The MAC address is known and The IP address is known, and the
the IP address is requested MAC address is being requested
It uses the value 3 for requests It uses the value 1 for requests and
and 4 for responses 2 for responses
The ARP table is maintained by The RARP table is maintained by
the Local Host. the RARP Server.
CLASSLESS ADDRESSING
Classless addressing is a concept of addressing the IPv4 addresses.
It was adopted after the failure of classful addressing. The classful
addressing leads to wastage of addresses as it assigns a fixed-size block
of addresses to the customer. But, the classless addressing assigns a block
of addresses to the customer according to its requirement which prevents
the wastage of addresses.
Classless Addressing is an improved IP Addressing system.
It makes the allocation of IP Addresses more efficient.
It replaces the older classful addressing system based on classes.
It is also known as Classless Inter Domain Routing (CIDR).
CIDR Block-
When a user asks for specific number of IP Addresses,
CIDR dynamically assigns a block of IP Addresses based on certain rules.
This block contains the required number of IP Addresses as demanded
by the user.
This block of IP Addresses is called as a CIDR block.