Pages

Friday 25 October 2024

Ethernet IEEE 802.3

The basic frame format which is required for all MAC implementation is defined in IEEE 802.3 standard. Ethernet frame starts with the Preamble and SFD, both work at the physical layer. The ethernet header contains both the Source and Destination MAC address, after which the payload of the frame is present. The last field is CRC which is used to detect the error. 

1. Preamble

It is a 7 byte field that contains a pattern of alternating 0’s and 1’s.
It alerts the stations that a frame is going to start.
It also enables the sender and receiver to establish bit synchronization.
 
2. Start Frame Delimiter (SFD)-
 
It is a 1 byte field which is always set to 10101011.
The last two bits “11” indicate the end of Start Frame Delimiter and marks the beginning of the frame.
 
NOTES
The above two fields are added by the physical layer and represents the physical layer header.
Sometimes, Start Frame Delimiter (SFD) is considered to be a part of Preamble.
That is why, at many places, Preamble field length is described as 8 bytes.
 
3. Destination Address-
 
It is a 6 byte field that contains the MAC address of the destination for which the data is destined.
 
4. Source Address-
 
It is a 6 byte field that contains the MAC address of the source which is sending the data.
 
5. Length-
 
It is a 2 byte field which specifies the length (number of bytes) of the data field.
This field is required because Ethernet uses variable sized frames.
 
NOTES
The maximum value that can be accommodated in this field = 2^16 – 1 = 65535.
But it does not mean maximum data that can be sent in one frame is 65535 bytes.
The maximum amount of data that can be sent in a Ethernet frame is 1500 bytes.
This is to avoid the monopoly of any single station.
 
The following three fields collectively represents the Ethernet Header–
Destination Address (6 bytes)
Source Address (6 bytes)
Length (2 bytes)
Thus, Ethernet Header Size = 14 bytes.
 
6. Data-
 
It is a variable length field which contains the actual data.
It is also called as a payload field.
The length of this field lies in the range [ 46 bytes , 1500 bytes ].
Thus, in a Ethernet frame, minimum data has to be 46 bytes and maximum data can be 1500 bytes.
 
Minimum Length of Data Field
 
Ethernet uses CSMA / CD as access control method to deal with collisions.For detecting the collisions, CSMA / CD requires-
Minimum length of data packet = 2 x Propagation delay x Bandwidth
Substituting the standard values of Ethernet, it is found that minimum length of the Ethernet frame has to be 64 bytes starting from the destination address field to the CRC field and 72 bytes including the Preamble and SFD fields.
Therefore, minimum length of the data field has to be = 64 bytes – (6+6+2+4) bytes = 46 bytes
 
Maximum Length of Data Field
 
The maximum amount of data that can be sent in a Ethernet frame is 1500 bytes.
This is to avoid the monopoly of any single station.
If Ethernet allows the frames of big sizes, then other stations may not get the fair chance to send their data.
 
7. Frame Check Sequence (CRC)-
 
It is a 4 byte field that contains the CRC code for error detection.
 
Advantages of Using Ethernet-
 
It is simple to understand and implement.
Its maintenance is easy.
It is cheap.

Asynchronous Transfer Mode (ATM): Architecture and Layers

ATM has a three-dimensional architecture. It contains the user plane, control plane, and management plane.Both the user plane and the control plane are divided into the following layers: 

physical layer, 
ATM layer, 
ATM Adaptation Layer (AAL), and upper layer. 

Each layer is further divided into sublayers.The control plane establishes and tears down connections with signaling protocols. The management plane contains layer management and plane management. Layer management manages the layers in each plane and has a layered structure corresponding to other planes. Plane management manages the system and the communications between different planes.Figure shows the relationships between layers and planes in ATM.

ATM layers have the following functions:

Physical layer—Provides transmission channels for ATM cells. At this layer, cells received from the ATM layer are transferred into a continuous bit stream after transmission overheads are added to them. Meanwhile, continuous bit streams received from physical media are restored to cells, which are then passed to the ATM layer.

ATM layer—Resides over the physical layer, and implements cell-based communication with its peer layer by invoking the services provided by the physical layer. It is independent of physical media, implementation of the physical layer, and types of services being carried. AAL passes 48-byte payloads, which are called segmentation and reassembly protocol data units (SAR-PDUs) to the ATM layer. The ATM layer encapsulates the 48-byte payloads in 5-byte headers, and passes 53-byte cells to the physical layer. Other functions of the ATM layer include VPI/VCI transmission, cell multiplexing/demultiplexing, and generic flow control.

ATM Adaptation Layer—Provides interfaces between high-level protocols and the ATM Layer. It forwards information between the ATM layer and upper-layer protocols. Four types of AAL are available: AAL1, AAL2, AAL3/4, and AAL5, each of which supports specific services provided in an ATM network. Hewlett Packard Enterprise uses AAL5 for data communication services.

ATM upper-layer protocols—Responsible for WAN interconnection, Layer 3 interconnection, and multiprotocol over ATM (such as IP, IPoE, PPP, and PPPoE).

Wired LAN(IEEE 802.3) vs Wireless LAN(IEEE 802.11)

Wired LAN: IEEE 802.3 Standards

IEEE 802.3 is a collection of standards that define the physical and data link layers for wired Ethernet networks. This includes specifications for media access control (MAC) and various physical media types, primarily using copper and fiber optic cables. The standard was developed by the Institute of Electrical and Electronics Engineers (IEEE) to facilitate packet-based communication in local area networks (LANs) 

Key Variants of IEEE 802.3
  • 10BASE-T: 10 Mbps using twisted-pair cabling, up to 100 meters.
  • 100BASE-TX (Fast Ethernet): 100 Mbps, also using twisted-pair cabling, with a maximum length of 100 meters.
  • 1000BASE-T (Gigabit Ethernet): 1 Gbps over twisted-pair cabling, up to 100 meters.
  • 10GBASE-T: 10 Gbps connections over twisted-pair cables, supporting lengths up to 100 meters 
These standards have evolved to support higher data rates and different types of cabling, reflecting advancements in technology and increasing demands for bandwidth.

Wireless LAN: IEEE 802.11 Standards

The IEEE 802.11 standards define wireless local area network (WLAN) technologies. These standards specify the protocols for over-the-air communication between wireless clients and access points, ensuring compatibility and interoperability among devices 
Key Variants of IEEE 802.11

  • 802.11b: Operates at up to 11 Mbps in the 2.4 GHz band using Direct Sequence Spread Spectrum (DSSS).
  • 802.11g: Offers speeds up to 54 Mbps in the same frequency band as 802.11b, using Orthogonal Frequency-Division Multiplexing (OFDM).

  • 802.11n: Supports multiple input multiple output (MIMO) technology, achieving speeds exceeding 600 Mbps
Each variant enhances performance, range, and security features compared to its predecessors

Tuesday 15 October 2024

OSPF Using CPT

OSPF (Open Shortest Path First) is a common networking protocol used for routing within an autonomous system and is widely used due to its speed and scalability.

Topology Setup:
Let’s assume you have a basic topology with 3 routers connected to each other:
Router1
Router2
Router3
Each router will have an interface connected to its neighbor. 
The process involves:
  1. Assigning IP addresses to interfaces.
  2. Enabling OSPF and assigning networks to OSPF areas.

Step-by-Step Instructions
1. Setup the Topology
Drag and drop 3 routers onto the Packet Tracer workspace. Use appropriate cables to connect the routers (choose cross-over for routers if needed).Add PCs if you want to test connectivity, but this is optional for basic OSPF setup.

2. Enable OSPF on Each Router
After configuring the IP addresses, you will now enable OSPF on each router and assign the networks to an OSPF area.

Router1 OSPF Configuration:
Router# en
Router# configure terminal
Router(config)# router ospf 1
Router(config-router)# network 10.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 20.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 30.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 40.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 50.0.0.0. 0.255.255.255 area 0
Router(config-router)# exit




Router2 OSPF Configuration:
Router# en
Router# configure terminal
Router(config)# router ospf 1
Router(config-router)# network 10.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 20.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 30.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 40.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 50.0.0.0. 0.255.255.255 area 0
Router(config-router)# exit


Router3 OSPF Configuration:
Router# en
Router# configure terminal
Router(config)# router ospf 1
Router(config-router)# network 10.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 20.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 30.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 40.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 50.0.0.0. 0.255.255.255 area 0
Router(config-router)# exit


4. Verify OSPF Configuration
To verify routing table entries:
Router# show ip route


To verify OSPF neighbors:
Router# show ip ospf neighbor


This should show you routes learned through OSPF, marked with an "O" for OSPF.

5. Test Connectivity
You can now use Ping from one router to another to check the connectivity through the OSPF network.
Router# ping 192.168.3.1
If OSPF is correctly configured, you should be able to ping between routers across different networks.


Notes:
OSPF works by building a link-state database and uses the Dijkstra algorithm to calculate the shortest path. This is why it quickly adapts to network changes.
You should ensure that all routers are in the same OSPF area (e.g., area 0), which is referred to as the backbone area.

Wildcard Mask Basics:
A wildcard mask is used in OSPF (Open Shortest Path First) and other routing protocols (like EIGRP) to define which bits of an IP address should be matched and which bits can vary. It’s essentially the inverse of a subnet mask.

A subnet mask uses binary 1s to represent network bits and 0s for host bits.
A wildcard mask is the opposite: it uses binary 0s to indicate which bits must match and 1s to indicate which bits can vary.

Key Concepts:
0 in the wildcard mask means "must match" (fixed bit).
1 in the wildcard mask means "can be anything" (wild bit).
Example: Wildcard Mask Calculation
For example, consider the subnet mask 255.255.255.0 (a /24 subnet):

Subnet Mask (Binary) Wildcard Mask (Binary)
11111111.11111111.11111111.00000000 00000000.00000000.00000000.11111111
The wildcard mask corresponding to 255.255.255.0 would be: 0.0.0.255

This wildcard mask tells the router that:
The first three octets must match exactly (because of the 0s),
The last octet can vary (because of the 255, which is all 1s).
Wildcard Mask Usage in OSPF
When configuring OSPF, you use the wildcard mask in the network command to specify which parts of the IP address should be considered for matching within OSPF areas.

Example in OSPF Configuration:
If you want to configure OSPF on the 192.168.1.0/24 network, you would use:
Router(config-router)# network 192.168.1.0 0.0.0.255 area 0
This command tells OSPF:

Match the first three octets (i.e., 192.168.1),
Allow any host address in the last octet (due to the 0.0.0.255 wildcard).
Another Example:
For the 10.10.0.0/16 network (subnet mask 255.255.0.0), the corresponding wildcard mask would be 0.0.255.255, meaning:
Router(config-router)# network 10.10.0.0 0.0.255.255 area 0
This command allows any host address in the last two octets (10.10.x.x), but the first two octets must match 10.10.

Summary of Common Subnet Masks and Corresponding Wildcard Masks:
Subnet Mask     Wildcard Mask
255.255.255.0     0.0.0.255
255.255.0.0     0.0.255.255
255.0.0.0             0.255.255.255
255.255.255.128   0.0.0.127
255.255.255.192   0.0.0.63
Formula to Calculate Wildcard Mask:
You can calculate the wildcard mask manually by subtracting each octet of the subnet mask from 255:
Wildcard Mask = 255.255.255.255 - Subnet Mask
For example:
Subnet Mask: 255.255.255.0
Wildcard Mask: 255.255.255.255 - 255.255.255.0 = 0.0.0.255

Saturday 28 September 2024

Channelization Protocol

It is a channelization protocol that allows the total usable bandwidth in a shared channel to be shared across multiple stations based on their time, distance and codes. It can access all the stations at the same time to send the data frames to the channel.Following are the various methods to access the channel based on their time, distance and codes:

FDMA (Frequency Division Multiple Access)
TDMA (Time Division Multiple Access)
CDMA (Code Division Multiple Access)

Frequency Division Multiple Access (FDMA): FDMA is a type of channelization protocol. This bandwidth is divided into various frequency bands. Each station is allocated a band to send data and that band is reserved for the particular station for all the time which is as follows.

The frequency bands of different stations are separated by small bands of unused frequency and unused frequency bands are called as guard bands that prevent the interference of stations. 

It is like the access method in the data link layer in which the data link layer at each station tells its physical layer to make a bandpass signal from the data passed to it. The signal is created in the allocated band and there is no physical multiplexer at the physical layer. 
Time Division Multiple Access (TDMA) : TDMA is the channelization protocol in which bandwidth of channel is divided into various stations on the time basis. There is a time slot given to each station, the station can transmit data during that time slot only which is as follows.

Each station must aware of its beginning of time slot and the location of the time slot. 

TDMA requires synchronization between different stations. 

It is type of access method in the data link layer. At each station data link layer tells the station to use the allocated time slot. 

Code Division Multiple Access (CDMA) : In CDMA, all the stations can transmit data simultaneously. It allows each station to transmit data over the entire frequency all the time. Multiple simultaneous transmissions are separated by unique code sequence. Each user is assigned with a unique code sequence.

In the below figure, there are 4 stations marked as 1, 2, 3 and 4. Data assigned with respective stations as d1, d2, d3 and d4 and the code assigned with respective stations as c1, c2, c3 and c4. 

Special property of the assigned code in CDMA is :
1.Multiply each code by another we get 0
2.Multiply each code by itself we get 4

For Example: Suppose station 2 wants to receive the data from station 1 then the data = (d1.c1+d2.c2 + d3.c3 +d4.c4) . c1
             = d1.c1.c1+d2.c2.c1 + d3.c3.c1 +d4.c4.c1
             = d1.4+d2.0 + d3.0 +d4.0
             = d1.4
therefore the data = d1.4/total no of station
                           = d1.4/4
                           = d1

Chip Sequence: CDMA is based on coding theory, sequence of numbers is called as code and they are called as chips, so they are called chip sequence
c1 = [ +1+1+1 +1 ]
c2 = [ +1 -1 +1 -1 ]
c3 = [ +1 +1 -1 -1 ]
c4 = [ +1 -1 -1 +1 ]

Properties of Chip Sequence:
1. Each sequence is made up of N elements, where N is Number of station

2.Multiply a sequence by a number i.e 2 . c3
     2 . [ +1 +1 -1 -1 ]
     [ +2 +2 -2 -2 ]

3.Multiply two equal sequences i.e c3 .c3
     [ +1 +1 -1 -1 ] . [ +1 +1 -1 -1 ]
     [ +1 +1 +1 +1 ]
     [  4 ]

4.Multiply two different sequences i.e c3 .c1
     [ +1 +1 -1 -1 ] . [ +1 +1 +1 +1 ]
     [ +1 +1 -1 -1 ]
     [  0 ]
5.Adding two sequences i.e c3 + c1
     [ +1 +1 -1 -1 ] + [ +1 +1 +1 +1 ]
     [ +2 +2  0  0 ]
   
Data Representation in CDMA:
Data bit 0 -> -1
Data bit 1 -> +1
Data bit Silent -> 0

consider the data bit across station 1 is 0 = -1
i.e  d1 . c1
     -1 . [ +1+1+1+1]
    -1 -1 -1 -1 

consider the data bit across station 2 is 0 = -1
i.e  d2 . c2
     -1 . [ +1 -1 +1 -1 ]
    -1 +1 -1 +1 

consider the data bit across station 3 is Silent = 0
i.e  d3 . c3
     0 .  [ +1 +1 -1 -1 ]
    0 0 0 0 

consider the data bit across station 4 is 1 = +1
i.e  d4 . c4
     +1 .  [ +1 -1 -1 +1 ]
    +1 -1 -1 +1


Sum of all four sequences is
[  -1 -1 -1 -1 ] + [ -1 +1 -1 +1 ] + [ 0 0 0 0 ] + [ +1 -1 -1 +1 ]
[ (-1-1+0+1)  (-1+1+0-1)  (-1-1+0-1)  (-1+1+0+1)  ]
[ (-1)  (-1)  (-3)  (+1)  ]

For Example: Suppose if station 3 wants to receive the data from station 2 then the data = (d1.c1+d2.c2 + d3.c3 +d4.c4) . c2
             = [ (-1)  (-1)  (-3)  (+1)  ] . [ +1 -1 +1 -1 ]
             = [ -1+1-3-1  ] 
             = [ -4 ]
therefore the data = -4/4
                           = -1
                           = 0
Hence the bit 0 is received from the station 2 

For Example: Suppose if station 1 wants to receive the data from station 4 then the data = (d1.c1+d2.c2 + d3.c3 +d4.c4) . c4
             = [ (-1)  (-1)  (-3)  (+1)  ] . [ +1 -1 -1 +1 ]
             = [ -1+1+3+1  ] 
             = [ +4 ]
therefore the data = +4/4
                           = +1
                           = 1
Hence the bit 1 is received from the station 4

Controlled Access Protocol

It is a method of reducing data frame collision on a shared channel. In the controlled access method, each station interacts and decides to send a data frame by a particular station approved by all other stations. It means that a single station cannot send the data frames unless all other stations are not approved. It has three types of controlled access: 

  1. Reservation
  2. Polling
  3. Token Passing.
1. Reservation
In the reservation method, a station needs to make a reservation before sending data.

The timeline has two kinds of periods:
Reservation interval of fixed time length
Data transmission period of variable frames.

If there are M stations, the reservation interval is divided into M slots, and each station has one slot.

Suppose if station 1 has a frame to send, it transmits 1 bit during the slot 1. No other station is allowed to transmit during this slot.

In general, i th station may announce that it has a frame to send by inserting a 1 bit into i th slot. After all N slots have been checked, each station knows which stations wish to transmit.

The stations which have reserved their slots transfer their frames in that order.
After data transmission period, next reservation interval begins.

Since everyone agrees on who goes next, there will never be any collisions.

The following figure shows a situation with five stations and a five-slot reservation frame. In the first interval, only stations 1, 3, and 4 have made reservations. In the second interval, only station 1 has made a reservation.
2. Polling
Polling process is similar to the roll-call performed in class. Just like the teacher, a controller sends a message to each node in turn.

In this, one acts as a primary station(controller) and the others are secondary stations. All data exchanges must be made through the controller.

The message sent by the controller contains the address of the node being selected for granting access.

Although all nodes receive the message the addressed one responds to it and sends data if any. If there is no data, usually a “poll reject”(NAK) message is sent back.

Problems include high overhead of the polling messages and high dependence on the reliability of the controller.
3. Token Passing
In token passing scheme, the stations are connected logically to each other in form of ring and access to stations is governed by tokens.

A token is a special bit pattern or a small message, which circulate from one station to the next in some predefined order.

In Token ring, token is passed from one station to another adjacent station in the ring whereas incase of Token bus, each station uses the bus to send the token to the next station in some predefined order.

In both cases, token represents permission to send. If a station has a frame queued for transmission when it receives the token, it can send that frame before it passes the token to the next station. If it has no queued frame, it passes the token simply.

After sending a frame, each station must wait for all N stations (including itself) to send the token to their neighbours and the other N – 1 stations to send a frame, if they have one.

There exists problems like duplication of token or token is lost or insertion of new station, removal of a station, which need be tackled for correct and reliable operation of this scheme.

CSMA (Carrier Sense Multiple Access)

It is a carrier sense multiple access based on media access protocol to sense the traffic on a channel (idle or busy) before transmitting the data. It means that if the channel is idle, the station can send data to the channel. Otherwise, it must wait until the channel becomes idle. Hence, it reduces the chances of a collision on a transmission medium.

CSMA Access Modes
1-Persistent: In the 1-Persistent mode of CSMA that defines each node, first sense the shared channel and if the channel is idle, it immediately sends the data. Else it must wait and keep track of the status of the channel to be idle and broadcast the frame unconditionally as soon as the channel is idle.

Non-Persistent: It is the access mode of CSMA that defines before transmitting the data, each node must sense the channel, and if the channel is inactive, it immediately sends the data. Otherwise, the station must wait for a random time (not continuously), and when the channel is found to be idle, it transmits the frames.

P-Persistent: It is the combination of 1-Persistent and Non-persistent modes. The P-Persistent mode defines that each node senses the channel, and if the channel is inactive, it sends a frame with a P probability. If the data is not transmitted, it waits for a (q = 1-p probability) random time and resumes the frame with the next time slot.
CSMA/ CD
It is a carrier sense multiple access/ collision detection network protocol to transmit data frames. The CSMA/CD protocol works with a medium access control layer. Therefore, it first senses the shared channel before broadcasting the frames, and if the channel is idle, it transmits a frame to check whether the transmission was successful. If the frame is successfully received, the station sends another frame. If any collision is detected in the CSMA/CD, the station sends a jam/ stop signal to the shared channel to terminate data transmission. After that, it waits for a random time before sending a frame to a channel.

Working of CSMA/CD
Step 1: Check if the sender is ready to transmit data packets.

Step 2: Check if the transmission link is idle. 
The sender has to keep on checking if the transmission link/medium is idle. For this, it continuously senses transmissions from other nodes. The sender sends dummy data on the link. If it does not receive any collision signal, this means the link is idle at the moment. If it senses that the carrier is free and there are no collisions, it sends the data. Otherwise, it refrains from sending data.

Step 3: Transmit the data & check for collisions. 
The sender transmits its data on the link. CSMA/CD does not use an ‘acknowledgment’ system. It checks for successful and unsuccessful transmissions through collision signals. During transmission, if a collision signal is received by the node, transmission is stopped. The station then transmits a jam signal onto the link and waits for random time intervals before it resends the frame. After some random time, it again attempts to transfer the data and repeats the above process.

Step 4: If no collision was detected in propagation, the sender completes its frame transmission and resets the counters.

How Does a Station Know if Its Data Collide?  
Consider the above situation. Two stations, A & B. 
Propagation Time: Tp = 1 hr ( Signal takes 1 hr to go from A to B) 

At time t=0, A transmits its data.
        t= 30 mins : Collision occurs.

After the collision occurs, a collision signal is generated and sent to both A & B to inform the stations about the collision. Since the collision happened midway, the collision signal also takes 30 minutes to reach A & B. 

Therefore, t=1 hr: A & B receive collision signals.

This collision signal is received by all the stations on that link. Then, How to Ensure that it is our Station’s Data that Collided? 
For this, Transmission time (Tt) > Propagation Time (Tp) [Rough bound] 
This is because we want that before we transmit the last bit of our data from our station, we should at least be sure that some of the bits have already reached their destination. This ensures that the link is not busy and collisions will not occur. 
But, above is a loose bound. We have not taken the time taken by the collision signal to travel back to us. For this consider the worst-case scenario. Consider the above system again. 
Collision detection in CSMA/CD

At time t=0, A transmits its data.
        t= 59:59 mins : Collision occurs

This collision occurs just before the data reaches B. Now the collision signal takes 59:59 minutes again to reach A. Hence, A receives the collision information approximately after 2 hours, that is, after 2 * Tp.  

Hence, to ensure tighter bound, to detect the collision completely,
  Tt  >= 2 * Tp  
This is the maximum collision time that a system can take to detect if the collision was of its own data. 

Transmission Time = Tt = Length of the packet/ Bandwidth of the link 
[Number of bits transmitted by sender per second] 

Substituting above, we get, 
Length of the packet/ Bandwidth of the link >= 2 * Tp 
Length of the packet >= 2 * Tp * Bandwidth of the link

Efficiency:
CSMA/ CA
It is a carrier sense multiple access/collision avoidance network protocol for carrier transmission of data frames. It is a protocol that works with a medium access control layer. 

CSMA/CA protocol is used in wireless networks because they cannot detect the collision so the only solution is collision avoidance.
CSMA/CA avoids the collisions using three basic technique.
1. Interframe Space
2. Contention window
3. Acknowledgements


1. Interframe Space(IFS)
• Whenever the channel is found idle, the station does not transmit immediately. It waits for a period of time called interframe space(IFS).

• When channel is sensed to be idle, it may be possible that same distant station may have already started transmitting and the signal of that distant station has not yet reached other stations.

• Therefore the purpose of IFS time is to allow this transmitted signal to reach other stations.

• If after this IFS time, the channel is still idle, the station can send, but it still needs to wait a time equal to contention time.

• IFS variable can also be used to define the priority of a station or a frame.

2.Contension window : It is an amount of time divided into slots.
• A station that is ready to send chooses a random number of slots as its wait time.

• The number of slots in the window changes according to the binary exponential back-off strategy. It means that is set of one slot the first time and then double each time the station cannot detect an idle channel after the IFS time.

• This is very similar to the p-persistent method except that a random outcome defines the number of slots taken by the waiting station.

• In contension window the station needs to sense the channel after each item slot.

• If the station finds the channel busy, it does not restart the process. It just stops the timer and restarts it when the channel is sensed as idle. 

3.Acknowledgement :
• Despite all the precautions, collisions may occur and destroy the data.

• The positive acknowledgement and the time-out timer can help guarantee that receiver has received the frame.

Difference between CSMA/CD and CSMA/CA :

  CSMA / CD

CSMA / CA

It is the type of CSMA to detect the collision on a shared channel.

It is the type of CSMA to avoid collision on a shared channel.

It is the collision detection protocol.

It is the collision avoidance protocol.

It is used in 802.3 Ethernet network cable.

It is used in the 802.11 Ethernet network.

It works in wired networks.

It works in wireless networks.

It is effective after collision detection on a network.

It is effective before collision detection on a network.

Whenever a data packet conflicts in a shared channel, it resends the data frame.

Whereas the CSMA CA waits until the channel is busy and does not recover after a collision.

It minimizes the recovery time.

It minimizes the risk of collision.

The efficiency of CSMA CD is high as compared to CSMA.

The efficiency of CSMA CA is similar to CSMA.

It is more popular than the CSMA  CA protocol.

It is less popular than CSMA CD.



Ethernet IEEE 802.3

The basic frame format which is required for all MAC implementation is defined in IEEE 802.3 standard. Ethernet frame starts with the Preamb...