2) провайдер 1 = 100Мбит
3) провайдер 2 = 20Мбит
options ROUTETABLES=3
setfib 0 netstat -rn = default inet_ip-1
setfib 1 netstat -rn = default inet2_ip-1
setfib 2 netstat -rn = default inet2_ip-1
загоняю 580 городских сетей в table 8
Код: Выделить всё
${fwcmd} add 9010 skipto 9060 ip from 192.168.1.0/24,192.168.2.0/24,192.168.3.0/24 to any in recv ${int1_if}
#${fwcmd} add 9020 setfib 2 ip from 172.16.0.0/27,192.168.0.0/24 to table\(8\) keep-state
${fwcmd} add 9040 setfib 0 ip from 172.16.0.0/27,192.168.0.0/24 to any keep-state
${fwcmd} add 9050 allow ip from any to any via ${int3_if}
${fwcmd} add 9055 allow ip from any to any via ${int1_if}
${fwcmd} add 9060 setfib 1 ip from 192.168.1.0/24,192.168.2.0/24,192.168.3.0/24 to any in recv ${int1_if} keep-state
${fwcmd} add 9070 allow ip from any to any via ${int1_if}
#${fwcmd} nat 1 config log if ${inet2_if} deny_in same_ports unreg_only
${fwcmd} nat 2 config log if ${inet_if} deny_in same_ports unreg_only
${fwcmd} nat 3 config log if ${inet2_if} deny_in same_ports unreg_only
#${fwcmd} add 10030 nat 1 all from 172.16.0.0/28 to any out recv ${int3_if} xmit ${inet2_if}
#${fwcmd} add 10040 nat 1 all from 172.16.0.16/29 to any out recv ng[012] xmit ${inet2_if}
#${fwcmd} add 10050 nat 1 all from 192.168.0.0/24 to any out recv ${int1_if} xmit ${inet2_if}
${fwcmd} add 10100 nat 2 all from me to any out xmit ${inet_if}
${fwcmd} add 10110 nat 2 all from 172.16.0.0/28 to any out recv ${int3_if} xmit ${inet_if}
${fwcmd} add 10120 nat 2 all from 172.16.0.16/29 to any out recv ng[012] xmit ${inet_if}
${fwcmd} add 10130 nat 2 all from 192.168.0.0/24 to any out recv ${int1_if} xmit ${inet_if}
${fwcmd} add 10150 nat 3 all from 192.168.1.0/24,192.168.2.0/24,192.168.3.0/24 to any out recv ${int1_if} xmit ${inet2_if}
# <<<=======
#${fwcmd} add 10240 nat 1 all from any to ${inet2_ip} in recv ${inet2_if}
${fwcmd} add 10250 nat 2 all from any to ${inet_ip} in recv ${inet_if}
${fwcmd} add 10270 nat 3 all from any to ${inet2_ip} in recv ${inet2_if}
снимаю комменты для 1го НАТа, что бы запустить пиринг для 172.16.0.0/27,192.168.0.0/24 на table 8 и перестает работать 3й НАТ
у меня есть в этой сети ${inet2_if}, еще IP если могут помочь
но я не могу создать еще 1 интерфейс для пиринга
Код: Выделить всё
ifconfig piring inet ${inet_ip}+1 netmask 255.255.255.248 vlan 557 vlandev bge0
ifconfig: SIOCSETVLAN: File exists
Код: Выделить всё
ifconfig_vlan110="inet ${inet_ip} netmask 255.255.255.252 vlan 110 vlandev bge0"
ifconfig_vlan557="inet ${inet2_ip} netmask 255.255.255.248 vlan 557 vlandev bge0"