ion creating a scenario implementation from scratch of the

20
ION IMPLEMENTATION OF THE DTN PROTOCOL 1 Creating a Scenario from Scratch 1 ©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19032349.

Upload: others

Post on 19-Mar-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

IONIMPLEMENTATION

OF THEDTN PROTOCOL

1

Creating a Scenario from Scratch

1©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9.

Build a 3‐Node Network Entirely from Scratch

• Objective: Build a 3‐node wireless network from scratch (not using any of the DevKit Scripts)

• Make a directory (let’s go ahead and make it: ~/.core/configs/NASA_DTN_DEV_KIT/FromScratch) to hold the various files

• Use the File:New… menu item in CORE go get a new (blank) scenario and save it to the FromScratch directory you just made

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 2

• Drop 3 ‘normal’ (not MDR) routers onto the canvas

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 3

Connect the Routers with Wired Links

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 4

Make Config Files for the Nodes

• For each of n1, n2, n3 you’ll need:File Extension Contents

.ionrc • Specifies the ipn node # this node will use• Identifies the ionconfig file used to configure ion parameters (e.g. memory)• Contacts (connectivity among nodes)

.ionconfig • Specifies the amount of memory ION will allocate at startup (working memory and heap)

.bprc • What forwarding scheme(s) will be used• Which convergence layer protocols the node uses• Which endpoints the node is a member of• What inducts and outducts the node has

.ipnrc • Specifies mechanisms to reach immediate neighbors

.ltprc • Configure LTP parameters such as aggregation size/time• Identify the LSO LTP will use to transmit segments

.ionsecrc • Used to configure security (not used here)

.acsrc • Used to configure aggregate custody signaling

.cfdprc • Configures CCSDS File Delivery Protocol engine parameters

We’ll skip acsrc and cfdprc for now©2020 The MITRE Corporation. All rights reserved. Approved 

for public release. Distribution unlimited 19‐03234‐9. 5

Config files

• The ‘FromScratch’ scenario contains templates to get you started.• If you’re advanced, build the files without consulting the templates (use the above slide and consult the man pages to make the files).

• If you want to use the templates, the ’expandTemplates.sh’ script will make copies for each of n1, n2, n3

• The templates are not complete; they contain enough to instantiate loopback communications over UDP

• You can name the files whatever you want, but for clarity and maintainability [NodeName].YYYY where YYYY is e.g. ionrc, bprc, ltprcis suggested

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 6

.ionrc Template

# INITIALIZE# Ion node number: X

# Ion configuration file name: nX.ionconfig

1 X nX.ionconfig

#

# START

# Program: rfxclock

s

Remember: ‘#’ starts a comment in the various .rc files.

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 7

.ionconfig Template

wmKey 0sdrName ionwmSize 5000000configFlags XXX # 15 == bounded, reversible,heapWords 5000000 in a file, and in memorypathName /var/ion

• Remember that if we have a file‐backed sdr or if we have SDR reversibility turned on, we’ll need to make sure that each virtual node has a private directory corresponding to the pathName variable (otherwise they’ll all share an SDR, which is really bad and confusing)

• Let’s use 15 for the configFlags (bounded, reversible, file and memory)

SDR_IN_DRAMSDR_IN_FILESDR_REVERSIBLESDR_BOUNDED

1248

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 8

.bprc Template # Initialization command (command 1).1

# Add an EID scheme.a scheme ipn 'ipnfw' 'ipnadminep’

# Add some endpoints# a endpoint <endpoint> ‘x’ or ‘q’a endpoint ipn:X.Y x

# Add protocols for external nodes.#-----------------------------------------------------------------# Estimate transmission capacity assuming 1400 bytes of each frame for payload, and 100 bytes for overhead.# a protocol [tcp|udp|ltp] 1400 100# # The following line will support a 'loopback’ communication capability using UDPa protocol udp 1400 100

# Add inducts. (listen)#-----------------------------------------------------------------# a induct [tcp|udp] 0.0.0.0:4556 [PROTO]cli# a induct ltp X ltpclia induct udp 0.0.0.0:4556 udpcli

# Add outducts.#-----------------------------------------------------------------# a outduct [tcp|udp] DEST_IP_ADDR:DEST_IP_PORT [udpclo|””]#a outduct ltp x ltpclo## The following line adds a ‘loopback’ UDP outducta outduct udp 127.0.0.1:4556 udpclo

# Select level of BP watch activities - 0 = None; 1 = All#-----------------------------------------------------------------w 1

# RUN# Program: ipnadmin# On the configuration file name: nX.ipnrcr 'ipnadmin nX.ipnrc'

# Start all declared schemes and protocols on the local nodes

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 9

.ipnrc Template

#----------------------------------------------------# Add an egress plan. (to neighboring nodes/hosts)#----------------------------------------------------#a plan <node> <protocol>/<num/address> #a plan X ltp/X#a plan Y [tcp|udp]/[IP_ADDR]:[PORT]

# The following line adds a ‘loopback’ plana plan 1 udp/127.0.0.1:4556

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 10

.ltprc Template #Initialization command (command 1).#Establish the LTP retransmission window.#A maximum of 64 sessions. 1 session ~ 1 second of transmission#Set a block size limit of 1000000 bytes. (approx data sent per session)####1 [MAX_SESSIONS] [MAX_BLOCK_SIZE]1 100 100000

#-----------------------------------------------------------------#Add a span (a connection)# peer_engine_nbr# max_export_sessions# max_import_sessions# max_segment_size# aggregation_size_limit# aggregation_time_limit# LSO_command# [queuing_latency]# e.g. a span <PEER_NUM> 100 100 64000 100000 1 'udplso x.x.x.x:1113 40000000’

#-----------------------------------------------------------------# Listener on 0.0.0.0# s 'udplsi 0.0.0.0:1113'

w 1

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 11

.ionsecrc Template

# Initialization command (command 1). 1

# Select level of "echo control" activities

# 0 = None; 1 = print to both log and stdout

e 1

• We’re not going to be using security, but ION will throw warnings to the log file if we don’t at least issue the ionsec initialization command

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 12

.acsrc and .cfdprc

• [Skip for now]

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 13

Contacts

• Make a common contacts.ionrc file• Loopback ranges and contacts• N1   N2 ranges and contacts (always connected)• N2  N3 ranges w/ some intermittent contacts

• [Talk about what range and contact mean]

a range +<rel_start_time> +<rel_end_time> <from> <to> <light_seconds>

a contact +<rel_start_time> +<rel_end_time> <from> <to> <Rate_Bytes_sec>

• Note: if you want bi‐directional connectivity:• Add ranges in both directions• Add contacts in both directions

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 14

CORE Configuration• You need to tell CORE to make ‘private’ directories for ION’s sdr files• Right‐click on a node and select ‘services’, then click the wrench next to UserDefined

• Make /var/ion

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9. 15

Start the Scenario

• For each virtual machine:• Get a shell on the virtual machine

• Sorry, all the config files are under /home/core/.core/NASA_DTN_DEV_KIT/FromScratch (or wherever you built them) – copy them all to n1’s directory

• ‘cp –r ~core/.core/configs/NASA_DTN_DEV_KIT/FromScratch/* .’• You want to start each ION node in a different directory so the ion.log files are separate

• Execute the admin commands on the config files in order to start ION:• ionadmin XXX.ionrc # node‐specific, e.g. n1.ionrc• ionadmin contacts.ionrc # the common contacts file• ionsecadmin XXX.ionsecrc• bpadmin XXX.bprc• ltpadmin XXX.ltprc (if present)

16©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9.

Testing / Verification

• From a shell on a node on which you think you’ve started ION, do a ‘ps auxww’

17

root@n1:/tmp/pycore.39053/n1.conf/working# ps auxwwUSER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMANDroot 1 0.0 0.0 10440 1716 ? S 07:27 0:00 /usr/bin/vnoded ……root 44 0.0 0.0 22676 2764 ? Ss 07:27 0:00 /usr/local/sbin/zebra -droot 50 0.0 0.0 26788 2968 ? Ss 07:27 0:00 /usr/local/sbin/ospf6d -droot 54 0.0 0.0 25448 2964 ? Ss 07:27 0:00 /usr/local/sbin/ospfd -droot 62 0.0 0.0 28712 3884 pts/3 Ss 07:27 0:00 /bin/bashroot 1864 0.0 0.0 58340 1276 pts/3 S 07:28 0:00 rfxclockroot 1874 0.0 0.0 60728 1372 pts/3 S 07:28 0:00 bpclm ipn:1.0root 1875 0.0 0.0 60728 1412 pts/3 S 07:28 0:00 bpclm ipn:2.0root 1876 0.0 0.0 60728 1348 pts/3 S 07:28 0:00 bpclockroot 1877 0.0 0.0 60724 1372 pts/3 S 07:28 0:00 bptransitroot 1878 0.0 0.0 62808 1416 pts/3 S 07:28 0:00 ipnfwroot 1879 0.0 0.0 60724 1344 pts/3 S 07:28 0:00 ipnadmineproot 1880 0.0 0.0 70980 1384 pts/3 Sl 07:28 0:00 udpcli 0.0.0.0:4556root 1881 0.0 0.0 62784 2740 pts/3 S 07:28 0:00 udpclo 127.0.0.1:4556root 1882 0.0 0.0 62784 2776 pts/3 S 07:28 0:00 udpclo 10.0.0.2:4556root 1886 0.0 0.0 44472 3324 pts/3 R+ 07:28 0:00 ps auxww

©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9.

Testing / Verification

• Start with bping over loopback• Start the bpecho service on some endpoint you configured in the node’s .bprc file• If you didn’t configure any endpoints, you can do so manually by starting the bpadmin command and typing:

• a endpoint ipn:X.Y x # Add endpoint ipn:X.Y; discard bundles when no# application is present

• a endpoint ipn:X.Z x # Add endpoint ipn:X.Z; discard bundles when no# application is present

• Then start bpecho on the ‘Y’ endpoint:• bpecho ipn:X.Y• You should NOT get a prompt back, bpecho is running in the foreground

• From another shell on the virtual node with node ID X: bping from the Z endpoint:• Bping ipn:X.Z ipn:X.Y

• If that doesn’t work, ION isn’t running right even on that node, let alone being able to route among nodes…

18©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9.

Diagnostics

• If bpecho returned you to a prompt, then it either couldn’t communicate with ION or couldn’t attach to the endpoint you provided

• Check the ion.log file• Check the config files

• Examine the watch characters (assuming you have watch characters turned on)

• Are bundles being sent but not received?• Any other indications of trouble?

19©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9.

Once You Can Run bping Locally On Each Node, Try to Communicate Among Nodes• bping• bpsend / bprecv

• Some new issues with inter‐node communications:• Bundles may make it in one direction but NOT the other (e.g. if you forgot to declare bi‐directional connectivity)

• ion.log, watch characters, and tcpdump may be useful• ‘bpstats’ followed by ‘tail ion.log’ may also help (are bundles being: queued, transmitted, received, delivered, …)

20©2020 The MITRE Corporation. All rights reserved. Approved for public release. Distribution unlimited 19‐03234‐9.