計(jì)網(wǎng)實(shí)驗(yàn)data-link-layer-simulation_第1頁(yè)
計(jì)網(wǎng)實(shí)驗(yàn)data-link-layer-simulation_第2頁(yè)
計(jì)網(wǎng)實(shí)驗(yàn)data-link-layer-simulation_第3頁(yè)
免費(fèi)預(yù)覽已結(jié)束,剩余1頁(yè)可下載查看

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、計(jì)算機(jī)通信與網(wǎng)絡(luò)實(shí)驗(yàn)? 課程實(shí)驗(yàn)報(bào)告實(shí)驗(yàn)二 :2.data link layer simulation實(shí)驗(yàn)名稱(chēng):2.data link layer simulation1.實(shí)驗(yàn)容1.Draw Figure7.12 and 7.13.2.Simulation on Performance of Data Link Control ProtocolsUsing the same assumptions that are used for Figure 7.13 in Appendix 7A, plot line utilization as a function of P, the probabi

2、lity that a single frame is in error for the following error-control techniques:a. Stop-and-waitb. Go-back-N with w=7c. Go-back-N with w=127d. Selective reject with w=7e. Selective reject with w=127Do all of the preceding for the following values of a: 0.1,1, 10, 100. Draw con clusi ons about which

3、tech nique is appropriate for various ran ges of.2.實(shí)驗(yàn)結(jié)果J M4DD4D0>13*IO1'ttpHJJA=0.1&-S-5A=1MS.fl3 5A=10a=0.1時(shí),W=7或者127都是大于2a+1;a=1時(shí),W=7或者127都是大于2a+1;a=10時(shí),那么選擇拒絕和返回N都是一個(gè)分段函數(shù)a=100時(shí),那么選擇拒絕和返回N都是一個(gè)分段函數(shù)。3實(shí)驗(yàn)程序Figure7.12a = 0:0.1:1000;W = 1,7,127;for j = 1:3for i = 1:le ngth(a) if W(j) >= 2*

4、a(i)+1 U(i) = 1;elseU(i) = W(j)/(2*a(i)+1); endend if j = 1W1 = U;endif j = 2W7 = U;endif j = 3W10 = U;endend plot(a,W1); hold on;plot(a,W7); plot(a,W10); set(gca,'xscale','log'); axis(0.1 1000 0 1);Figure7.13a = 0:0.1:1000;W = 1,7,127,127;P=10A(-3);for j = 1:4 for i = 1:length(a)if

5、W(j) =1U(i) = (1-P)/(1+2*a(i);endif W(j)=7 if W(2) >= 2*a(i)+1 U(i) = 1-P; elseU(i) = W(j)*(1-P)/(2*a(i)+1);endendif W(j)=127 if W(j) >= 2*a(i)+1U(i) = (1-P)/(1+2*a(i)*P); Y(i) = 1-P;elseU(i) = W(j)*(1-P)/(2*a(i)+1)*(1-P+W(j)*P); Y(i) = W(j)*(1-P)/(2*a(i)+1);endendif j = 1W1 = U;endif j = 2W7

6、= U;endif j = 3W10 = U;endif j = 4 W = Y;endend end plot(a,W1); hold on; plot(a,W7); plot(a,W10); plot(a,W); set(gca,'xscale','log'); axis(0.1 1000 0 1);2、 Drawfunction U=stopandwait(a,P)U=(1-P)./(1+2*a);endfunction U=selective_reject(a,W,P) U=(1-P).*(W>=2*a+1)+W.*(1-P)./(2.*a+1).

7、*(W<2*a+1);endfunction U=gobackn(a,W,P)U=(1-P)./(1+2.*a.*P).*(W>=2*a+1)+W.*(1-P)./(2.*a+1)./(1-P+W.*P).*(W<2*a+1); endfunction lab2_draw(a)P=0:0.1:1000;U=stopandwait(a,P);semilogx(P,U,'r');hold onU=selective_reject(a,7,P);semilogx(P,U,'g');hold onU=gobackn(a,7,P);semilogx(P,U,'b');hold on U=selective_reject(a,127,P); semilogx(P,U,'k'); hold on U=gobackn(a,127,P); semilogx(P,U,'y'); ylabel('Utilization') ; xlabel('P');legend('Stop-and-wait','Go-back-N with

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論