1 (edytowany przez kamilos 2012-02-27 09:57:00)

Temat: Loadbalancing - 80% ruchu na WAN i 20% na 3G czy możliwe?

Gargoyl postawiony na TL-MR3420 + E173 Tmobile. działa na WAN i dodatkowo włączony jest modem, ale ruch przez niego nie idzie, wgrany multiwan, co jeszcze ustawić ? sieci się przełączają jak pada jedna to ruch przechodzi na drugą, chciałem zrobić z tego loadbalancing 80% na 20%, co pozmieniać?  :

multiwan

config 'multiwan' 'config'
        option 'default_route' 'balancer'

config 'interface' 'wan'
        option 'weight' '10'
        option 'health_interval' '10'
        option 'icmp_hosts' 'dns'
        option 'timeout' '3'
        option 'health_fail_retries' '3'
        option 'health_recovery_retries' '5'
        option 'failover_to' 'wan2'
        option 'dns' '89.25.151.1 85.14.85.14'

config 'interface' 'wan2'
        option 'weight' '10'
        option 'health_interval' '10'
        option 'icmp_hosts' 'gateway'
        option 'timeout' '3'
        option 'health_fail_retries' '3'
        option 'health_recovery_retries' '5'
        option 'failover_to' 'balancer'
        option 'dns' '213.158.199.1 213.158.199.5'

dns ustawione tak jak w network, bo się chrzaniło jak cholera na auto lub 8.8.8.8
Proszę o pomoc czy to w ogóle możliwe podzielić ruch na dwa interfejsy?

2

Odp: Loadbalancing - 80% ruchu na WAN i 20% na 3G czy możliwe?

Dziwne to wszystko po rozłączeniu WAN nie przełącza na 3G (3ginfo -modem połączony), wpisałem tylko poprawne dns do multiwan.

zrzut z logread:

Feb 27 10:01:51 Gargoyle user.info kernel: eth1: link down
Feb 27 10:02:02 Gargoyle daemon.info hostapd: wlan0: STA 8c:a9:82:52:fe:ba IEEE                            802.11: authenticated
Feb 27 10:02:02 Gargoyle daemon.info hostapd: wlan0: STA 8c:a9:82:52:fe:ba IEEE                            802.11: associated (aid 1)
Feb 27 10:02:02 Gargoyle daemon.info hostapd: wlan0: STA 8c:a9:82:52:fe:ba WPA:                            pairwise key handshake completed (RSN)
Feb 27 10:02:02 Gargoyle daemon.info dnsmasq-dhcp[2280]: DHCPREQUEST(br-lan) 192                           .168.1.104 8c:a9:82:52:fe:ba
Feb 27 10:02:02 Gargoyle daemon.info dnsmasq-dhcp[2280]: DHCPACK(br-lan) 192.168                           .1.104 8c:a9:82:52:fe:ba VPCSB
Feb 27 10:02:18 Gargoyle user.notice multiwan: wan has failed and is currently o                           ffline.
Feb 27 10:02:20 Gargoyle daemon.warn dnsmasq[2280]: no servers found in /tmp/res                           olv.conf.auto, will retry
Feb 27 10:03:01 Gargoyle cron.err crond[2230]: USER root pid 5023 cmd /bin/3gtes                           ter
Feb 27 10:03:24 Gargoyle authpriv.info dropbear[5168]: Child connection from 192                           .168.1.104:61603
Feb 27 10:03:36 Gargoyle authpriv.notice dropbear[5168]: Password auth succeeded                            for 'root' from 192.168.1.104:61603
Feb 27 10:04:21 Gargoyle user.info kernel: eth1: link up (100Mbps/Full duplex)

proszę o pomoc !

3

Odp: Loadbalancing - 80% ruchu na WAN i 20% na 3G czy możliwe?

doszedłem do tego że interfejsy się przełączają, niestety coś jest z DNS po przełączeniu z WAN na 3g nie można skorzystać z WWW, po przełączeniu z powrotem na WAN dalej nie można korzystać z www, trzeba wykonać multiwan restart i wszystko wraca do normy. Co zrobić?
zawartość plików:

multiwan

config 'multiwan' 'config'
        option 'health_monitor' 'serial'
        option 'default_route' 'balancer'

config 'interface' 'wan'
        option 'health_interval' '10'
        option 'icmp_hosts' 'dns'
        option 'timeout' '3'
        option 'health_fail_retries' '3'
        option 'health_recovery_retries' '5'
        option 'weight' '8'
        option 'failover_to' 'wan2'
        option 'dns' 'auto'

config 'interface' 'wan2'
        option 'health_interval' '10'
        option 'icmp_hosts' 'gateway'
        option 'timeout' '3'
        option 'health_fail_retries' '3'
        option 'health_recovery_retries' '5'
        option 'weight' '2'
        option 'failover_to' 'balancer'
        option 'dns' 'auto'


network:
config 'interface' 'loopback'
        option 'ifname' 'lo'
        option 'proto' 'static'
        option 'ipaddr' '127.0.0.1'
        option 'netmask' '255.0.0.0'

config 'interface' 'lan'
        option 'ifname' 'eth0'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' '192.168.1.1'
        option 'netmask' '255.255.255.0'
        option 'dns' '192.168.1.1'

config 'interface' 'wan'
        option 'auto' '1'
        option 'ifname' 'eth1'
        option 'proto' 'dhcp'
        option 'dns' '89.25.151.1 85.14.85.14'
        option 'defaultroute' '0'

config 'switch' 'eth0'
        option 'enable_vlan' '1'

config 'switch_vlan'
        option 'device' 'eth0'
        option 'vlan' '1'
        option 'ports' '0 1 2 3 4'

config 'interface' 'wan2'
        option 'proto' '3g'
        option 'service' 'umts'
        option 'device' '/dev/ttyUSB0'
        option 'apn' 'internet'
        option 'dns' '213.158.199.1 213.158.199.5'
        option 'auto' '1'
        option 'defaultroute' '0'


i firewall:

config 'defaults'
        option 'syn_flood' '1'
        option 'input' 'ACCEPT'
        option 'output' 'ACCEPT'
        option 'forward' 'REJECT'

config 'zone'
        option 'name' 'lan'
        option 'network' 'lan'
        option 'input' 'ACCEPT'
        option 'output' 'ACCEPT'
        option 'forward' 'REJECT'

config 'zone'
        option 'name' 'wan'
        option 'network' 'wan'
        option 'input' 'REJECT'
        option 'output' 'ACCEPT'
        option 'forward' 'REJECT'
        option 'masq' '1'
        option 'mtu_fix' '1'

config 'forwarding'
        option 'src' 'lan'
        option 'dest' 'wan'

config 'rule'
        option 'name' 'Allow-DHCP-Renew'
        option 'src' 'wan'
        option 'proto' 'udp'
        option 'dest_port' '68'
        option 'target' 'ACCEPT'
        option 'family' 'ipv4'

config 'rule'
        option 'name' 'Allow-Ping'
        option 'src' 'wan'
        option 'proto' 'icmp'
        option 'icmp_type' 'echo-request'
        option 'family' 'ipv4'
        option 'target' 'ACCEPT'

config 'rule'
        option 'name' 'Allow-DHCPv6'
        option 'src' 'wan'
        option 'proto' 'udp'
        option 'src_ip' 'fe80::/10'
        option 'src_port' '547'
        option 'dest_ip' 'fe80::/10'
        option 'dest_port' '546'
        option 'family' 'ipv6'
        option 'target' 'ACCEPT'

config 'rule'
        option 'name' 'Allow-ICMPv6-Input'
        option 'src' 'wan'
        option 'proto' 'icmp'
        option 'limit' '1000/sec'
        option 'family' 'ipv6'
        option 'target' 'ACCEPT'
        list 'icmp_type' 'echo-request'
        list 'icmp_type' 'destination-unreachable'
        list 'icmp_type' 'packet-too-big'
        list 'icmp_type' 'time-exceeded'
        list 'icmp_type' 'bad-header'
        list 'icmp_type' 'unknown-header-type'
        list 'icmp_type' 'router-solicitation'
        list 'icmp_type' 'neighbour-solicitation'

config 'rule'
        option 'name' 'Allow-ICMPv6-Forward'
        option 'src' 'wan'
        option 'dest' '*'
        option 'proto' 'icmp'
        option 'limit' '1000/sec'
        option 'family' 'ipv6'
        option 'target' 'ACCEPT'
        list 'icmp_type' 'echo-request'
        list 'icmp_type' 'destination-unreachable'
        list 'icmp_type' 'packet-too-big'
        list 'icmp_type' 'time-exceeded'
        list 'icmp_type' 'bad-header'
        list 'icmp_type' 'unknown-header-type'

config 'include'
        option 'path' '/etc/firewall.user'

config 'include'
        option 'path' '/usr/lib/gargoyle_firewall_util/gargoyle_additions.firewall'

config 'zone'
        option 'name' 'wan2'
        option 'network' 'wan2'
        option 'input' 'REJECT'
        option 'output' 'ACCEPT'
        option 'forward' 'REJECT'
        option 'masq' '1'
        option 'mtu_fix' '1'

config 'forwarding'
        option 'src' 'lan'
        option 'dest' 'wan2'

4

Odp: Loadbalancing - 80% ruchu na WAN i 20% na 3G czy możliwe?

ustaw dla obydwu laczy DNSa ogolnodostepnego np od googla 8.8.8.8