Temat: Mwan3

Witam mam ruter TL-WR1043ND v2 z wgranym lede ,mam dwa internety z ruterami huawei b315 jeden z orange drugi z t-mobile.Próbowałem to podłączyć z tego poradnika  https://eko.one.pl/?p=openwrt-mwan3 ale kicha.jak to zrobić w najprostszy sposób z podziałem łącza np.40 na 60
Pozdrawiam jurek341

2

Odp: Mwan3

Zrób zgodnie z poradnikiem.

Piszesz "kicha" ale nie napisałeś co zrobiłeś, jak zrobiłeś i ew gdzie widzisz problem.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3 (edytowany przez jurek341 2017-12-27 11:38:50)

Odp: Mwan3

Niby się wszystko utworzyło ale oba porty wan były offline .spróbuje jeszcze raz a wyniki podam tutaj


root@OpenWrt:~# ifconfig
br-lan    Link encap:Ethernet  HWaddr C4:6E:1F:97:91:76
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd60:942e:7043::1/60 Scope:Global
          inet6 addr: fe80::c66e:1fff:fe97:9176/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3760 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4668 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:596257 (582.2 KiB)  TX bytes:3843738 (3.6 MiB)

eth0      Link encap:Ethernet  HWaddr C4:6E:1F:97:91:77
          inet addr:192.168.8.100  Bcast:192.168.8.255  Mask:255.255.255.0
          inet6 addr: fe80::c66e:1fff:fe97:9177/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3711 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2769 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3388457 (3.2 MiB)  TX bytes:470664 (459.6 KiB)
          Interrupt:4

eth1      Link encap:Ethernet  HWaddr C4:6E:1F:97:91:76
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3911 errors:0 dropped:1 overruns:0 frame:0
          TX packets:4754 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:676641 (660.7 KiB)  TX bytes:3871881 (3.6 MiB)
          Interrupt:5

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:176 errors:0 dropped:0 overruns:0 frame:0
          TX packets:176 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:13279 (12.9 KiB)  TX bytes:13279 (12.9 KiB)

root@OpenWrt:~# ping -c3 -I eth0.2 google.com
ping: bad address 'eth0.2'
root@OpenWrt:~# ping -c3 -I eth1 google.com
PING google.com (172.217.17.46): 56 data bytes

4

Odp: Mwan3

Na razie to ty nie masz eth0.2 więc nie wiem czemu chcesz pingować przez eth0.2 właśnie...

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

5

Odp: Mwan3

jak widać wan2 coś nie tak
BusyBox v1.23.2 (2017-03-01 17:53:31 CET) built-in shell (ash)


                   _            _____ _____
                  | |          / ____|_   _|
                  | |    _   _| |      | |
                  | |   | | | | |      | |
                  | |___| |_| | |____ _| |_
                  |______\__,_|\_____|_____|

----------------------------------------------------------------
|                                                              |
| OpenWrt Chaos Calmer 15.05.1 (r49484)                        |
| Build time: 2017-06-02 18:58 CEST                            |
|                                                              |
| Cezary Jackiewicz (obsy), http://eko.one.pl                  |
|                                                              |
----------------------------------------------------------------
| Machine: TP-Link TL-WR1043N/ND v2                            |
| Uptime: 0d, 00:01:54                                         |
| Load: 2.82 1.07 0.39                                         |
| Flash: total: 1.4MB, free: 908KB, used: 38%                  |
| Memory: total: 59.5MB, free: 41.1MB, used: 30%               |
| WAN: 192.168.8.100, proto: dhcp                              |
| LAN: 192.168.1.1, leases: 0                                  |
----------------------------------------------------------------
root@OpenWrt:~# mwan3 interfaces
Interface status:
interface wan is online (tracking active)
interface wan2 is offline (tracking down)

wan2 jest podłączony ruter do lan1 o adresacji 192.168.0.2
i niego właśnie nie widać

6

Odp: Mwan3

to jak zrobić echo2?

7

Odp: Mwan3

Opis jak wydzielić port z lanu: http://eko.one.pl/?p=openwrt-vlan#wydzielenieportu

Tylko przeczytaj od początku ten poradnik.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

8

Odp: Mwan3

root@OpenWrt:~#
root@OpenWrt:~# swconfig dev switch0 show | grep link:
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
        link: port:1 link:down
        link: port:2 link:down
        link: port:3 link:up speed:1000baseT full-duplex txflow rxflow eee100 eee1000 auto
        link: port:4 link:up speed:1000baseT full-duplex txflow rxflow eee100 eee1000 auto
        link: port:5 link:up speed:1000baseT full-duplex txflow rxflow eee100 eee1000 auto
        link: port:6 link:up speed:1000baseT full-duplex txflow rxflow
root@OpenWrt:~# swconfig dev switch0 help | grep switch0
switch0: ag71xx-mdio.0(Atheros AR8327), ports: 7 (cpu @ 0), vlans: 128


Scenariusz: Wydzielamy dodatkowy port WAN z LANu
Kolejny przykład - używamy dwóch połączeń kablowych od dostawców internetu, chcemy zrobić failover z wykorzystaniem mwan3 i potrzebujemy wydzielić kolejny port WAN ze switcha żeby móc podłączyć drugi kabel. Sytuacja podobna do pierwszego przypadku - z istniejącego LANu wydzielamy port LAN1 i przerabiamy go na kolejny interfejs, jednakże nie usuwany definicji istniejącego portu WAN:


    config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        ...

    config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

    config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '2 3 4 5t'

    config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 5t'

    config switch_vlan
        option device 'switch0'
        option vlan '3'
        option ports '1 5t'

    config interface 'wan2'
        option ifname 'eth0.3'
        option proto 'dhcp'

tylko nie wiem jak to zrobić

9

Odp: Mwan3

Przecież miałeś napisane w poradniku. Teraz masz wyciągnięte dwa porty  - tez  numerem 0 i ten z numerem 1, to pierwsze tworzy eth0.2, to drugie tworzy eth0.3. Do portu 0 coś masz dołączone, do portu 1 nie ma. Zrobiłeś akurat wan2 z portu eth0.3 do którego nic nie jest dołączone a chyba chciałeś zrobić na eth0.2 -> więc zamień w sekcji wan2 eth0.3 na eth0.2 i zrestartuj całość.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

10 (edytowany przez jurek341 2017-12-27 12:15:18)

Odp: Mwan3

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

config globals 'globals'
    option ula_prefix 'fd60:942e:7043::/48'

config interface 'lan'
    option ifname 'eth1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option dns '8.8.8.8 8.8.4.4'

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'
    option metric '10'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

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

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '5 6'

config interface 'wan2'
    option proto 'dhcp'
    option ifname 'eth1'
    option metric '20'




config interface 'wan'
    option enabled '1'
    list track_ip '8.8.4.4'
    list track_ip '8.8.8.8'
    list track_ip '208.67.222.222'
    list track_ip '208.67.220.220'
    option reliability '2'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    option up '8'

config interface 'wan2'
    list track_ip '8.8.8.8'
    list track_ip '208.67.220.220'
    option reliability '1'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    option up '8'
    option enabled '1'

config member 'wan_m1_w3'
    option interface 'wan'
    option metric '1'
    option weight '3'

config member 'wan_m2_w3'
    option interface 'wan'
    option metric '2'
    option weight '3'

config member 'wan2_m1_w2'
    option interface 'wan2'
    option metric '1'
    option weight '2'

config member 'wan2_m2_w2'
    option interface 'wan2'
    option metric '2'
    option weight '2'

config policy 'wan_only'
    list use_member 'wan_m1_w3'

config policy 'wan2_only'
    list use_member 'wan2_m1_w2'

config policy 'balanced'
    list use_member 'wan_m1_w3'
    list use_member 'wan2_m1_w2'

config policy 'wan_wan2'
    list use_member 'wan_m1_w3'
    list use_member 'wan2_m2_w2'

config policy 'wan2_wan'
    list use_member 'wan_m2_w3'
    list use_member 'wan2_m1_w2'

config rule 'youtube'
    option sticky '1'
    option ipset 'youtube'
    option dest_port '80,443'
    option proto 'tcp'
    option use_policy 'balanced'

config rule 'https'
    option sticky '1'
    option dest_port '443'
    option proto 'tcp'
    option use_policy 'balanced'

config rule 'default_rule'
    option dest_ip '0.0.0.0/0'
    option use_policy 'balanced'

to są moje configi

11 (edytowany przez jurek341 2017-12-27 13:11:56)

Odp: Mwan3

Cezary za chiny nie mogę wydzielić tego portu lan jeszcze raz

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

config globals 'globals'
    option ula_prefix 'fd60:942e:7043::/48'

config interface 'lan'
    option ifname 'eth1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option dns '8.8.8.8 8.8.4.4'

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'
    option metric '10'
    option dns '8.8.8.8 8.8.4.4'
    option peerdns '0'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

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

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '5 6'

config interface 'wan2'
    option proto 'dhcp'
    option ifname 'eth1'
    option metric '20'
    option dns '8.8.8.8 8.8.4.4'
    option peerdns '0'


Software versions :

OpenWrt - OpenWrt Chaos Calmer 15.05.1 r49484
LuCI - git-17.136.58961-13aa5ff

mwan3 - 1.6-2
mwan3-luci - 1.4-3

Output of "cat /etc/config/mwan3" :

config interface 'wan'
    option enabled '1'
    list track_ip '8.8.4.4'
    list track_ip '8.8.8.8'
    list track_ip '208.67.222.222'
    list track_ip '208.67.220.220'
    option reliability '2'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    option up '8'

config interface 'wan2'
    list track_ip '8.8.8.8'
    list track_ip '208.67.220.220'
    option reliability '1'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    option up '8'
    option enabled '1'

config member 'wan_m1_w3'
    option interface 'wan'
    option metric '1'
    option weight '3'

config member 'wan_m2_w3'
    option interface 'wan'
    option metric '2'
    option weight '3'

config member 'wan2_m1_w2'
    option interface 'wan2'
    option metric '1'
    option weight '2'

config member 'wan2_m2_w2'
    option interface 'wan2'
    option metric '2'
    option weight '2'

config policy 'wan_only'
    list use_member 'wan_m1_w3'

config policy 'wan2_only'
    list use_member 'wan2_m1_w2'

config policy 'balanced'
    list use_member 'wan_m1_w3'
    list use_member 'wan2_m1_w2'

config policy 'wan_wan2'
    list use_member 'wan_m1_w3'
    list use_member 'wan2_m2_w2'

config policy 'wan2_wan'
    list use_member 'wan_m2_w3'
    list use_member 'wan2_m1_w2'

config rule 'youtube'
    option sticky '1'
    option ipset 'youtube'
    option dest_port '80,443'
    option proto 'tcp'
    option use_policy 'balanced'

config rule 'https'
    option sticky '1'
    option dest_port '443'
    option proto 'tcp'
    option use_policy 'balanced'

config rule 'default_rule'
    option dest_ip '0.0.0.0/0'
    option use_policy 'balanced'

Output of "cat /etc/config/network" :

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

config globals 'globals'
    option ula_prefix 'fd60:942e:7043::/48'

config interface 'lan'
    option ifname 'eth1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option dns '8.8.8.8 8.8.4.4'

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'
    option metric '10'
    option dns '8.8.8.8 8.8.4.4'
    option peerdns '0'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

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

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '5 6'

config interface 'wan2'
    option proto 'dhcp'
    option ifname 'eth1'
    option metric '20'
    option dns '8.8.8.8 8.8.4.4'
    option peerdns '0'

Output of "ifconfig" :

br-lan    Link encap:Ethernet  HWaddr C4:6E:1F:97:91:76 
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd60:942e:7043::1/60 Scope:Global
          inet6 addr: fe80::c66e:1fff:fe97:9176/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13074 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12558 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2248694 (2.1 MiB)  TX bytes:4083531 (3.8 MiB)

eth0      Link encap:Ethernet  HWaddr C4:6E:1F:97:91:77 
          inet addr:192.168.0.101  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::c66e:1fff:fe97:9177/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8237 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7833 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2763642 (2.6 MiB)  TX bytes:1636352 (1.5 MiB)
          Interrupt:4

eth1      Link encap:Ethernet  HWaddr C4:6E:1F:97:91:76 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13565 errors:0 dropped:5 overruns:0 frame:0
          TX packets:12858 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2550768 (2.4 MiB)  TX bytes:4191822 (3.9 MiB)
          Interrupt:5

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:452 (452.0 B)  TX bytes:452 (452.0 B)

wlan0     Link encap:Ethernet  HWaddr C4:6E:1F:97:91:76 
          inet6 addr: fe80::c66e:1fff:fe97:9176/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1520 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:234169 (228.6 KiB)

Output of "route -n" :

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    10     0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     10     0        0 eth0
192.168.0.1     0.0.0.0         255.255.255.255 UH    10     0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan

Output of "ip rule show" :

0:    from all lookup 128
1:    from all lookup local
1001:    from all iif eth0 lookup main
2001:    from all fwmark 0x100/0xff00 lookup 1
2253:    from all fwmark 0xfd00/0xff00 blackhole
2254:    from all fwmark 0xfe00/0xff00 unreachable
32766:    from all lookup main
32767:    from all lookup default

Output of "ip route list table 1-250" :

1
default via 192.168.0.1 dev eth0

Firewall default output policy (must be ACCEPT) :

ACCEPT

Output of "iptables -L -t mangle -v -n" :


możesz poprawić te pliki

12

Odp: Mwan3

Ale mieszasz. Zdecyduj się w końcu co pokazujesz, bo teraz lan jest inaczej - na eth1. Co i tak jest źle, bo eth1.1  jak już... I nie masz podzielonego switcha...

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

13

Odp: Mwan3

namieszane bo niestety nie daje sobie z tym rady

14

Odp: Mwan3

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

config globals 'globals'
    option ula_prefix 'fd56:6288:2257::/48'

config interface 'lan'
    option ifname 'eth1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option dns '8.8.8.8 8.8.4.4'

config interface 'lan'
    option ifname 'eth1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option dns '8.8.8.8 8.8.4.4'

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'
    option metric '10'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

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

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '5 6'

config interface 'wan2'
    option proto 'dhcp'
    option ifname 'eth1'
    option metric '20'

Witam prosszę o pomoc

15

Odp: Mwan3

Wydziel port ze switcha. Z którą częścią z poradnika masz problem i nie rozumiesz opisu?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

16

Odp: Mwan3

no właśnie wydziel port ze switcha

17

Odp: Mwan3

Ale czego konkretnie. Przeczytałeś poradnik? Wykonałeś polecenia?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.