2024-02-16 16:14:36 +00:00
.. only :: comment
2024-06-05 09:11:37 +01:00
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
2024-02-16 16:14:36 +00:00
`` simulation ``
==============
In this section the network layout is defined. This part of the config follows a hierarchical structure. Almost every component defines a `` ref `` field which acts as a human-readable unique identifier, used by other parts of the config, such as agents.
At the top level of the network are `` nodes `` and `` links `` .
2024-02-21 14:49:59 +00:00
e.g.
.. code-block :: yaml
simulation:
network:
nodes:
...
links:
...
`` nodes ``
---------
This is where the list of nodes are defined. Some items will differ according to the node type, however, there will be common items such as a node's reference (which is used by the agent), the node's `` type `` and `` hostname ``
To see the configuration for these nodes, refer to the following:
.. toctree ::
:maxdepth: 1
2024-02-23 16:49:01 +00:00
:glob:
2024-02-21 14:49:59 +00:00
2024-04-17 08:25:43 +00:00
simulation/nodes/computer
simulation/nodes/firewall
simulation/nodes/router
simulation/nodes/server
simulation/nodes/switch
simulation/nodes/wireless_router
simulation/nodes/network_examples
2024-02-21 14:49:59 +00:00
`` links ``
---------
This is where the links between the nodes are formed.
e.g.
In order to recreate the network below, we will need to create 2 links:
- a link from computer_1 to the switch
- a link from computer_2 to the switch
.. image :: ../../_static/switched_p2p_network.png
2024-02-23 08:55:32 +00:00
:width: 500
:align: center
2024-02-21 14:49:59 +00:00
this results in:
.. code-block :: yaml
links:
2024-04-17 08:25:43 +00:00
- endpoint_a_hostname: computer_1
2024-02-21 14:49:59 +00:00
endpoint_a_port: 1 # port 1 on computer_1
2024-04-17 08:25:43 +00:00
endpoint_b_hostname: switch
2024-02-21 14:49:59 +00:00
endpoint_b_port: 1 # port 1 on switch
2024-05-14 11:05:37 +01:00
bandwidth: 100
2024-04-17 08:25:43 +00:00
- endpoint_a_hostname: computer_2
2024-02-21 14:49:59 +00:00
endpoint_a_port: 1 # port 1 on computer_2
2024-04-17 08:25:43 +00:00
endpoint_b_hostname: switch
2024-02-21 14:49:59 +00:00
endpoint_b_port: 2 # port 2 on switch
2024-05-14 11:05:37 +01:00
bandwidth: 100
2024-02-21 14:49:59 +00:00
`` ref ``
^^^^^^^
The human readable name for the link. Not used in code, however is useful for a human to understand what the link is for.
2024-04-17 08:25:43 +00:00
`` endpoint_a_hostname ``
2024-05-09 13:43:55 +01:00
^^^^^^^^^^^^^^^^^^^^^^^
2024-02-21 14:49:59 +00:00
2024-02-29 11:07:21 +00:00
The `` hostname `` of the node which must be connected.
2024-02-21 14:49:59 +00:00
`` endpoint_a_port ``
^^^^^^^^^^^^^^^^^^^
2024-04-17 08:25:43 +00:00
The port on `` endpoint_a_hostname `` which is to be connected to `` endpoint_b_port `` .
2024-02-21 14:49:59 +00:00
This accepts an integer value e.g. if port 1 is to be connected, the configuration should be `` endpoint_a_port: 1 ``
2024-04-17 08:25:43 +00:00
`` endpoint_b_hostname ``
2024-05-09 13:43:55 +01:00
^^^^^^^^^^^^^^^^^^^^^^^
2024-02-21 14:49:59 +00:00
2024-02-29 11:07:21 +00:00
The `` hostname `` of the node which must be connected.
2024-02-21 14:49:59 +00:00
`` endpoint_b_port ``
^^^^^^^^^^^^^^^^^^^
2024-04-17 08:25:43 +00:00
The port on `` endpoint_b_hostname `` which is to be connected to `` endpoint_a_port `` .
2024-02-21 14:49:59 +00:00
This accepts an integer value e.g. if port 1 is to be connected, the configuration should be `` endpoint_b_port: 1 ``
2024-05-14 11:05:37 +01:00
`` bandwidth ``
2024-05-20 16:52:17 +01:00
This is an integer value specifying the allowed bandwidth across the connection. Units are in Mbps.