计算机与通信网络实验报告
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
计算机与通信网络实验报告
041220111 戴妍
实验一隐终端和暴露终端问题分析
一、实验设定:
基本参数配置:仿真时长100s;随机数种子1;仿真区域2000x2000;节点数4。
节点位置配置:本实验用[1] 、[2]、 [3] 、[4]共两对节点验证隐终端问题。节点[1]、[2]距离为200m,节点[3]、[4]距离为200m,节点[2]、[3]距离为370m。
业务流配置:业务类型为恒定比特流CBR。[1]给[2]发,发包间隔为0.01s,发包大小为512bytes;
[3]给[4]发,发包间隔为0.01s,发包大小为512bytes。
二、实验结果:
Node: 1, Layer: AppCbrClient, (0) Server address: 2
Node: 1, Layer: AppCbrClient, (0) First packet sent at [s]: 0.000000000
Node: 1, Layer: AppCbrClient, (0) Last packet sent at [s]: 99.990000000
Node: 1, Layer: AppCbrClient, (0) Session status: Not closed
Node: 1, Layer: AppCbrClient, (0) Total number of bytes sent: 5120000
Node: 1, Layer: AppCbrClient, (0) Total number of packets sent: 10000
Node: 1, Layer: AppCbrClient, (0) Throughput (bits per second): 409600
Node: 2, Layer: AppCbrServer, (0) Client address: 1
Node: 2, Layer: AppCbrServer, (0) First packet received at [s]: 0.007438001
Node: 2, Layer: AppCbrServer, (0) Last packet received at [s]: 99.999922073
Node: 2, Layer: AppCbrServer, (0) Average end-to-end delay [s]: 0.739902205
Node: 2, Layer: AppCbrServer, (0) Session status: Not closed
Node: 2, Layer: AppCbrServer, (0) Total number of bytes received: 4975616
Node: 2, Layer: AppCbrServer, (0) Total number of packets received: 9718
Node: 2, Layer: AppCbrServer, (0) Throughput (bits per second): 398078
Node: 3, Layer: AppCbrClient, (0) Server address: 4
Node: 3, Layer: AppCbrClient, (0) First packet sent at [s]: 0.000000000
Node: 3, Layer: AppCbrClient, (0) Last packet sent at [s]: 99.990000000
Node: 3, Layer: AppCbrClient, (0) Session status: Not closed
Node: 3, Layer: AppCbrClient, (0) Total number of bytes sent: 5120000
Node: 3, Layer: AppCbrClient, (0) Total number of packets sent: 10000
Node: 3, Layer: AppCbrClient, (0) Throughput (bits per second): 409600
Node: 4, Layer: AppCbrServer, (0) Client address: 3
Node: 4, Layer: AppCbrServer, (0) First packet received at [s]: 0.003058001
Node: 4, Layer: AppCbrServer, (0) Last packet received at [s]: 99.993058001
Node: 4, Layer: AppCbrServer, (0) Average end-to-end delay [s]: 0.003119031
Node: 4, Layer: AppCbrServer, (0) Session status: Not closed
Node: 4, Layer: AppCbrServer, (0) Total number of bytes received: 5120000
Node: 4, Layer: AppCbrServer, (0) Total number of packets received: 10000
Node: 4, Layer: AppCbrServer, (0) Throughput (bits per second): 409612
通过仿真结果可以看出,节点[2]无法收到数据。由于节点[3]是节点[1]的一个隐终端,节点[1]无法通过物理载波检测侦听到节点[3]的发送,且节点[3]在节点[2]的传输范围外,节点[3]无法通过虚拟载波检测延迟发送,所以在节点[1]传输数据的过程中,节点[3]完成退避发送时将引起冲突。
三、课后思考
1、RTS/CTS能完全解决隐终端问题吗?如果不能,请说明理由。
答:能。对于隐发送终端问题,[2]和[3]使用控制报文进行握手(RTS-CTS),听到回应握手信号的[3]知道自己是隐终端,便能延迟发送;对于隐接受终端问题,在多信道的情况下,[3]给[4]回送CTS告诉[4]它是隐终端,现在不能发送报文,以避免[4]收不到[3]的应答而超时重发浪费带宽。
2、如何设计仿真场景来验证暴露终端问题?
答:只需更改业务流配置:业务类型为恒定比特流CBR。[2]给[1]发,发包间隔为0.01s,发