Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Csma ca program in c

03/12/2021 Client: muhammad11 Deadline: 2 Day

ECE 478/578: Fundamentals of Computer Networks

Project # 1. The Distributed Coordination Function (DCF) of 802.11

1 Preliminaries

• Read the project description. When you are finished reading it, read it again.

• You must form a group of two people. If you do not have a partner please post on Piazza (Use the "Search for teammate" post)

• You are free to use a programming language of your choice.

2 Project Description

You are to study the performance of multiple access protocols in a wireless setting. Consider the network shown in Figure 1. The circles denote the communication range R of each station. We are interested in the following two scenarios:

A. Concurrent Communications: Stations A,B,C, and D of Figure 1(a) are within the same collision domain (any transmission is received by all). Communication takes place between pairs A→ B and C → D. Traffic is generated at A and C according to a Poisson arrival process with parameters λA and λC , respectively.

B. Hidden Terminals: Stations A,B, and C of Figure 1(b), belong to two collision domains. Communication takes place between pairs A→ B and C → B. Traffic is generated at A and C according to a Poisson arrival process with parameters λA and λC , respectively.

For each scenario, compute relevant performance metrics for the following multiple access protocols. A time-slotted system is assumed.

1. CSMA with Collision Avoidance (CSMA/CA) according to the 802.11 DCF function.

(a) A station Tx ready to transmit (when a frame has arrived for transmission from the upper layers of the network stack) selects a random backoff value in [0, CW0 − 1]. It first senses the channel for an initial period of DIFS time.

(b) If the channel is busy, Tx (and every other station with a frame for transmission) monitors the channel until it becomes idle. When the channel becomes idle, Tx decrements his counter by one with every idle slot. If the channel becomes busy, Tx freezes its backoff counter. When the counter reaches zero, Tx transmits its frame.

(c) If the frame is successfully received (no collision) by Rx, the station Rx replies with an ACK frame after SIFS time. This completes the transmission round and the protocol repeats for the next transmission. For successive transmissions, the station has to sense for DIFS time before starting the countdown.

(d) If a collision occurs, the stations that collided double their contention window CW and repeat the backoff process. After k collisions, the backoff value is selected from [0, 2kCW0 − 1]. The CW value cannot exceed threshold CWmax.

1

A B

C D

A B C

R

(a) (b)

Figure 1: (a) Topology for parallel transmissions within the same collision domain, (b) topology for parallel transmissions when A and C are hidden terminals.

2. CSMA/CA with virtual carrier sensing enabled: RTS and CTS frames are exchanged before the transmission of a frame. If RTS transmissions collide, stations invoke the exponential backoff mechanism outlined in 1(c). Otherwise, stations that overhear an RTS/CTS message defer from transmission for the time indicated in the NAV vector.

3 Simulation parameters

Parameter Value Parameter Value

Data frame size 1,500 bytes ACK, RTS, CTS size 30 bytes Slot duration 20 µs DIFS duration 40 µs SIFS duration 10 µs Transmission rate 6 Mbps

CW0 4 slots CWmax 1024 slots λA, λC {50, 100, 200, 300} frames/sec Simulation time 10 sec

4 Performance Metrics

Evaluate the protocol performance with respect to the following metrics:

Throughput T : The individual station’s throughput as a function of λ. Collisions N : The number of collisions (data and RTS/CTS) as a function of λ. Fairness Index FI: The fraction of time that the channel is occupied by pair A→ B over the fraction

of time that the channel is occupied by pair C → D as a function of λ. Your experiments must be repeated for two different scenarios: (a) λA = λC = λ and (b) λA =

2λ, λC = λ. Assume no losses due to the imperfections of the wireless medium.

5 Project Report

Include with your report:

• A brief introduction describing the project. In this section, include the responsibilities of each team member with references to which parts/steps he/she completed.

2

• A description on how you developed your simulations.

• Graphs for each of the simulated scenarios.

1. Throughput T

(a) Node A: Throughput T (Kbps) vs. rate λ (frames/sec) for scenarios A and B, and CSMA implementations 1 and 2 (four lines in total).

(b) Node C: Throughput T (Kbps) vs. rate λ (frames/sec) for scenarios A and B, and CSMA implementations 1 and 2 (four lines in total).

(c) Node A: Throughput T (Kbps) vs. rate λ (frames/sec) for scenarios A and B, and CSMA implementations 1 and 2, when λA = 2λC (four lines in total).

(d) Node C: Throughput T (Kbps) vs. rate λ (frames/sec) for scenarios A and B, and CSMA implementations 1 and 2, when λA = 2λC (four lines in total).

2. Collisions N

(a) Node A: Number of collisions N vs. rate λ (frames/sec) for scenarios A and B, and CSMA implementations 1 and 2 (four lines in total).

(b) Node C: Number of collisions N vs. rate λ (frames/sec) for scenarios A and B, and CSMA implementations 1 and 2 (four lines in total).

(c) Node A: Number of collisions N vs. rate λ (frames/sec) for scenarios A and B, and CSMA implementations 1 and 2, when λA = 2λC (four lines in total).

(d) Node C: Number of collisions N vs. rate λ (frames/sec) for scenarios A and B, and CSMA implementations 1 and 2, when λA = 2λC (four lines in total).

3. Fairness Index FI

(a) Fairness Index FI vs. rate λ (frames/sec) for scenarios A and B, and CSMA implemen- tations 1 and 2 (four lines in total).

(b) Fairness Index FI vs. rate λ (frames/sec) for scenarios A and B, and CSMA implemen- tations 1 and 2, when λA = 2λC (four lines in total).

• Justification for the results shown in your graphs.

Appendix

Generating Poisson-distributed traffic: To generate Poisson-distributed traffic, it is sufficient to generate a series of exponentially-distributed inter-arrival times. Such times can be generated using the inverse CDF transformation method.

Step 1: Generate a series of uniformly distributed numbers U = {u1, u2, . . . , un} with ui ∈ (0, 1), ∀i. Step 2: Compute series X = {x1, x2, . . . , xn} of exponentially distributed numbers with λ, as

X = − 1 λ

ln(1− U) (1)

Using X, you can determine the time of each frame arrival at each station. For instance, frame 1 arrives at time x1, frame 2 arrives at time x1 + x2, etc. The inter-arrival time generation process has to be repeated for each transmitting station.

Plotting tips:

3

1. Label your axes and use appropriate units

2. Make sure the scales on both axes are appropriate. If you are to use the same variable on multiple plots (e.g. throughput) use the same scale on all plots so they can be compared

3. Do not superimpose more than 4-5 plot lines on the same plot.

4. If more than one plot lines are present in the same plot make sure to individually label each one

5. For individual plot lines use different marker shapes so they can be distinguishable.

6. Keep in mind that colors do not show on a black and white printout. So if you color code your lines, use some other discernible labeling such as dashed lines to differentiate between plot lines.

MATLAB code for generating good figures

close all; % closes all open figure windows

set(0,’defaulttextinterpreter’,’latex’); % allows you to use latex math set(0,’defaultlinelinewidth’,2); % line width is set to 2 set(0,’DefaultLineMarkerSize’,10); % marker size is set to 10 set(0,’DefaultTextFontSize’, 16); % Font size is set to 16 set(0,’DefaultAxesFontSize’,16); % font size for the axes is set to 16

figure(1) plot(X, Y1, ’-bo’, X, Y2, ’–rs’, X); % plotting three curves Y1, Y2 for the same X grid on; % grid lines on the plot legend(’CSMA’, ’CSMA w. virtual Sensing’); ylabel(’$T$ (Kbps)’); xlabel(’$λ$’ (frames/sec));

4

Student Name:

GRADE CSMA/CA

1 Throughput /8 2 Number of Collisions /8 3 Fairness Index /6

Virtual Carrier Sensing 4 Throughput /8 5 Number of Collisions /8 6 Fairness Index /6

CSMA/CA 7 Throughput /8 8 Number of Collisions /8 9 Fairness Index /6

Virtual Carrier Sensing 10 Throughput /8 11 Number of Collisions /8 12 Fairness Index /6

Presentation /12 /100

Implementation of CSMA

Total

Implementation of virtual carrier sensing

Grading rubric Scenario A - One Collision Domain Topology

Implementation of CSMA

Scenario B - Hidden Terminal Topology

Implementation of virtual carrier sensing

project1_2012hwrk1

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Online Assignment Help
Study Master
Custom Coursework Service
Top Class Engineers
Top Class Results
Financial Assignments
Writer Writer Name Offer Chat
Online Assignment Help

ONLINE

Online Assignment Help

This project is my strength and I can fulfill your requirements properly within your given deadline. I always give plagiarism-free work to my clients at very competitive prices.

$20 Chat With Writer
Study Master

ONLINE

Study Master

I reckon that I can perfectly carry this project for you! I am a research writer and have been writing academic papers, business reports, plans, literature review, reports and others for the past 1 decade.

$38 Chat With Writer
Custom Coursework Service

ONLINE

Custom Coursework Service

I have read your project description carefully and you will get plagiarism free writing according to your requirements. Thank You

$43 Chat With Writer
Top Class Engineers

ONLINE

Top Class Engineers

As per my knowledge I can assist you in writing a perfect Planning, Marketing Research, Business Pitches, Business Proposals, Business Feasibility Reports and Content within your given deadline and budget.

$34 Chat With Writer
Top Class Results

ONLINE

Top Class Results

I have read your project description carefully and you will get plagiarism free writing according to your requirements. Thank You

$28 Chat With Writer
Financial Assignments

ONLINE

Financial Assignments

I am an elite class writer with more than 6 years of experience as an academic writer. I will provide you the 100 percent original and plagiarism-free content.

$47 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

They say i say 4th edition chapter 4 summary - Bordin bros hatton vale - Budgerigar council of tasmania - Linear and nonlinear graphs - Bibliographys - Central highlands library daylesford - The american dream still exists - Books are better than tv - 1234567891011 find the mistake if you are genius answer - Ethics business relationships and leadership Reflection Paper - The importance of continuing education for nurses - Journal of coastal life medicine - Case study on death and dying grand canyon university - Surface water and groundwater worksheet answers - Traffic simulation java source code - How are accounting policies defined in the literature - State patrol ticket processing system - Writing Prompt - Safe harbor nursing examples - Kuta software infinite pre algebra one step equations with fractions - Business law essay questions and answers - The ones who walk away from omelas analysis sparknotes - Eric foner give me liberty volume 2 - Wisdom sits in places chapter 4 summary - Scion hero character sheet - Developing Your Design Solution - How do welty's descriptions of phoenix's - Psychopathology - Evs worksheet for class 2 kendriya vidyalaya - Origins of the modern world 4th edition pdf - Strengths and weaknesses of professional bodies - 100 word positive response due 9/3/20 at 10pm three defenses - Allegory of the cave paper - Is albr3 polar or nonpolar - A temporary matter questions - Models of urban structure - How to solve for frequency factor - Diorama of a hurricane - Need help with 4 case work sessions - Write an algorithm to brush your teeth - How does francium react with water - Accountant - Icd 10 code for gallstone pancreatitis - Case 18 ford motor company new strategies for international growth - Unit 4 Leading Change Management - Catch 22 plot summary - Acc 202 milestone 1 workbook - 3mm ir led datasheet - Food intake 3 days paper - Diabetic - Scotland pa watch online - Older Adults Patient Education Issues Essay and Interview - Infinite geometry special right triangles - Games strategies and decision making pdf - Conran medical centre moston - I need help with managerial Finance assignment. - Who is responsible for establishing a private company's internal control - Alan flusser net worth - What is a rms customer numberwhat is a rmwhat is a rms customer numbers customer number - Calcium carbonate plus sulfuric acid - How did you select the metrics for the value curve - Negatively accelerating learning curve - In the cemetery where al jolson is buried sparknotes - Bosch plena call station - Glenshee ski centre lift pass - Financial research project - 4 essays ×2 1200 ×2 1000 words - Benefit cosmetics swot analysis - Lock5stat - Budget assignment for students - Avery vinyl colour chart - Amoeba sisters video recap asexual and sexual reproduction - Chapter 13 leverage and capital structure solutions - Pho minh long tracy ca menu - Aristotle nicomachean ethics cliff notes - Interacting group decision making - African american literature syllabus - Scs 100 theme 2: marriage graphic organizer - Space exploration through the social science lens - Why are budgets useful in the planning process - Medical image analysis question - Order 2392850: School Vision 12 slides PowerPoint Presentation - Highwire stanford edu search - As vesta was descending texture - Mary leapor an essay on woman - Effective Facilitators Paper or Presentation - Cssa trial papers 2021 - Southwest airlines human resources strategy - Diels alder reaction experiment - Magnetic field of a solenoid lab answers - Legislation regarding hrm practices has been passed mainly to - Calculate the inductance of a solenoid containing - Australian standard as3740 2010 waterproofing of domestic wet areas - Math homework - Robert frost home burial meaning - Spidering password attack - P6#2 - High scope conflict resolution poster - Police code 59 gun - Mozzaz corporation india pvt ltd