some refactor

This commit is contained in:
2026-02-16 01:35:03 +03:00
parent 612c2ad6b2
commit 76597cc7f1
25 changed files with 421 additions and 770 deletions
+11
View File
@@ -0,0 +1,11 @@
Name,Role,Interface,Network,VLAN,Network IP,Mask,Device IP,Default Gateway
PC1,Host,eth1,A,4,10.0.0.0,/24,10.0.0.1,0.0.0.0
PC2,Host,eth1,B,2,10.0.0.0,/24,10.0.0.2,0.0.0.0
PC3,Host,eth1,C,3,10.0.0.0,/24,10.0.0.3,0.0.0.0
PC4,Host,eth1,D,4,10.0.0.0,/24,10.0.0.4,0.0.0.0
com_left,Switch,eth1,tr,trunk,,,,
com_left,Switch,eth2,A,4,,,,
com_left,Switch,eth3,B,2,,,,
com_right,Switch,eth1,tr,trunk,,,,
com_right,Switch,eth2,D,4,,,,
com_right,Switch,eth3,C,3,,,,
1 Name Role Interface Network VLAN Network IP Mask Device IP Default Gateway
2 PC1 Host eth1 A 4 10.0.0.0 /24 10.0.0.1 0.0.0.0
3 PC2 Host eth1 B 2 10.0.0.0 /24 10.0.0.2 0.0.0.0
4 PC3 Host eth1 C 3 10.0.0.0 /24 10.0.0.3 0.0.0.0
5 PC4 Host eth1 D 4 10.0.0.0 /24 10.0.0.4 0.0.0.0
6 com_left Switch eth1 tr trunk
7 com_left Switch eth2 A 4
8 com_left Switch eth3 B 2
9 com_right Switch eth1 tr trunk
10 com_right Switch eth2 D 4
11 com_right Switch eth3 C 3
+6
View File
@@ -0,0 +1,6 @@
name,"type","interfaces","ip","endpoints"
PC1,"host","int1","",""
PC2,"host","int2","",""
int1,"interface","","10.0.12.1/24",""
int2,"interface","","10.0.12.2/24",""
link,"wire","","","int1,int2"
1 name type interfaces ip endpoints
2 PC1 host int1
3 PC2 host int2
4 int1 interface 10.0.12.1/24
5 int2 interface 10.0.12.2/24
6 link wire int1,int2
+11
View File
@@ -0,0 +1,11 @@
Name,Role,Interface,Network,VLAN,Network IP,Mask,Device IP,Default Gateway
PC1,Host,eth1,A,4,10.0.0.0,/24,10.0.0.1,0.0.0.0
PC2,Host,eth1,B,2,10.0.0.0,/24,10.0.0.2,0.0.0.0
PC3,Host,eth1,C,3,10.0.0.0,/24,10.0.0.3,0.0.0.0
PC4,Host,eth1,D,4,10.0.0.0,/24,10.0.0.4,0.0.0.0
com_left,Switch,eth1,tr,trunk,,,,
com_left,Switch,eth2,A,4,,,,
com_left,Switch,eth3,B,2,,,,
com_right,Switch,eth1,tr,trunk,,,,
com_right,Switch,eth2,D,4,,,,
com_right,Switch,eth3,C,3,,,,
1 Name Role Interface Network VLAN Network IP Mask Device IP Default Gateway
2 PC1 Host eth1 A 4 10.0.0.0 /24 10.0.0.1 0.0.0.0
3 PC2 Host eth1 B 2 10.0.0.0 /24 10.0.0.2 0.0.0.0
4 PC3 Host eth1 C 3 10.0.0.0 /24 10.0.0.3 0.0.0.0
5 PC4 Host eth1 D 4 10.0.0.0 /24 10.0.0.4 0.0.0.0
6 com_left Switch eth1 tr trunk
7 com_left Switch eth2 A 4
8 com_left Switch eth3 B 2
9 com_right Switch eth1 tr trunk
10 com_right Switch eth2 D 4
11 com_right Switch eth3 C 3
+19
View File
@@ -0,0 +1,19 @@
links:
networks:
- A: [PC1.eth0, PC2.eth0]
meta:
id: host-host.csv
name: host-host.csv
nodes:
- role: host
name: PC1
interfaces:
- eth0:
- ip: 10.0.12.1/24
network: A
- role: host
name: PC2
interfaces:
- eth0:
- ip: 10.0.12.2/24
network: A
+21
View File
@@ -0,0 +1,21 @@
meta:
id: "lab-02-basic-utils"
name: "Basic Network Utilities & Traffic Monitoring"
description: "Two hosts connected directly to each other."
links:
- endpoints: ["PC1", "PC2"]
nodes:
- name: PC1
role: host
interfaces:
- ip: "10.0.12.1/24"
- name: PC2
role: host
interfaces:
- ip: "10.0.12.2/24"
# Optional:
# - "ip link set dev eth1 down"
+81
View File
@@ -0,0 +1,81 @@
links: []
networks:
- A:
members:
- PC1.eth1
- com_left.eth2
network_ip: 10.0.0.0
mask: /24
vlan: 4
- B:
members:
- PC2.eth1
- com_left.eth3
network_ip: 10.0.0.0
mask: /24
vlan: 2
- C:
members:
- PC3.eth1
- com_right.eth3
network_ip: 10.0.0.0
mask: /24
vlan: 3
- D:
members:
- PC4.eth1
- com_right.eth2
network_ip: 10.0.0.0
mask: /24
vlan: 4
- tr:
members:
- com_left.eth1
- com_right.eth1
vlan: trunk
meta:
id: table.csv
name: table.csv
nodes:
- role: host
name: PC1
interfaces:
- eth1:
- ip: 10.0.0.1/24
network: A
- role: host
name: PC2
interfaces:
- eth1:
- ip: 10.0.0.2/24
network: B
- role: host
name: PC3
interfaces:
- eth1:
- ip: 10.0.0.3/24
network: C
- role: host
name: PC4
interfaces:
- eth1:
- ip: 10.0.0.4/24
network: D
- role: switch
name: com_left
interfaces:
- eth1:
- network: tr
- eth2:
- network: A
- eth3:
- network: B
- role: switch
name: com_right
interfaces:
- eth1:
- network: tr
- eth2:
- network: D
- eth3:
- network: C