слияние

This commit is contained in:
2025-03-17 19:00:41 +10:00
parent 1c41ce4816
commit 266c8665fc
7 changed files with 638 additions and 155 deletions
Executable
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
#interface=("sfp28-9-ISP1-MTS" "sfp28-10-ISP2-TTK" "sfp28-11-ISP3-MEG")
#vlans=("960" "152" "876")
interface=("sfp28-1-BRAS1" "sfp28-2-BRAS2" "sfp28-3-BRAS3" "sfp28-4-BRAS4")
vlans=("2" "3" "4" "5")
for (( i=0; i<"${#interface[@]}"; i++ )); do
for c in $(cat ./unloading/google_v4.txt); do
ip=$(echo $c | grep -Eo "([0-9]{1,3}\.){3}[0-9]{1,3}\/[0-9]{1,2}" | tr -d '\r\n')
[ ! -z "$ip" ] && echo "/interface/ethernet/switch/rule/add switch=switch1 ports=${interface[i]} vlan-id=${vlans[i]} src-address=$ip dst-address=91.235.144.222/32 new-dst-ports=sfp28-8-DPI new-vlan-id=6"
done
done