Skip to content

Commit af9d5ff

Browse files
committed
feat(fcefyn): add FCEFyN university lab to labnet
Signed-off-by: Franco <franco.riba@mi.unc.edu.ar>
1 parent 7ae2782 commit af9d5ff

9 files changed

Lines changed: 346 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
2+
.idea/
23
.pytest_cache
34
.vscode/
45
__pycache__
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
port=0
2+
3+
interface=vlan100
4+
dhcp-range=vlan100,192.168.100.100,192.168.100.200,24h
5+
6+
interface=vlan101
7+
dhcp-range=vlan101,192.168.101.100,192.168.101.200,24h
8+
9+
interface=vlan102
10+
dhcp-range=vlan102,192.168.102.100,192.168.102.200,24h
11+
12+
interface=vlan103
13+
dhcp-range=vlan103,192.168.103.100,192.168.103.200,24h
14+
15+
interface=vlan104
16+
dhcp-range=vlan104,192.168.104.100,192.168.104.200,24h
17+
18+
interface=vlan105
19+
dhcp-range=vlan105,192.168.105.100,192.168.105.200,24h
20+
21+
interface=vlan106
22+
dhcp-range=vlan106,192.168.106.100,192.168.106.200,24h
23+
24+
interface=vlan107
25+
dhcp-range=vlan107,192.168.107.100,192.168.107.200,24h
26+
27+
interface=vlan108
28+
dhcp-range=vlan108,192.168.108.100,192.168.108.200,24h
29+
30+
interface=vlan200
31+
dhcp-range=vlan200,192.168.200.100,192.168.200.200,24h
32+
33+
enable-tftp
34+
tftp-root=/srv/tftp/
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
labgrid-fcefyn-belkin_rt3200_1:
2+
location: fcefyn-testbed
3+
RawSerialPort:
4+
port: "/dev/belkin-rt3200-1"
5+
speed: 115200
6+
PDUDaemonPort:
7+
host: localhost:16421
8+
pdu: fcefyn-arduino
9+
index: 0
10+
TFTPProvider:
11+
internal: "/srv/tftp/belkin_rt3200_1/"
12+
external: "belkin_rt3200_1/"
13+
external_ip: "192.168.100.1"
14+
NetworkService:
15+
address: "192.168.1.1%vlan100"
16+
username: "root"
17+
18+
labgrid-fcefyn-belkin_rt3200_2:
19+
location: fcefyn-testbed
20+
RawSerialPort:
21+
port: "/dev/belkin-rt3200-2"
22+
speed: 115200
23+
PDUDaemonPort:
24+
host: localhost:16421
25+
pdu: fcefyn-arduino
26+
index: 1
27+
TFTPProvider:
28+
internal: "/srv/tftp/belkin_rt3200_2/"
29+
external: "belkin_rt3200_2/"
30+
external_ip: "192.168.101.1"
31+
NetworkService:
32+
address: "192.168.1.1%vlan101"
33+
username: "root"
34+
35+
labgrid-fcefyn-belkin_rt3200_3:
36+
location: fcefyn-testbed
37+
RawSerialPort:
38+
port: "/dev/belkin-rt3200-3"
39+
speed: 115200
40+
PDUDaemonPort:
41+
host: localhost:16421
42+
pdu: fcefyn-arduino
43+
index: 2
44+
TFTPProvider:
45+
internal: "/srv/tftp/belkin_rt3200_3/"
46+
external: "belkin_rt3200_3/"
47+
external_ip: "192.168.102.1"
48+
NetworkService:
49+
address: "192.168.1.1%vlan102"
50+
username: "root"
51+
52+
labgrid-fcefyn-bananapi_bpi-r4:
53+
location: fcefyn-testbed
54+
RawSerialPort:
55+
port: "/dev/bpi-r4"
56+
speed: 115200
57+
PDUDaemonPort:
58+
host: localhost:16421
59+
pdu: fcefyn-arduino
60+
index: 3
61+
TFTPProvider:
62+
internal: "/srv/tftp/bananapi_bpi-r4/"
63+
external: "bananapi_bpi-r4/"
64+
external_ip: "192.168.103.1"
65+
NetworkService:
66+
address: "192.168.1.1%vlan103"
67+
username: "root"
68+
69+
labgrid-fcefyn-openwrt_one:
70+
location: fcefyn-testbed
71+
RawSerialPort:
72+
port: "/dev/openwrt-one"
73+
speed: 115200
74+
PDUDaemonPort:
75+
host: localhost:16421
76+
pdu: fcefyn-poe
77+
index: 1
78+
TFTPProvider:
79+
internal: "/srv/tftp/openwrt_one/"
80+
external: "openwrt_one/"
81+
external_ip: "192.168.104.1"
82+
NetworkService:
83+
address: "192.168.1.1%vlan104"
84+
username: "root"
85+
86+
labgrid-fcefyn-librerouter_1:
87+
location: fcefyn-testbed
88+
RawSerialPort:
89+
port: "/dev/librerouter-1"
90+
speed: 115200
91+
PDUDaemonPort:
92+
host: localhost:16421
93+
pdu: fcefyn-poe
94+
index: 2
95+
TFTPProvider:
96+
internal: "/srv/tftp/librerouter_1/"
97+
external: "librerouter_1/"
98+
external_ip: "192.168.105.1"
99+
NetworkService:
100+
address: "192.168.1.1%vlan105"
101+
username: "root"
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
network:
2+
version: 2
3+
renderer: NetworkManager
4+
ethernets:
5+
enp0s25:
6+
addresses:
7+
- 192.168.0.10/24
8+
dhcp4: true
9+
vlans:
10+
vlan100:
11+
id: 100
12+
link: enp0s25
13+
addresses:
14+
- 192.168.100.1/24
15+
- 192.168.1.100/24
16+
vlan101:
17+
id: 101
18+
link: enp0s25
19+
addresses:
20+
- 192.168.101.1/24
21+
- 192.168.1.101/24
22+
vlan102:
23+
id: 102
24+
link: enp0s25
25+
addresses:
26+
- 192.168.102.1/24
27+
- 192.168.1.102/24
28+
vlan103:
29+
id: 103
30+
link: enp0s25
31+
addresses:
32+
- 192.168.103.1/24
33+
- 192.168.1.103/24
34+
vlan104:
35+
id: 104
36+
link: enp0s25
37+
addresses:
38+
- 192.168.104.1/24
39+
- 192.168.1.104/24
40+
vlan105:
41+
id: 105
42+
link: enp0s25
43+
addresses:
44+
- 192.168.105.1/24
45+
- 192.168.1.105/24
46+
vlan106:
47+
id: 106
48+
link: enp0s25
49+
addresses:
50+
- 192.168.106.1/24
51+
- 192.168.1.106/24
52+
vlan107:
53+
id: 107
54+
link: enp0s25
55+
addresses:
56+
- 192.168.107.1/24
57+
- 192.168.1.107/24
58+
vlan108:
59+
id: 108
60+
link: enp0s25
61+
addresses:
62+
- 192.168.108.1/24
63+
- 192.168.1.108/24
64+
vlan200:
65+
id: 200
66+
link: enp0s25
67+
addresses:
68+
- 192.168.200.1/24
69+
- 192.168.1.200/24
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"daemon": {
3+
"hostname": "localhost",
4+
"port": 16421,
5+
"logging_level": "INFO",
6+
"listener": "http"
7+
},
8+
"pdus": {
9+
"fcefyn-arduino": {
10+
"driver": "localcmdline",
11+
"cmd_on": "/usr/local/bin/arduino_relay_control.py on %s",
12+
"cmd_off": "/usr/local/bin/arduino_relay_control.py off %s"
13+
},
14+
"fcefyn-poe": {
15+
"driver": "localcmdline",
16+
"cmd_on": "/usr/local/bin/poe_switch_control.py on %s",
17+
"cmd_off": "/usr/local/bin/poe_switch_control.py off %s"
18+
}
19+
}
20+
}

ansible/inventory.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ labgrid-leinelab
66
labgrid-wigyori
77
labgrid-hauke
88
labgrid-hsn
9+
labgrid-fcefyn
910

1011
[coordinator]
1112
global-coordinator

docs/labs/fcefynlab.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Devices in FCEFYN Lab
2+
3+
## Coordinator/Exporter
4+
5+
- Ubuntu Host
6+
- Ethernet: VLAN trunk to switch
7+
- USB serial adapters via hub (udev symlinks)
8+
- Arduino relay control (barrel-jack DUTs)
9+
- PoE switch control (PoE DUTs via TP-Link SG2016P)
10+
- TFTP/DHCP: dnsmasq per VLAN
11+
12+
## Switch
13+
14+
- **Model:** TP-Link SG2016P (16-port Gigabit, 8 PoE)
15+
16+
| Port | Device | Power |
17+
|------|------------------|-------|
18+
| 1 | OpenWRT One | PoE |
19+
| 2 | LibreRouter #1 | PoE |
20+
| 3 | LibreRouter #2 | Relay |
21+
| 9 | Host | Trunk |
22+
| 10 | MikroTik | Trunk |
23+
| 11 | Belkin RT3200 #1 | Relay |
24+
| 12 | Belkin RT3200 #2 | Relay |
25+
| 13 | Belkin RT3200 #3 | Relay |
26+
| 14 | Banana Pi R4 | Relay |
27+
28+
## DUTs
29+
30+
- **Belkin RT3200 #1, #2, #3** (linksys_e8450)
31+
- Power: Arduino relay (channels 0–2)
32+
- Target: mediatek-mt7622
33+
34+
- **Banana Pi R4** (bananapi_bpi-r4)
35+
- Power: Arduino relay (channel 3)
36+
- Target: mediatek-filogic
37+
38+
- **OpenWrt One** (openwrt_one)
39+
- Power: PoE (switch port 1)
40+
- Target: mediatek-filogic
41+
42+
- **LibreRouter #1** (librerouter_librerouter_v1)
43+
- Power: PoE (switch port 2, via splitter 48V→12V)
44+
- Target: ath79-generic
45+
46+
## Maintainers
47+
48+
- @javierbrk
49+
- @francoriba
50+
- @ccasanueva7
51+
52+
## Location
53+
54+
- Universidad Nacional de Córdoba. Facultad de Ciencias Exactas, Físicas y Naturales
55+
- Córdoba, Argentina

labnet.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ devices:
132132
target: mediatek-mt7622
133133
firmware: initramfs-kernel.bin
134134

135+
librerouter_librerouter_v1:
136+
name: LibreRouter v1
137+
target: ath79-generic
138+
firmware: initramfs-kernel.bin
139+
135140
labs:
136141
labgrid-aparcar:
137142
proxy: labgrid-aparcar
@@ -212,6 +217,28 @@ labs:
212217
developers:
213218
- hauke
214219

220+
labgrid-fcefyn:
221+
proxy: labgrid-fcefyn
222+
maintainers:
223+
- "@francoriba"
224+
- "@ccasanueva7"
225+
- "@javierbrk"
226+
devices:
227+
- linksys_e8450
228+
- openwrt_one
229+
- bananapi_bpi-r4
230+
- librerouter_librerouter_v1
231+
device_instances:
232+
linksys_e8450:
233+
- belkin_rt3200_1
234+
- belkin_rt3200_2
235+
- belkin_rt3200_3
236+
librerouter_librerouter_v1:
237+
- librerouter_1
238+
developers:
239+
- francoriba
240+
- aparcar
241+
215242
developers:
216243
aparcar:
217244
sshkey: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDZTxjQ3/KTefKvsPlVBWz+ITD7dGWcOt8/C55ekd2VE
@@ -223,3 +250,5 @@ developers:
223250
sshkey: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG8vcHMKcl6W6OuzSdjOhQ0ZehtH+McjLB7WzgP9P4Ls
224251
hauke:
225252
sshkey: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhbJDeGBfpn8vkd1wjHgOWvN9WGWS3mRgqqFqNqgpNE
253+
francoriba:
254+
sshkey: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPaNY9LyGgQlwlMaWxSWq5xD++UGCJtdqxHPHDADFACi
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
targets:
2+
main:
3+
features:
4+
- wan_port
5+
- wifi
6+
resources:
7+
RemotePlace:
8+
name: !template "$LG_PLACE"
9+
drivers:
10+
- PDUDaemonDriver: {}
11+
- TFTPProviderDriver: {}
12+
- SerialDriver:
13+
txdelay: 0.01
14+
- UBootDriver:
15+
interrupt: "\n"
16+
prompt: "ath>"
17+
init_commands:
18+
- tftp 0x82000000
19+
boot_command: bootm 0x82000000
20+
- ShellDriver:
21+
prompt: 'root@[\w()]+:[^ ]+ '
22+
login_prompt: Please press Enter to activate this console.
23+
await_login_timeout: 15
24+
login_timeout: 120
25+
post_login_settle_time: 5
26+
username: root
27+
- UBootTFTPStrategy: {}
28+
- SSHDriver:
29+
connection_timeout: 120.0
30+
explicit_scp_mode: True
31+
32+
images:
33+
root: !template $LG_IMAGE
34+
35+
imports:
36+
- ../strategies/tftpstrategy.py

0 commit comments

Comments
 (0)