1 (edytowany przez podtor 2019-04-13 18:38:41)

Temat: Brak dostępu do repeatera od routera głównego

Potrzebowałem zwiększyć zasięg sieci WiFi i użyłem do tego drugiego routera. Ustawiłem repeater korzystając m.in. z opisu  most_bezprzewodowy oraz z relayclient
Praktycznie wszystko działa ale nie mogę dostać się do drugiego routera jeżeli jestem w sieci routera głównego. Jeżeli jestem w sieci drugiego routera (repeatera) to mogę połączyć się z jednym jak drugiem routerem.

Poniżej konfiguracja routera głównego (network, dhcp i firewall) oraz repeatera (network). Prośba o pomoc bo za dobry w konfiguracji nie jestem. Ewentualnie jaki plik wkleić ?


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 'fd9b:90f0:bd47::/48'

config interface 'lan'
    option type 'bridge'
    option ifname 'eth0.1'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config device 'lan_dev'
    option name 'eth0.1'
    option macaddr 'xx:xx:xx:xx:xx:19'

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

config device 'wan_dev'
    option name 'eth0.2'
    option macaddr 'xx:xx:xx:xx:xx:18'

config interface 'wan6'
    option ifname 'eth0.2'
    option proto 'dhcpv6'

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 6t'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '4 6t'

dhcp

config dnsmasq
    option domainneeded '1'
    option boguspriv '1'
    option filterwin2k '0'
    option localise_queries '1'
    option rebind_protection '1'
    option rebind_localhost '1'
    option local '/lan/'
    option domain 'lan'
    option expandhosts '1'
    option nonegcache '0'
    option authoritative '1'
    option readethers '1'
    option leasefile '/tmp/dhcp.leases'
    option resolvfile '/tmp/resolv.conf.auto'
    option nonwildcard '1'
    option localservice '1'
    list rebind_domain 'free.aero2.net.pl'

config dhcp 'lan'
    option interface 'lan'
    option start '100'
    option limit '150'
    option leasetime '12h'
    option dhcpv6 'server'
    option ra 'server'

config dhcp 'wan'
    option interface 'wan'
    option ignore '1'

config odhcpd 'odhcpd'
    option maindhcp '0'
    option leasefile '/tmp/hosts/odhcpd'
    option leasetrigger '/usr/sbin/odhcpd-update'
    option loglevel '4'

firewall

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

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

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

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-IGMP'
    option src 'wan'
    option proto 'igmp'
    option family 'ipv4'
    option target 'ACCEPT'

config rule
    option name 'Allow-DHCPv6'
    option src 'wan'
    option proto 'udp'
    option src_ip 'fc00::/6'
    option dest_ip 'fc00::/6'
    option dest_port '546'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-MLD'
    option src 'wan'
    option proto 'icmp'
    option src_ip 'fe80::/10'
    list icmp_type '130/0'
    list icmp_type '131/0'
    list icmp_type '132/0'
    list icmp_type '143/0'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Input'
    option src 'wan'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    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'
    list icmp_type 'router-advertisement'
    list icmp_type 'neighbour-advertisement'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Forward'
    option src 'wan'
    option dest '*'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    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'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-IPSec-ESP'
    option src 'wan'
    option dest 'lan'
    option proto 'esp'
    option target 'ACCEPT'

config rule
    option name 'Allow-ISAKMP'
    option src 'wan'
    option dest 'lan'
    option dest_port '500'
    option proto 'udp'
    option target 'ACCEPT'

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

network repeatera

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 'fd62:36cd:2fb3::/48'

config interface 'lan'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.3.1'
    option netmask '255.255.255.0'
    option gateway '192.168.1.1'
    option dns '192.168.1.1'
    option ip6assign '60'
    option ifname 'eth0.1'

config device 'lan_dev'
    option name 'eth0.1'
    option macaddr 'xx:xx:xx:xx:xx:e8'

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

config device 'wan_dev'
    option name 'eth0.2'
    option macaddr 'xx:xx:xx:xx:xx:e7'

config interface 'wan6'
    option ifname 'eth0.2'
    option proto 'dhcpv6'

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

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

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

config interface 'wwan'
    option proto 'dhcp'

config interface 'bridge'
    option proto 'relay'
    option network 'lan wwan'
    option ipaddr '192.168.1.118'

Na stronie relay_configuration znalazłem jeszcze coś takiego ale nie wiem jak to wykorzystać w aktualnym OpenWrt

Accessing the LEDE device

With this setup your LEDE device itself may only be accessible from those computers directly connected to the W-LAN AP, not from the ones connected to the LEDE W-LAN client only, when in the 192.168.1.0 subnet. It is however still possible to access the LEDE box via its 192.168.2.1 address, when you are in that subnet. One way of being in both subnets at the same time with a Linux client is by adding a second, a virtual network interface to /etc/network/interfaces:

iface eth0 inet dhcp
  gateway 192.168.1.1

auto eth0:1
iface eth0:1 inet static
    address 192.168.2.102
    netmask 255.255.255.0
    broadcast 192.168.2.255

NETGEAR r6220: link --> tworzenie buildu
NETGEAR r6220: link --> przywracanie oryginalnego oprogramowania za pomocą nmrpflash
NETGERA r6220: link --> sterownik mt76

2

Odp: Brak dostępu do repeatera od routera głównego

Na adres 192.168.1.118 powinieneś się dostać, jeżeli faktycznie taki adres dostajesz od głównego routera.

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

3

Odp: Brak dostępu do repeatera od routera głównego

Ping z routera głównego do repeatera (jest ok)   

PING 192.168.1.118 (192.168.1.118): 56 data bytes
64 bytes from 192.168.1.118: seq=0 ttl=64 time=1.160 ms
64 bytes from 192.168.1.118: seq=1 ttl=64 time=0.866 ms
64 bytes from 192.168.1.118: seq=2 ttl=64 time=1.082 ms
64 bytes from 192.168.1.118: seq=3 ttl=64 time=2.671 ms
64 bytes from 192.168.1.118: seq=4 ttl=64 time=19.959 ms

--- 192.168.1.118 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.866/5.147/19.959 ms

Ping z kompa podłączonego do routera głównego do repeatera (host nieosiągalny). Wyłączyłem nawet firewalle /etc/init.d/firewall stop na obu routerach i dalej to samo.

C:\Users\abc>ping 192.168.1.118

Pinging 192.168.1.118 with 32 bytes of data:
Reply from 192.168.1.219: Destination host unreachable.
Reply from 192.168.1.219: Destination host unreachable.
Reply from 192.168.1.219: Destination host unreachable.
Reply from 192.168.1.219: Destination host unreachable.

Ping statistics for 192.168.1.118:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
NETGEAR r6220: link --> tworzenie buildu
NETGEAR r6220: link --> przywracanie oryginalnego oprogramowania za pomocą nmrpflash
NETGERA r6220: link --> sterownik mt76

4

Odp: Brak dostępu do repeatera od routera głównego

A musi. Bo to jedyny sposób. Jaki to router, jaka to wersja openwrt?

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

5

Odp: Brak dostępu do repeatera od routera głównego

Nie musi pingować i nie musi być dostępu do luci ale bardziej zastanawia mnie czemu to nie działa. Repeater to D-Link DWR-118 A1 z OpenWrt SNAPSHOT r986.

Repeater działa tylko na 2,4GHz bo na 5GHz ma zasięg do dwóch metrów od routera głównego. Możliwe, że to problem sterowników w tym D-Linku ale nie da się używać 5GHz. Na oryginalnym firmware 5G działa normalnie.

Co ciekawe mam też starego TP-LINKA WR740Nv1 i z nim bez problemu wszystko działa (ping, dostęp do luci, repeatowanie). Porównywałem configi WR740N i DWR-118 A1 ale bez rezultatu.

NETGEAR r6220: link --> tworzenie buildu
NETGEAR r6220: link --> przywracanie oryginalnego oprogramowania za pomocą nmrpflash
NETGERA r6220: link --> sterownik mt76

6

Odp: Brak dostępu do repeatera od routera głównego

Nie posiadam 118 więc nie sprawdzę tego. Ale skoro działa ci na 740 to błędu konfiguracyjnego nie zrobiłeś tylko problem jest gdzieś w architekturze/sterownikach.

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

7

Odp: Brak dostępu do repeatera od routera głównego

Raz udało mi się połączyć z repteaterem po wyłączeniu DHCPv6

config globals 'globals' 

chciałem potwierdzić czy to faktycznie jest to więc znowu dodałem option ula_prefix i usunąłem ale po tym zabiegu nie udało się już drugi raz połączyć.

Jak najlepiej globalnie wyłączyć DHCPv6?

NETGEAR r6220: link --> tworzenie buildu
NETGEAR r6220: link --> przywracanie oryginalnego oprogramowania za pomocą nmrpflash
NETGERA r6220: link --> sterownik mt76

8

Odp: Brak dostępu do repeatera od routera głównego

Dodaj do /etc/sysctl.conf:

# disable IPv6
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
net.ipv6.conf.all.forwarding=0
net.ipv6.conf.eth0.disable_ipv6=1
net.ipv6.conf.eth1.disable_ipv6=1

I restart routera albo wykoanie polecenia:

sysctl -p /etc/sysctl.conf

9

Odp: Brak dostępu do repeatera od routera głównego

Jesteś pewien jaki IP otrzymał twój most od serwera DHCP.
Opcja

config interface 'bridge'
    [...]
    option ipaddr '192.168.1.118'

Nie przypisuje IP do routera:

Usage: relayd <options>

Options:
    -d                    Enable debug messages
    -i <ifname>    Add an interface for relaying
    -I <ifname>    Same as -i, except with ARP cache and host route management
                            You need to specify at least two interfaces
    -G <ip>           Set a gateway IP for clients
    -R <gateway>:<net>/<mask>
                            Add a static route for <net>/<mask> via <gateway>
    -t <timeout>   Host entry expiry timeout
    -p <tries>        Number of ARP ping attempts before considering a host dead
    -T <table>       Set routing table number for automatically added routes
    -B                     Enable broadcast forwarding
    -D                     Enable DHCP forwarding
    -P                     Disable DHCP options parsing
    -L <ipaddr>     Enable local access using <ipaddr> as source address

Zaloguj się do routera po LAN i zobacz co daje

# ifconfig
# route -n

Ja ustawiłem statyczne adresy na obu interface'ach. Tak na wszelki wypadek.

GUI jest przereklamowane

ASUS WL-500gP v2, TP-Link TL-MR3420 v2, TP-Link TL-WR1043ND v3, TP-Link TL-WDR4300 v1, D-Link DWR-921 C3,
Netgear R6220

10

Odp: Brak dostępu do repeatera od routera głównego

Ja przy relayd robię ten skrypt a nie wpisuję na sztywno IP https://eko.one.pl/?p=openwrt-sta#dostpdoroutera

11 (edytowany przez podtor 2019-04-15 21:39:21)

Odp: Brak dostępu do repeatera od routera głównego

route -n.
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan1
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan

Wyjąłem z szafy jeszcze dwa stare routery TP-LINK WR842NDv1 i  TP-LINK MR3220v1 i na obu działa dostęp z głownego router a z D-Link DWR-118 A1 nie.

Dodatkowo (o czym wspomniałem wcześniej) w tym D-Linku DWR-118 A1 wifi 5GHz działa do 2-3 metrów na OpenWrt. Na oryginalnych sterownikach zasięg 7-8 metrów. Chyba odstawię go do szafy na dwa miesiac. Może na wakacje będą lepsze sterowniki do niego.

NETGEAR r6220: link --> tworzenie buildu
NETGEAR r6220: link --> przywracanie oryginalnego oprogramowania za pomocą nmrpflash
NETGERA r6220: link --> sterownik mt76

12

Odp: Brak dostępu do repeatera od routera głównego

Dziękuję za wersję full jest bardzo ciekawa ale problem z 5G cały czas pozostał. Wgrałem jeszcze raz oryginaly soft bo już sam sobie przestałem wierzyć ale jednak na oryginalnym sofcie jest ok i telefon w aplikacji Meteor pokazał ping 20ms i download 80Mbps z odległości około ośmiu metrów.

NETGEAR r6220: link --> tworzenie buildu
NETGEAR r6220: link --> przywracanie oryginalnego oprogramowania za pomocą nmrpflash
NETGERA r6220: link --> sterownik mt76