Potrzebuję zrobić config wg poniższego schematu, ale tylko dla podsieci będących w bazie lms.
Nie widzę możliwości zrobienia tego za pomocą modułów tc, tc-ng czy lms-mgc.
Poprawcie mnie, jeśli się mylę.
tc filter add dev imq4 parent 10:0 prio 4 handle 1: protocol ip u32 divisor 256
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.1.1.0/24 hashkey mask 0x000000ff at 16 link 1:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.2.1.0/24 hashkey mask 0x000000ff at 16 link 1:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.3.1.0/24 hashkey mask 0x000000ff at 16 link 1:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.4.1.0/24 hashkey mask 0x000000ff at 16 link 1:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.5.1.0/24 hashkey mask 0x000000ff at 16 link 1:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.6.1.0/24 hashkey mask 0x000000ff at 16 link 1:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.7.1.0/24 hashkey mask 0x000000ff at 16 link 1:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.8.1.0/24 hashkey mask 0x000000ff at 16 link 1:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.9.1.0/24 hashkey mask 0x000000ff at 16 link 1:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.10.1.0/24 hashkey mask 0x000000ff at 16 link 1:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 192.168.1.0/24 hashkey mask 0x000000ff at 16 link 1:
tc filter add dev imq4 parent 10:0 prio 4 handle 2: protocol ip u32 divisor 256
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.1.2.0/24 hashkey mask 0x000000ff at 16 link 2:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.2.2.0/24 hashkey mask 0x000000ff at 16 link 2:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.3.2.0/24 hashkey mask 0x000000ff at 16 link 2:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.4.2.0/24 hashkey mask 0x000000ff at 16 link 2:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.5.2.0/24 hashkey mask 0x000000ff at 16 link 2:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.6.2.0/24 hashkey mask 0x000000ff at 16 link 2:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.7.2.0/24 hashkey mask 0x000000ff at 16 link 2:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.8.2.0/24 hashkey mask 0x000000ff at 16 link 2:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.9.2.0/24 hashkey mask 0x000000ff at 16 link 2:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 10.10.2.0/24 hashkey mask 0x000000ff at 16 link 2:
tc filter add dev imq4 protocol ip parent 10:0 prio 4 u32 ht 800:: match ip dst 192.168.2.0/24 hashkey mask 0x000000ff at 16 link 2:
..... itd.
w skrócie:
dla każdej podsieci potrzebuje wyciągnąć z bazy adres sieci z maską i 3 oktet adresu sieci.
Wersja LMS: 1.11.10 Kri (1.1026/1.30)
Wersja PostgreSQL: 8.4.7
Z góry dzięki za pomoc.
malpio