当前位置: 首页 > news >正文

个人网站申请做瞹瞹嗳视频网站在线观看

个人网站申请,做瞹瞹嗳视频网站在线观看,电子商务网站建设与管理实训总结,企业管理培训课程有哪些内容下面来学习更加复杂一点的TCL脚本的编写 简述#xff1a;建立有4个节点的拓扑#xff0c;其中一个节点作为路由器#xff0c;用来将两个节点发出的数据包转发到第四个节点上面。 在这里将解释将两个节点的数据流区分开来的方法#xff0c;展示如何去检测一个队列是否是满…下面来学习更加复杂一点的TCL脚本的编写 简述建立有4个节点的拓扑其中一个节点作为路由器用来将两个节点发出的数据包转发到第四个节点上面。 在这里将解释将两个节点的数据流区分开来的方法展示如何去检测一个队列是否是满的以及一个数据包是如何被丢弃的。 1、建立拓扑 Tcl脚本大多是大同的我们需要做的是在基础上进行自己需要的修改。基础代码如下 #Create a simulator object set ns [new Simulator]#Open the nam trace file set nf [open out.nam w] $ns namtrace-all $nf#Define a finish procedure proc finish {} {global ns nf$ns flush-trace #Close the trace fileclose $nf #Execute nam on the trace fileexec nam out.nam exit 0 } # Insert your own code for topology creation # and agent definitions, etc. here#Call the finish procedure after 5 seconds simulation time $ns at 5.0 finish#Run the simulation $ns run做出修改如下 ① 添加四个节点 set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node]② 添加链接 $ns duplex-link $n0 $n2 1Mb 10ms DropTail $ns duplex-link $n1 $n2 1Mb 10ms DropTail $ns duplex-link $n3 $n2 1Mb 10ms DropTail其实上面这样就可以了但是为了让它更加美观在跑nam的时候不要太懵逼我们需要变一下链接的位置使用的语句如下$ns duplex-link-op $n0 $n2 orient right-down $ns duplex-link-op $n1 $n2 orient right-up $ns duplex-link-op $n2 $n3 orient right 在改变的时候我们可以使用right, left, up, down以及这些单词的结合结合方式某-某 2、添加事件 ① 设置代理——建立起两个CBR代理和一个NULL代理。CBR代理给n0和n1n0、n1用于发送数据n3用于接收数据。 #Create a UDP agent and attach it to node n0 set udp0 [new Agent/UDP] $ns attach-agent $n0 $udp0# Create a CBR traffic source and attach it to udp0 set cbr0 [new Application/Traffic/CBR] $cbr0 set packetSize_ 500 $cbr0 set interval_ 0.005 $cbr0 attach-agent $udp0#Create a UDP agent and attach it to node n1 set udp1 [new Agent/UDP] $ns attach-agent $n1 $udp1# Create a CBR traffic source and attach it to udp1 set cbr1 [new Application/Traffic/CBR] $cbr1 set packetSize_ 500 $cbr1 set interval_ 0.005 $cbr1 attach-agent $udp1set null0 [new Agent/Null] $ns attach-agent $n3 $null0 ② CBR代理和NULL代理进行连接 $ns connect $udp0 $null0 $ns connect $udp1 $null0③ 设置数据流开始的时间和结束的时间 $ns at 0.5 $cbr0 start $ns at 1.0 $cbr1 start $ns at 4.0 $cbr1 stop $ns at 4.5 $cbr0 stop3、区别流 因为有俩发送端为了区别数据流的情况我们来给他们加点颜色 $udp0 set class_ 1 $udp1 set class_ 2 $ns color 1 Blue $ns color 2 Red然后这样就udp0发出的数据流变蓝色另外一个变红色。 4、查看链接的队列 添加下面的语句来监视链接的情况 $ns duplex-link-op $n2 $n3 queuePos 0.5为了得到相对公平的情况我们可以更换使用队列 $ns duplex-link $n3 $n2 1Mb 10ms SFQ SQF随机公平排队这样最后得到的是相对公平的结果 本节完完整代码如下 #Create a simulator object set ns [new Simulator]#Define different colors for data flows $ns color 1 Blue $ns color 2 Red#Open the nam trace file set nf [open out.nam w] $ns namtrace-all $nf#Define a finish procedure proc finish {} {global ns nf$ns flush-trace #Close the trace fileclose $nf #Execute nam on the trace fileexec nam out.nam exit 0 }#Create four nodes set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node]#Create links between the nodes $ns duplex-link $n0 $n2 1Mb 10ms DropTail $ns duplex-link $n1 $n2 1Mb 10ms DropTail $ns duplex-link $n3 $n2 1Mb 10ms SFQ$ns duplex-link-op $n0 $n2 orient right-down $ns duplex-link-op $n1 $n2 orient right-up $ns duplex-link-op $n2 $n3 orient right#Monitor the queue for the link between node 2 and node 3 $ns duplex-link-op $n2 $n3 queuePos 0.5#Create a UDP agent and attach it to node n0 set udp0 [new Agent/UDP] $udp0 set class_ 1 $ns attach-agent $n0 $udp0# Create a CBR traffic source and attach it to udp0 set cbr0 [new Application/Traffic/CBR] $cbr0 set packetSize_ 500 $cbr0 set interval_ 0.005 $cbr0 attach-agent $udp0#Create a UDP agent and attach it to node n1 set udp1 [new Agent/UDP] $udp1 set class_ 2 $ns attach-agent $n1 $udp1# Create a CBR traffic source and attach it to udp1 set cbr1 [new Application/Traffic/CBR] $cbr1 set packetSize_ 500 $cbr1 set interval_ 0.005 $cbr1 attach-agent $udp1#Create a Null agent (a traffic sink) and attach it to node n3 set null0 [new Agent/Null] $ns attach-agent $n3 $null0#Connect the traffic sources with the traffic sink $ns connect $udp0 $null0 $ns connect $udp1 $null0#Schedule events for the CBR agents $ns at 0.5 $cbr0 start $ns at 1.0 $cbr1 start $ns at 4.0 $cbr1 stop $ns at 4.5 $cbr0 stop #Call the finish procedure after 5 seconds of simulation time $ns at 5.0 finish#Run the simulation $ns run
http://www.zqtcl.cn/news/769613/

相关文章:

  • 做网站 融资玉石网站建设的定位
  • 自己做的网站字体变成方框seo同行网站
  • 宁波网站建设培训微信小程序开发平台官网
  • 西部数码做的网站打不开哈尔滨模板建站推荐
  • 外贸网站建设流程杭州软件定制开发
  • 网站的首页面设计软文推广特点
  • 网站描述在哪里写网页设计图片怎么换
  • 深圳网站关键词优化推广做mod游戏下载网站
  • 通达oa 做网站wordpress动转换标签别名
  • 三亚学做网站培训招聘网站排名
  • 企业网站建设费用需要多少钱怎样下载建设银行信用卡网站
  • 厦门建网站公司怎么做服装外贸网站
  • 做淘宝客网站用什么程序好仿站下载工具
  • 网站地图开发国家住房和城乡建设部中国建造师网站
  • 巫山网站建设泉州市培训建设系统中心网站
  • 网站开发国内外研究背景室内设计师收入高吗
  • 深圳网站维护一般多少钱沈阳做网站黑酷科技
  • 汽车营销服务网站建设怎样申请微信公众号个人
  • 阿里云 做网站北京工程建设交易中心网站
  • 网站备案安全承诺书竞价外包推广专业公司
  • 如何做公司网站广西住建厅八大员报名网站
  • 以下不是网站开发语言的哪项工信部域名备案管理系统
  • 优化网站搭建创业项目网站建设规划
  • 温岭网站开发网站建设程序文件
  • 有什么网站可以做深圳初二的试卷练习商城网站功能
  • 网站托管就业新闻今天的最新新闻
  • 重庆网站建设方案书国外做电商平台的网站有什么
  • 微信扫一扫登录网站如何做网络平台怎么弄
  • 怎么做网页模板展示网站株洲网红餐厅
  • 优秀学校网站设计正规抖音代运营公司排名