實驗三 媒體存取協定模擬 教師: 助教: 1998/10/19 High Speed Network Lab. Department of Computer Information Science, NCTU
Outline Background Why simulation ? MAC Protocols Throughput v.s. Offered load Investigated topics Experiment steps Experiment records
Classification of MAC protocols Note : Some systems use a combination of above schemes.
ALOHA Transmit whenever it wants Listen to know if it’s a success or collision Wait a random time to retx, if collided Vulnerable period : 2 frame times S (throughput) = G P 0 = G e -2G S max = 0.5 e -1 = 18.4 % (G = 0.5) Slotted ALOHA S = G e -G S max =1 e -1 =36.8 % (G =1)
CSMA/CD channel busy ready 1-persistent: tx when channel goes idle if collision, backoff exponentially p-persistent: tx when channel goes idle with prob. p otherwise, delay one slot and repeat constant or random delaynon-persistent : tx if idle otherwise, delay and try again
Approximate Analysis of CSMA/CD Assume infinite population (i.e. very large number of stations) and Poisson arrival with rate G arrivals/slot S = G e -G S max = 1 e -1 = 1/e (i.e. one success every e slots) max (throughput) = = where = end-to-end propagation delay b = packet length B= bandwidth Note : Efficiency drops as B L increases. succ 22 p
Simulation Principle Mathematics Model v.s. Simulation Model Preciseness v.s. Cost CACI COMNET III
Summary of MAC protocols ALOHA –No listen CSMA –Persistent CSMA (wait it to be idle and Tx) –Non-persistent CSMA (randomly see the channel) –P-persistent CSMA (slotted randomly see with Tx prob. p) CSMA/CD –Collision Detection –Binary exponential backoff
Two Definitions
Throughput vs. Offered-load 1/4 1/3 1/ Offered load Throughput ALOHA Slotted ALOHA
Investigated Topics Offered-load v.s. throughput throughput & delay comparison –ALOHA –CSMA –CSMA/CD same offered-load –(throughput) v.s. (# of node) (bandwidth) v.s. (max throughput)
Experiment Steps Build network topology Set traffic parameters Set link parameters Choose report format Initialize simulator and run
Step 1: Building the Topology
Step 2: Setting Traffic Parameters
Step 3: Setting Link Parameters
Example: Link Parameters
Step 4: Choose Report Format
CACI COMNET III RELEASE 1.1r Thu Oct 29 20:04: PAGE 1 test11 LINK DELAYS AND UTILIZATION REPLICATION 1 FROM 0.0 TO 60.0 SECONDS FRAMES TRANSMISSION DELAY (MS) % LINK DELIVERED RESENT AVERAGE STD DEV MAXIMUM UTIL _____________________ _________ ______ _________ _________ _________ _____ Link CACI COMNET III RELEASE 1.1r Thu Oct 29 20:04: PAGE 2
Experiment Records Throughput and Delay : CSMA/CD, CSMA, and ALOHA under 1, 1/2, 1/3, and 1/4 offered-load Throughput : different # Nodes under the same offered-load Max throughput : different bandwidth (high- bandwidth v.s. low-bandwidth)