在安装好ion环境后,要开启ION应用程序并通过DTN协议栈传输数据,最重要的就是通过ionstart命令配置rc文件来配置应用程序的环境,

一般而言,ionstart开启rc文件的命令如下:

ionstart -I host1.rc

其中host1.rc就是rc文件名, 要注意的是,在终端输入ionstart命令,当前路径必须是rc文件所在路径。

接下来具体分析rc文件的组成:

首先给出一份rc文件:

在分析之前,要知道一点:以单个“#”开头的行表示注释以方便了解相应配置所起的作用,而以两个“##”开头的行即表示此行为注释号,同时也起到识别不同管理进程的作用,如ionadmin, ionsecadmin, ltpadmin, bpadmin, ipnadmin。

host1.rc

## begin ionadmin
# ionrc configuration file for host3 in a 3node ltp test.
#This uses ltp as the convergence layer.
#command: % ionadmin host3.ionrc
#This command should be run FIRST.
#
#Soochow University, April 2012
# Initialization command (command 3).
#Set this node to be node 3 (as in ipn:3).
#Use sdr configuration of “ionconfig” file.1 1 ionconfig
# start ion node
s
# Add some contacts.
#They will start at +0 seconds from now, ending +86400 seconds from now.
#They will connect node 1 to node 2, and connect node 2 to node 3.
#They will transmit 125000 bytes/second.
#Note that contacts are unidirectional, so order matters.a contact +0 +86400 1 2 125000
a contact +0 +86400 2 1 125000# Add some ranges. These are the physical distance between nodes.
#They will start at +0 seconds from now, ending +86400 seconds from now.
#They will connect node 1 to node 2, and connect node 2 to node 3.
#We will assume every range is one second. Data on the link is expected to take 1 second
#to reach the other end (One Way Light Time).
#Note that ranges cover both directions, so you only need define one range for any
#combination of nodes.a range +0 +86400 1 2 1# set this node to consume and produce a mean of 1000000 bytes/second.m production 1000000
m consumption 1000000
m horizon +0
## end ionadmin
## begin ionsecadmin1
e 1
## end ionsecadmin
## begin ltpadmin
# ltprc configuration file for host1 in a 3node ltp test.
#Command: % ltpadmin host3.ltprc
#This command should be run AFTER ionadmin and BEFORE bpadmin.
#
#Soochow University, April 2012
#
#A warning: the ltp configuration is not ideal in this case.
#please consult manual pages and other documentation for a better description.
# Initialization command (command 1).
# Establishes the LTP retransmission window.
# (Prohibiting LTP from seizing all available storage).
#A maximum of 5 sessions. A session is assumed to be around one second of
#transmission. This value should be estimated at the sum of maximum round-trip
#times(in seconds) for all "spans." Suggest throwing 20% higher number of sessions
#to account for extra- long sessions which contain an actual retransmission. Set a total
#LTP memory space usage limit of 1200000 as the sum of the memory space usage of
#all spans (more or less the number of bytes in transit on all links for their duration).1 5 1200000
# Add a span. (a connection)
#Identify the span as engine number 2. That is the ipn node number of the node on
#the other end of this span. Use 5 as the maximum number of export sessions.
#Use 120000 as the maximum size of an export block. This more or less limits the
#maximum size of a bundle in the system. The next two items are the maximum
#number of import sessions and the maximum size of an imported block.
#Since this is connect, we just copy the export numbers here.
#1400 is the maximum segment size- more or less, the amount of data that can be
#held in a single frame of the underlying protocol. In this case, UDP packets are
#the frame, and we will give a conservative limit.
#Limit the aggregation size to 120000 bytes, and set a time limit on aggregation to 1
#second. Use the command 'udplso 10.0.0.4:1113' to implement the link itself.
#In this case, we use udp to connect to host2 (10.0.0.4 is host2's ipaddr) using port 1113
#(defined by IANA as the default UDP port for Licklider Transmission Protocol).
#The single quote is important, don't use double quotes.
a span 2 5 120000 5 120000 1400 120000 1 'udplso 10.0.0.4:1113'
# Start command.
#This command actually runs the link service output commands
#(defined above, in the "a span" commands).
#Also starts the link service INPUT task 'udplsi 10.0.0.5:1113' to
#listen locally on UDP port 1113 for incoming LTP traffic.
s 'udplsi 10.0.0.3:1113'
m screening n
w 1
## end ltpadmin
## begin bpadmin
# bprc configuration file for host3 in a 3node ltp test.
#Command: % bpadmin host3.bprc
#This command should be run AFTER ionadmin and ltpadmin and
#BEFORE ipnadmin or dtnadmin.
#
#Soochow University, April 2012
# Initialization command (command 1).1# Add an EID scheme.
#The scheme's name is ipn.
#This scheme's forwarding engine is handled by the program 'ipnfw.'
#This scheme's administration program (acting as the custodian daemon) is 'ipnadminep.'a scheme ipn 'ipnfw' 'ipnadminep'# Add endpoints.
#Establish endpoints ipn:3.1 and ipn:3.2 on the local node.
#The behavior for receiving a bundle when there is no application currently accepting
#bundles, is to queue them 'q', as opposed to immediately and silently discarding
#them (use 'x' instead of 'q' to discard).
#Note that the custodian endpoint ipn:3.0 is automatically generated.
a endpoint ipn:1.0 q
a endpoint ipn:1.1 q
a endpoint ipn:1.2 q
# Add a protocol.
#Add the protocol named ltp.
#Estimate transmission capacity assuming 1400 bytes of each frame (in this case, udp
#on ethernet) for payload, and 100 bytes for overhead.
a protocol ltp 1400 100
# Add an induct. (listen)
#Add an induct to accept bundles using the ltp protocol.
#The duct's name is 3 (this is for future changing/deletion of the induct).
#The induct itself is implemented by the 'ltpcli' command.
a induct ltp 1 ltpcli
# Add an outduct. (send to host2)
#Add an outduct to send bundles using the ltp protocol.
#The duct's name is 2(this is for future changing/deletion of the outduct).
#The outduct itself is implemented by the 'ltpclo' command.
a outduct ltp 2 ltpclo
#Start bundle protocol engine, also running all of the induct, outduct, and
#administration programs defined above
s
#w 1
## end bpadmin
## begin ipnadmin
# ipnrc configuration file for host3 in a 3node ltp test.
#Essentially, this is the IPN scheme's routing table.
#Command: % ipnadmin host1.ipnrc
#This command should be run AFTER bpadmin (likely to be run last).
#
#Soochow University, April 2012
# Add an egress plan.
#Bundles to be transmitted to element number 2 can be transmitted directly to host2
#using ltp outduct identified as ‘2.’
#See your bprc file or bpadmin for outducts/protocols you can use.
a plan 2 ltp/2
## end ipnadmin

接下来分段分析:

1 2 ionconfig

这行命令是选取ionconfig配置文件,该文件主要是指定了ion运行的内存空间,1代表是命令1 ,2代表是节点2,也就是如果你是为了节点1配置rc文件,那么这里应该改成1 1 ionconfig,要注意的是,这里ionconfig文件应该和rc文件在同一路径下。

# start ion node
s

该行命令无需多解释

a contact +0 +86400 1 2 125000
a contact +0 +86400 2 1 125000

这两行命令是添加传输的时间和节点,传输将从0s开始,结束于86400s,将连接从节点1到节点2,传输速度是125000 bytes/second

a range +0 +86400 1 2 1

添加一些范围。 这些是节点之间的物理距离,连接节点1到节点2,我们假设这些节点之间的距离时间为1s,也就是说数据从节点1到节点2要花费1s时间,由于range包含了双向,因此只需要定义一个range即可。

m production 1000000
m consumption 1000000
m horizon +0

设置该节点消耗和生产的均值为1000000 bytes/second

1
e 1

不多解释

a protocol ltp 1400 100
1 5 1200000

1表示命令1,5表示会话进程最大值为5,1200000(单位byte)表示 LTP内存空间的使用上限,,也就是所有span的使用内存空间总和。

a span 2 5 120000 5 120000 1400 120000 1 'udplso 10.0.0.4:1113'

添加一个span也就是一个连接,2表示连接另一端的节点号码,5表示最大数目的输出会话进程,120000是最大的输出块尺寸,后面的5和120000表示输入的最大数目会话进程和最大块尺寸,这里设置和输出一样。1400是segment的尺寸,也就是1400byte数据在一个帧中,比如udp包,120000是限制聚合层大小,并设置聚合层时间为1s,命令'udplso 10.0.0.4:1113‘是设置连接本身性质,在这个rc文件中,利用udp连接host2(ip地址:10.0.0.4)端口1113。

s 'udplsi 10.0.0.3:1113'
m screening n
w 1

这里设置input task。用udp端口1113进行监听,本节点地址为10.0.0.3。

m screening n 此命令启用或禁用接收的LTP的筛选,n表示禁用。默认是禁用。

a scheme ipn 'ipnfw' 'ipnadminep'

不做解释

a endpoint ipn:1.0 q
a endpoint ipn:1.1 q
a endpoint ipn:1.2 q

添加终端节点,ipn:1.0 1表示本节点的number,0表示service number,servicenumber 类似于端口号之类的,每个number提供一个服务,q表示对于每一个接收到的bundle进行排队,而x表示立即丢弃这个bundle,也就是a endpoint ipn:1.0 q 改成 a endpoint ipn:1.0 x,常用在loopback测试中。

a protocol ltp 1400 100

添加ltp协议,每个frame有1400bytes数据,100个字节的开销。

a induct ltp 1 ltpcli

添加监听induct,duct的名字为1

a outduct ltp 2 ltpclo

添加发送 outduct,duct名字为2

s

开始bundle 协议,开启所有的induct和outduct。

a plan 2 ltp/2

添加输出计划,也就是bundle要传输到node number为2的节点,使用标识为“2”的ltp输出。

以上就是对rc文件的分析,可以说正确的配置好rc文件那么ion就成功了一半,那么rc文件中,有几个需要注意的地方,

比如bp的启动命令

s,很多情况下由于并不显眼,可能会漏写该命令,会直接导致bp层运行失败。本人就曾经因为漏了s命令,调了一天的bug。

还有就是ltp协议的两个主要参数,block和session。也就是这条命令:a span 1 5 120000 5 120000 1400 120000 1 'udplso 10.0.0.3:1113'

Block 的尺寸决定着一次会话最多可以传输多少数据(以字节为单位)。会话的量(或数目)决定着同时最多可以进行多少个会话。Block 的实际尺寸与信道的速率( Channel rate )决定了传输 Block 所需的时间。

ION-DTN RC配置文件分析相关推荐

  1. 定时分量和直流分量_交直流输入的RC电路分析

    今天继续来讲一下电路分析,这也是前段时间讲述的电路分析的继续.来看看下面两条提到这种RC电路分析,也就是交直流输入的电路响应的稳态分析, 非正弦信号的电路响应 输入由直流电压和交流电压串联而成 RC电 ...

  2. Enterprise Library: Data Access Application Block配置文件分析篇

    Enterprise Library: Data Access Application Block配置文件分析篇 Enterprise Library提供了Configuration Console配 ...

  3. /etc/rc.d/rc.sysinit 分析

    /etc/rc.d/rc.sysinit作用 Rc."d" D代表Daemon守护进程的意思 1.启动Udev(热插拔设备)并且启用selinux 2.把Kernel参数设定在/e ...

  4. 【开发环境】Ubuntu 中使用 VSCode 开发 C/C++ ④ ( 创建 tasks.json 编译器构建配置文件 | tasks.json 编译器构建配置文件分析 )

    文章目录 一.创建 tasks.json 编译器构建配置文件 二.tasks.json 编译器构建配置文件分析 可以参考官方提供的文档 : https://code.visualstudio.com/ ...

  5. LC和RC滤波电路分析

    一.概述 整流电路的输出电压并不是纯粹的直流,从示波器观察整流电路的输出,与直流相差很大,波形中含有较大的脉动成分,称为纹波.为了获得比较理想的直流电压,需要利用具有储能作用的电抗性元件(如:电感.电 ...

  6. vue-cli的webpack模板项目配置文件分析[转]

    vue-cli的webpack模板项目配置文件分析[转] 原文出处:http://blog.csdn.net/hongchh/article/details/55113751 由于最近在vue-cli ...

  7. Solr配置文件分析与验证

    前面一篇开始学习solr的时候,做了个入门的示例http://6738767.blog.51cto.com/6728767/1401865.虽然可以检索出内容,但总和想象的结果有差异--比如,检索&q ...

  8. vue-cli的webpack模板项目配置文件分析

    由于最近在vue-cli生成的webpack模板项目的基础上写一个小东西,开发过程中需要改动到build和config里面一些相关的配置,所以刚好趁此机会将所有配置文件看一遍,理一理思路,也便于以后修 ...

  9. Linux环境变量设置中配置文件分析(/etc/profile,~/.bashrc等)(转)

    说明:在研究中发现,对于不同版本的Linux系统有着不同的文件,但是总的入口是不变的/etc/profile,下面只是展示加载顺序的研究过程,所以会有些系统没有这个文件等问题. 一.配置文件与作用域: ...

最新文章

  1. ## **scrapy+kafka+sparkstream爬取京东Iphone12评论储存数据**
  2. Java开发面试技巧,如何设计一个优雅的RESTFUL的接口
  3. 5.16 Stacks and Queues
  4. KMyMoney:全体理财好管家
  5. nginx 获取body参数_分布式实战:Nginx缓存之流量分发层
  6. 网关冗余工作原理(总结)
  7. 算法题10 最长等差序列问题
  8. Bootstrap4代码模板
  9. 白盒测试之语句覆盖案例
  10. Oracle 11g R2查看表的存储结构
  11. 为什么Docker不能解决云上的所有问题
  12. 华为linux输入法,华为默认手机输入法原来还能这么玩??涨知识了
  13. 2022年低功耗软路由cpu一览
  14. 【Shawn-LeetCode】Two Sum
  15. windows 性能监控--Perfmon主要指标
  16. 大白菜android模拟器,大白菜U盘启动制作工具 v5.1
  17. 【Codeforces】1635E Cars 题解
  18. Java培训出来什么水平?
  19. 【国产数据库】GBase学习⑤ - gsql 客户端连接工具
  20. 虚拟与现实!深兰科技打造湖北首个街区数字主理人「江妮」

热门文章

  1. python如何求矩阵逆运算_python简单实现矩阵的乘,加,转置和逆运算示例
  2. 彻底理解操作系统:1,什么是程序?
  3. 3个高效智能抠图工具,智能一键抠图,小白也能轻松搞定
  4. 关于微信小程序上传,在微信公众平台|小程序中找不到上传的代码
  5. windows 7(32/64位)GHO安装指南(U盘引导篇)~
  6. 使用pngquant命令近乎无损压缩PNG图片大小减少70%左右
  7. davinci resolve达芬奇
  8. MOS管米勒效应详解
  9. 《Linux/UNIX OpenLDAP实战指南》——1.3 OpenLDAP schema概念
  10. l2空间的完备性_什么是“类脑计算完备性”?清华团队在Nature首次提出!