From 265f25b442b48be46cc306b88d6c20a6b1c4d1a7 Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Tue, 9 Apr 2024 14:15:51 +0100 Subject: [PATCH] #2453 - One final typo correction found in network_simulator_demo.ipynb. Correcting switch.sys_log.show() to computer.sys_log.show() in Computer/Server Nodes section --- .../network_simulator_demo.ipynb | 608 ++---------------- 1 file changed, 55 insertions(+), 553 deletions(-) diff --git a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb index 7a095b53..98dcaaac 100644 --- a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb +++ b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb @@ -59,7 +59,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "de57ac8c-5b28-4847-a759-2ceaf5593329", "metadata": { "tags": [] @@ -71,7 +71,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "a1e2e4df-67c0-4584-ab27-47e2c7c7fcd2", "metadata": { "tags": [] @@ -91,70 +91,12 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "cc199741-ef2e-47f5-b2f0-e20049ccf40f", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+------------------------------------------------+\n", - "| Nodes |\n", - "+-------------------+----------+-----------------+\n", - "| Node | Type | Operating State |\n", - "+-------------------+----------+-----------------+\n", - "| router_1 | Router | ON |\n", - "| switch_1 | Switch | ON |\n", - "| switch_2 | Switch | ON |\n", - "| domain_controller | Server | ON |\n", - "| database_server | Server | ON |\n", - "| web_server | Server | ON |\n", - "| backup_server | Server | ON |\n", - "| security_suite | Server | ON |\n", - "| client_1 | Computer | ON |\n", - "| client_2 | Computer | ON |\n", - "+-------------------+----------+-----------------+\n", - "+-----------------------------------------------------------------------------+\n", - "| IP Addresses |\n", - "+-------------------+------+----------------+---------------+-----------------+\n", - "| Node | Port | IP Address | Subnet Mask | Default Gateway |\n", - "+-------------------+------+----------------+---------------+-----------------+\n", - "| router_1 | 1 | 192.168.1.1 | 255.255.255.0 | None |\n", - "| router_1 | 2 | 192.168.10.1 | 255.255.255.0 | None |\n", - "| router_1 | 3 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| router_1 | 4 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| router_1 | 5 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| domain_controller | 1 | 192.168.1.10 | 255.255.255.0 | 192.168.1.1 |\n", - "| database_server | 1 | 192.168.1.14 | 255.255.255.0 | 192.168.1.1 |\n", - "| web_server | 1 | 192.168.1.12 | 255.255.255.0 | 192.168.1.1 |\n", - "| backup_server | 1 | 192.168.1.16 | 255.255.255.0 | 192.168.1.1 |\n", - "| security_suite | 1 | 192.168.1.110 | 255.255.255.0 | 192.168.1.1 |\n", - "| security_suite | 2 | 192.168.10.110 | 255.255.255.0 | 192.168.1.1 |\n", - "| client_1 | 1 | 192.168.10.21 | 255.255.255.0 | 192.168.10.1 |\n", - "| client_2 | 1 | 192.168.10.22 | 255.255.255.0 | 192.168.10.1 |\n", - "+-------------------+------+----------------+---------------+-----------------+\n", - "+---------------------------------------------------------------------------------------------------------------------------------------------------------------+\n", - "| Links |\n", - "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n", - "| Endpoint A | A Port | Endpoint B | B Port | is Up | Bandwidth (MBits) | Current Load |\n", - "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n", - "| router_1 | Port 2: 6e:3e:9f:58:c3:f8/192.168.10.1 | switch_2 | Port 8: 00:a7:49:9f:b7:40 | True | 100.0 | 0.00006% |\n", - "| router_1 | Port 1: 7c:0a:49:bd:2d:5f/192.168.1.1 | switch_1 | Port 8: e6:5e:9e:61:f6:71 | True | 100.0 | 0.00018% |\n", - "| switch_1 | Port 7: 8c:96:32:d5:ef:4b | security_suite | Port 1: 92:17:67:5f:09:f0/192.168.1.110 | True | 100.0 | 0.00003% |\n", - "| switch_1 | Port 4: ef:da:44:ee:68:1d | backup_server | Port 1: 82:23:ff:c5:03:45/192.168.1.16 | True | 100.0 | 0.00003% |\n", - "| switch_1 | Port 2: ab:84:4b:96:bc:b6 | web_server | Port 1: 30:3c:b4:54:b2:ef/192.168.1.12 | True | 100.0 | 0.00015% |\n", - "| switch_1 | Port 3: d8:07:d0:d6:27:52 | database_server | Port 1: 7c:cd:b5:ba:46:33/192.168.1.14 | True | 100.0 | 0.00017% |\n", - "| switch_1 | Port 1: e0:06:93:2c:45:cf | domain_controller | Port 1: 6d:3e:3e:b3:f6:6f/192.168.1.10 | True | 100.0 | 0.00003% |\n", - "| switch_2 | Port 7: 4f:55:6c:c3:ff:e9 | security_suite | Port 2: 64:6f:aa:ba:cb:d0/192.168.10.110 | True | 100.0 | 0.00000% |\n", - "| switch_2 | Port 2: f7:42:43:63:75:c9 | client_2 | Port 1: 21:bb:1b:75:02:fb/192.168.10.22 | True | 100.0 | 0.00003% |\n", - "| switch_2 | Port 1: 45:93:50:03:48:f5 | client_1 | Port 1: ca:f5:26:85:a7:54/192.168.10.21 | True | 100.0 | 0.00003% |\n", - "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n" - ] - } - ], + "outputs": [], "source": [ "network.show()" ] @@ -191,30 +133,12 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "e76d1854-961e-438c-b40f-77fd9c3abe38", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+---------------------------------------------------------------+\n", - "| router_1 Network Interfaces |\n", - "+------+-------------------+-----------------+-------+----------+\n", - "| Port | MAC Address | Address | Speed | Status |\n", - "+------+-------------------+-----------------+-------+----------+\n", - "| 1 | 7c:0a:49:bd:2d:5f | 192.168.1.1/24 | 100 | Enabled |\n", - "| 2 | 6e:3e:9f:58:c3:f8 | 192.168.10.1/24 | 100 | Enabled |\n", - "| 3 | 44:c9:4c:25:4c:9b | 127.0.0.1/8 | 100 | Disabled |\n", - "| 4 | 4a:99:e4:a0:87:ba | 127.0.0.1/8 | 100 | Disabled |\n", - "| 5 | ca:5c:3b:6e:52:ef | 127.0.0.1/8 | 100 | Disabled |\n", - "+------+-------------------+-----------------+-------+----------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").show()" ] @@ -229,32 +153,12 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "92de8b42-92d7-4934-9c12-50bf724c9eb2", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-------------------------------------------------------+\n", - "| router_1 ARP Cache |\n", - "+---------------+-------------------+-------------------+\n", - "| IP Address | MAC Address | Via |\n", - "+---------------+-------------------+-------------------+\n", - "| 192.168.10.21 | ca:f5:26:85:a7:54 | 6e:3e:9f:58:c3:f8 |\n", - "| 192.168.10.22 | 21:bb:1b:75:02:fb | 6e:3e:9f:58:c3:f8 |\n", - "| 192.168.1.10 | 6d:3e:3e:b3:f6:6f | 7c:0a:49:bd:2d:5f |\n", - "| 192.168.1.14 | 7c:cd:b5:ba:46:33 | 7c:0a:49:bd:2d:5f |\n", - "| 192.168.1.12 | 30:3c:b4:54:b2:ef | 7c:0a:49:bd:2d:5f |\n", - "| 192.168.1.16 | 82:23:ff:c5:03:45 | 7c:0a:49:bd:2d:5f |\n", - "| 192.168.1.110 | 92:17:67:5f:09:f0 | 7c:0a:49:bd:2d:5f |\n", - "+---------------+-------------------+-------------------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").arp.show()" ] @@ -269,32 +173,12 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "5922282a-d22b-4e55-9176-f3f3654c849f", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+---------------------------------------------------------------------------------------------------------------------------------------+\n", - "| router_1 Access Control List |\n", - "+-------+--------+----------+--------+--------------+------------------------+--------+--------------+------------------------+---------+\n", - "| Index | Action | Protocol | Src IP | Src Wildcard | Src Port | Dst IP | Dst Wildcard | Dst Port | Matched |\n", - "+-------+--------+----------+--------+--------------+------------------------+--------+--------------+------------------------+---------+\n", - "| 0 | PERMIT | ANY | ANY | ANY | 5432 (POSTGRES_SERVER) | ANY | ANY | 5432 (POSTGRES_SERVER) | 0 |\n", - "| 1 | PERMIT | ANY | ANY | ANY | 53 (DNS) | ANY | ANY | 53 (DNS) | 0 |\n", - "| 2 | PERMIT | ANY | ANY | ANY | 21 (FTP) | ANY | ANY | 21 (FTP) | 0 |\n", - "| 3 | PERMIT | ANY | ANY | ANY | 80 (HTTP) | ANY | ANY | 80 (HTTP) | 0 |\n", - "| 22 | PERMIT | ANY | ANY | ANY | 219 (ARP) | ANY | ANY | 219 (ARP) | 0 |\n", - "| 23 | PERMIT | ICMP | ANY | ANY | ANY | ANY | ANY | ANY | 0 |\n", - "| 24 | DENY | ANY | ANY | ANY | ANY | ANY | ANY | ANY | 0 |\n", - "+-------+--------+----------+--------+--------------+------------------------+--------+--------------+------------------------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").acl.show()" ] @@ -309,25 +193,12 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "327203be-f475-4727-82a1-e992d3b70ed8", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-------------------------------------+\n", - "| router_1 Route Table |\n", - "+-------+---------+----------+--------+\n", - "| Index | Address | Next Hop | Metric |\n", - "+-------+---------+----------+--------+\n", - "+-------+---------+----------+--------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").route_table.show()" ] @@ -342,25 +213,12 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "3d0aa004-b10c-445f-aaab-340e0e716c74", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| router_1 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").sys_log.show(last_n=10)" ] @@ -385,33 +243,12 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "e7fd439b-5442-4e9d-9e7d-86dacb77f458", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+---------------------------------------------+\n", - "| switch_1 Switch Ports |\n", - "+------+-------------------+-------+----------+\n", - "| Port | MAC Address | Speed | Status |\n", - "+------+-------------------+-------+----------+\n", - "| 1 | e0:06:93:2c:45:cf | 100 | Enabled |\n", - "| 2 | ab:84:4b:96:bc:b6 | 100 | Enabled |\n", - "| 3 | d8:07:d0:d6:27:52 | 100 | Enabled |\n", - "| 4 | ef:da:44:ee:68:1d | 100 | Enabled |\n", - "| 5 | b6:76:3d:1d:7e:be | 100 | Disabled |\n", - "| 6 | 02:ce:fa:da:9a:a4 | 100 | Disabled |\n", - "| 7 | 8c:96:32:d5:ef:4b | 100 | Enabled |\n", - "| 8 | e6:5e:9e:61:f6:71 | 100 | Enabled |\n", - "+------+-------------------+-------+----------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"switch_1\").show()" ] @@ -426,25 +263,12 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "a0d984b7-a7c1-4bbd-aa5a-9d3caecb08dc", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| switch_1 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"switch_1\").sys_log.show()" ] @@ -471,38 +295,12 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "656c37f6-b145-42af-9714-8d2886d0eff8", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------------------------------------------------+\n", - "| security_suite Network Interface Cards |\n", - "+------+------+-------------------+-------------------+-------+---------+\n", - "| Port | Type | MAC Address | Address | Speed | Status |\n", - "+------+------+-------------------+-------------------+-------+---------+\n", - "| 1 | NIC | 92:17:67:5f:09:f0 | 192.168.1.110/24 | 100 | Enabled |\n", - "| 2 | NIC | 64:6f:aa:ba:cb:d0 | 192.168.10.110/24 | 100 | Enabled |\n", - "+------+------+-------------------+-------------------+-------+---------+\n", - "+---------------------------+\n", - "| security_suite Open Ports |\n", - "+-------------+-------------+\n", - "| Port | Name |\n", - "+-------------+-------------+\n", - "| 21 | FTP |\n", - "| 53 | DNS |\n", - "| 80 | HTTP |\n", - "| 123 | NTP |\n", - "| 219 | ARP |\n", - "+-------------+-------------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"security_suite\").show()" ] @@ -517,26 +315,12 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "66b267d6-2308-486a-b9aa-cb8d3bcf0753", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------------------------------+\n", - "| security_suite ARP Cache |\n", - "+-------------+-------------------+-------------------+\n", - "| IP Address | MAC Address | Via |\n", - "+-------------+-------------------+-------------------+\n", - "| 192.168.1.1 | 7c:0a:49:bd:2d:5f | 92:17:67:5f:09:f0 |\n", - "+-------------+-------------------+-------------------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"security_suite\").arp.show()" ] @@ -546,30 +330,17 @@ "id": "0d1fcad8-5b1a-4d8b-a49f-aa54a95fcaf0", "metadata": {}, "source": [ - "Calling `switch.sys_log.show()` displays the Computer/Server system log. By default, only the last 10 log entries are displayed, this can be changed by passing `last_n=`." + "Calling `computer.sys_log.show()` displays the Computer/Server system log. By default, only the last 10 log entries are displayed, this can be changed by passing `last_n=`." ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "id": "1b5debe8-ef1b-445d-8fa9-6a45568f21f3", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| security_suite Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"security_suite\").sys_log.show()" ] @@ -586,38 +357,12 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "495b7de4-b6ce-41a6-9114-f74752ab4491", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------------------------------------------------------+\n", - "| IP Addresses |\n", - "+-------------------+------+----------------+---------------+-----------------+\n", - "| Node | Port | IP Address | Subnet Mask | Default Gateway |\n", - "+-------------------+------+----------------+---------------+-----------------+\n", - "| router_1 | 1 | 192.168.1.1 | 255.255.255.0 | None |\n", - "| router_1 | 2 | 192.168.10.1 | 255.255.255.0 | None |\n", - "| router_1 | 3 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| router_1 | 4 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| router_1 | 5 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| domain_controller | 1 | 192.168.1.10 | 255.255.255.0 | 192.168.1.1 |\n", - "| database_server | 1 | 192.168.1.14 | 255.255.255.0 | 192.168.1.1 |\n", - "| web_server | 1 | 192.168.1.12 | 255.255.255.0 | 192.168.1.1 |\n", - "| backup_server | 1 | 192.168.1.16 | 255.255.255.0 | 192.168.1.1 |\n", - "| security_suite | 1 | 192.168.1.110 | 255.255.255.0 | 192.168.1.1 |\n", - "| security_suite | 2 | 192.168.10.110 | 255.255.255.0 | 192.168.1.1 |\n", - "| client_1 | 1 | 192.168.10.21 | 255.255.255.0 | 192.168.10.1 |\n", - "| client_2 | 1 | 192.168.10.22 | 255.255.255.0 | 192.168.10.1 |\n", - "+-------------------+------+----------------+---------------+-----------------+\n" - ] - } - ], + "outputs": [], "source": [ "network.show(nodes=False, links=False)" ] @@ -632,60 +377,24 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "id": "a38abb71-994e-49e8-8f51-e9a550e95b99", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.10.1:\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Ping statistics for 192.168.10.1: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.10.1\")" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "id": "8388e1e9-30e3-4534-8e5a-c6e9144149d2", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| client_1 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").sys_log.show(15)" ] @@ -700,35 +409,12 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "id": "ff8e976a-c16b-470c-8923-325713a30d6c", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.1.1:\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Ping statistics for 192.168.1.1: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.1.1\")" ] @@ -743,35 +429,12 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "id": "c4163f8d-6a72-410c-9f5c-4f881b7de45e", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.1.12:\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.1.12\")" ] @@ -786,25 +449,12 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "id": "e79a523a-5780-45b6-8798-c434e0e522bd", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| web_server Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"web_server\").sys_log.show()" ] @@ -829,35 +479,12 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "id": "603cf913-e261-49da-a7dd-85e1bb6dec56", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.1.12:\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_2\").ping(\"192.168.1.12\")" ] @@ -872,25 +499,12 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "id": "e047de00-3de4-4823-b26a-2c8d64c7a663", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| client_2 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_2\").sys_log.show()" ] @@ -905,23 +519,12 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "id": "6db355ae-b99a-441b-a2c4-4ffe78f46bff", "metadata": { "tags": [] }, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from primaite.simulator.network.transmission.network_layer import IPProtocol\n", "from primaite.simulator.network.transmission.transport_layer import Port\n", @@ -936,32 +539,12 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "id": "a345e000-8842-4827-af96-adc0fbe390fb", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+----------------------------------------------------------------------------------------------------------------------------------------------+\n", - "| router_1 Access Control List |\n", - "+-------+--------+----------+---------------+--------------+------------------------+--------+--------------+------------------------+---------+\n", - "| Index | Action | Protocol | Src IP | Src Wildcard | Src Port | Dst IP | Dst Wildcard | Dst Port | Matched |\n", - "+-------+--------+----------+---------------+--------------+------------------------+--------+--------------+------------------------+---------+\n", - "| 0 | PERMIT | ANY | ANY | ANY | 5432 (POSTGRES_SERVER) | ANY | ANY | 5432 (POSTGRES_SERVER) | 0 |\n", - "| 1 | DENY | ICMP | 192.168.10.22 | ANY | ANY | ANY | ANY | ANY | 0 |\n", - "| 2 | PERMIT | ANY | ANY | ANY | 21 (FTP) | ANY | ANY | 21 (FTP) | 0 |\n", - "| 3 | PERMIT | ANY | ANY | ANY | 80 (HTTP) | ANY | ANY | 80 (HTTP) | 0 |\n", - "| 22 | PERMIT | ANY | ANY | ANY | 219 (ARP) | ANY | ANY | 219 (ARP) | 0 |\n", - "| 23 | PERMIT | ICMP | ANY | ANY | ANY | ANY | ANY | ANY | 24 |\n", - "| 24 | DENY | ANY | ANY | ANY | ANY | ANY | ANY | ANY | 0 |\n", - "+-------+--------+----------+---------------+--------------+------------------------+--------+--------------+------------------------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").acl.show()" ] @@ -976,31 +559,12 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "id": "a4f4ff31-590f-40fb-b13d-efaa8c2720b6", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.1.12:\n", - "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 0, Lost = 4 (100.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "False" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_2\").ping(\"192.168.1.12\")" ] @@ -1015,25 +579,12 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "id": "f62b8a4e-fd3b-4059-b108-3d4a0b18f2a0", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| client_2 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_2\").sys_log.show()" ] @@ -1048,25 +599,12 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "id": "7e53d776-99da-4d2c-a2a7-bd7ce27bff4c", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| router_1 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").sys_log.show()" ] @@ -1081,60 +619,24 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": null, "id": "d542734b-7582-4af7-8254-bda3de50d091", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.1.12:\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.1.12\")" ] }, { "cell_type": "code", - "execution_count": 28, + "execution_count": null, "id": "d78e9fe3-02c6-4792-944f-5622e26e0412", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| client_1 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").sys_log.show()" ]