TP15: CRS326-Core als L3-Router aktiviert
- crs326-core nimmt Routing/DHCP/DNS/NAT/WAN/WireGuard von ap1 ueber. - L2-Portplan korrigiert (ap1 #15, Arris WAN #16, branch #8, Sonos #2/3/5/6, IoT #14, VLAN10-Access #11, VLAN1-Hybrid #3/7/9/10/12/17-24). - Backup-RSC gefixt (ether3-24 disabled) und via fixed-RSC eingespielt. - Gestagede L3-Config enabled in einem Rutsch. - Falsche statische Default-Route 0.0.0.0/0 -> 10.40.41.1 entfernt, WAN-DHCP via 90.146.33.177/24 aktiv. - SFP-Ports bleiben disabled (Stromersparnis). - ap1 ist L3-stillgelegt und wird in naechster Session reiner AP. Backup-Dateien (*.backup) und leases-export.json bleiben lokal. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
37
routeros/fix-core-rsc.py
Normal file
37
routeros/fix-core-rsc.py
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
import re
|
||||
|
||||
src = "/Users/christophemsenhuber/dev/bf-network-r6/routeros/crs326-core-pre-cutover-20260806-073712.rsc"
|
||||
dst = "/Users/christophemsenhuber/dev/bf-network-r6/routeros/crs326-core-pre-cutover-20260806-073712-fixed.rsc"
|
||||
|
||||
with open(src) as f:
|
||||
lines = f.readlines()
|
||||
|
||||
out = []
|
||||
i = 0
|
||||
while i < len(lines):
|
||||
line = lines[i]
|
||||
if line.startswith("add admin-mac=04:F4:1C:B4:17:76 auto-mac=no comment=defconf name=bridge"):
|
||||
out.append("set [find name=bridge] admin-mac=04:F4:1C:B4:17:76 auto-mac=no vlan-filtering=yes\n")
|
||||
i += 1
|
||||
while i < len(lines) and (lines[i].startswith(" ") or lines[i].strip().startswith("vlan-filtering")):
|
||||
i += 1
|
||||
continue
|
||||
if re.match(r'set \[ find default-name=ether(3|4|5|6|7|8|9|1[0-9]|2[0-4]) \] disabled=yes', line):
|
||||
i += 1
|
||||
continue
|
||||
if line.startswith("/interface bridge port"):
|
||||
out.append(line)
|
||||
i += 1
|
||||
while i < len(lines) and not lines[i].startswith("/"):
|
||||
i += 1
|
||||
out.append("set [find interface=ether2] pvid=40\n")
|
||||
out.append("set [find interface=ether3] pvid=40\n")
|
||||
out.append("set [find interface=ether5] pvid=40\n")
|
||||
continue
|
||||
out.append(line)
|
||||
i += 1
|
||||
|
||||
with open(dst, "w") as f:
|
||||
f.writelines(out)
|
||||
print("fixed rsc written to", dst)
|
||||
Reference in New Issue
Block a user