2024-06-05 09:11:37 +01:00
|
|
|
.. only:: comment
|
|
|
|
|
|
|
|
|
|
© Crown-owned copyright 2024, Defence Science and Technology Laboratory UK
|
|
|
|
|
|
#2248 - Enhances the PrimAITE documentation, covering the Node, network interfaces, Session Manager, Software Manager, PCAP service, SysLog functionality, and network devices like Routers, Switches, Computers, and Switch Nodes. It details their roles, workflows, and integration within the simulation, focusing on frame processing, software management, and logging. The documentation also clarifies the frame reception process, including port checks and application-level dispatching, ensuring a thorough understanding of network operations within the simulation
2024-02-08 22:37:21 +00:00
|
|
|
|
|
|
|
|
#########
|
|
|
|
|
Host Node
|
|
|
|
|
#########
|
|
|
|
|
|
|
|
|
|
The ``host_node.py`` module is a core component of the PrimAITE project, aimed at simulating network host. It
|
|
|
|
|
encapsulates the functionality necessary for modelling the behaviour, communication capabilities, and interactions of
|
|
|
|
|
hosts in a networked environment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HostNode Class
|
|
|
|
|
==============
|
|
|
|
|
|
|
|
|
|
The ``HostNode`` class acts as a foundational representation of a networked device or computer, capable of both
|
|
|
|
|
initiating and responding to network communications.
|
|
|
|
|
|
|
|
|
|
**Attributes:**
|
|
|
|
|
|
|
|
|
|
- Manages IP addressing with support for IPv4.
|
|
|
|
|
- Employs ``NIC`` or ``WirelessNIC`` (subclasses of``IPWiredNetworkInterface``) to simulate wired network connections.
|
|
|
|
|
- Integrates with ``SysLog`` for logging operational events, aiding in debugging and monitoring the host node's
|
|
|
|
|
behaviour.
|
|
|
|
|
|
|
|
|
|
**Key Methods:**
|
|
|
|
|
|
|
|
|
|
- Facilitates the sending and receiving of ``Frame`` objects to simulate data link layer communications.
|
|
|
|
|
- Manages a variety of network services and applications, enhancing the simulation's realism and functionality.
|
|
|
|
|
|
|
|
|
|
Default Services and Applications
|
|
|
|
|
=================================
|
|
|
|
|
|
|
|
|
|
Both the ``HostNode`` and its subclasses come equipped with a suite of default services and applications critical for
|
|
|
|
|
fundamental network operations:
|
|
|
|
|
|
|
|
|
|
1. **ARP (Address Resolution Protocol):** The ``HostARP`` subclass enhances ARP functionality for host-specific
|
|
|
|
|
operations.
|
|
|
|
|
|
|
|
|
|
2. **DNS (Domain Name System) Client:** Facilitates domain name resolution to IP addresses, enabling web navigation.
|
|
|
|
|
|
|
|
|
|
3. **FTP (File Transfer Protocol) Client:** Supports file transfers across the network.
|
|
|
|
|
|
|
|
|
|
4. **ICMP (Internet Control Message Protocol):** Utilised for network diagnostics and control, such as executing ping
|
|
|
|
|
requests.
|
|
|
|
|
|
|
|
|
|
5. **NTP (Network Time Protocol) Client:** Synchronises the host's clock with network time servers.
|
|
|
|
|
|
|
|
|
|
6. **Web Browser:** A simulated application that allows the host to request and display web content.
|