From 260280994dd078670072d8398ad9d087db857a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Sat, 21 Jun 2025 16:18:59 -0300 Subject: [PATCH] feat: add ARP example --- examples/localNetwork.json | 171 +++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 examples/localNetwork.json diff --git a/examples/localNetwork.json b/examples/localNetwork.json new file mode 100644 index 00000000..5065b4dc --- /dev/null +++ b/examples/localNetwork.json @@ -0,0 +1,171 @@ +{ + "nodes": [ + { + "id": 1, + "type": 2, + "x": 4717.25, + "y": 5001.484375, + "interfaces": [ + { + "name": "eth0", + "mac": "00:00:10:00:00:01" + }, + { + "name": "eth1", + "mac": "00:00:10:00:00:02" + }, + { + "name": "eth2", + "mac": "00:00:10:00:00:03" + }, + { + "name": "eth3", + "mac": "00:00:10:00:00:04" + }, + { + "name": "eth4", + "mac": "00:00:10:00:00:05" + }, + { + "name": "eth5", + "mac": "00:00:10:00:00:06" + }, + { + "name": "eth6", + "mac": "00:00:10:00:00:07" + }, + { + "name": "eth7", + "mac": "00:00:10:00:00:08" + } + ], + "tag": "Switch", + "forwardingTable": [] + }, + { + "id": 2, + "type": 0, + "x": 4738.75, + "y": 4821.96875, + "interfaces": [ + { + "name": "eth0", + "mac": "00:00:10:00:00:09", + "ip": "10.0.0.1" + } + ], + "tag": "Host A", + "mask": "255.255.255.255", + "arpTable": [ + ["10.0.0.2", "", false], + ["10.0.0.3", "", false], + ["10.0.0.4", "", false] + ], + "runningPrograms": [] + }, + { + "id": 3, + "type": 0, + "x": 4887.25, + "y": 5141.484375, + "interfaces": [ + { + "name": "eth0", + "mac": "00:00:10:00:00:0a", + "ip": "10.0.0.2" + } + ], + "tag": "Host B", + "mask": "255.255.255.255", + "arpTable": [ + ["10.0.0.1", "", false], + ["10.0.0.3", "", false], + ["10.0.0.4", "", false] + ], + "runningPrograms": [] + }, + { + "id": 4, + "type": 0, + "x": 4533.25, + "y": 5135.484375, + "interfaces": [ + { + "name": "eth0", + "mac": "00:00:10:00:00:0b", + "ip": "10.0.0.3" + } + ], + "tag": "Host C", + "mask": "255.255.255.255", + "arpTable": [ + ["10.0.0.1", "", false], + ["10.0.0.2", "", false], + ["10.0.0.4", "", false] + ], + "runningPrograms": [] + } + ], + "edges": [ + { + "from": { + "id": 3, + "iface": 0 + }, + "to": { + "id": 1, + "iface": 0 + } + }, + { + "from": { + "id": 1, + "iface": 1 + }, + "to": { + "id": 2, + "iface": 0 + } + }, + { + "from": { + "id": 4, + "iface": 0 + }, + "to": { + "id": 1, + "iface": 2 + } + }, + { + "from": { + "id": 1, + "iface": 1 + }, + "to": { + "id": 2, + "iface": 0 + } + }, + { + "from": { + "id": 3, + "iface": 0 + }, + "to": { + "id": 1, + "iface": 0 + } + }, + { + "from": { + "id": 4, + "iface": 0 + }, + "to": { + "id": 1, + "iface": 2 + } + } + ] +}