1

Temat: Dwie niezależne sieci na jednym routerze

Na początku pragnę was przywitać jako nowy użytkownik tego forum, mam nadzieję że dobrze trafiłem. Ostatnim czasem bawię się OpenWRT 15.05, chciałbym utworzyć 2 SSID, jedna by odpowiadała za Internet ciągnięty z WANa, druga robiła jako AP+Client. Niestety nie posiadam routera z dualbandem, ponieważ gdy wprowadzam do wireless config wifi-device 'radio1', następnie w konsoli uci commit | wifi | logread, w tedy wifi nie wstaję, bo w logread jest że nie można uruchomić radio1 (chyba to jest zarezerwowane dla pasma 5GHz), gdybym miał ten dualband, to byłoby z górki, a bez tego dualbandu, nie wiem co począć dalej, zrobić może VLAN (eth0.1, eth0.2), czy coś innego.  Jakbyście wytłumaczyli mi tak łopatologicznie co trzeba zrobić, byłbym wdzięczny.

2

Odp: Dwie niezależne sieci na jednym routerze

http://eko.one.pl/?p=openwrt-ath9k#trybapapclient

Dokładnie tak. Jedna konfiguracja jako sta (klient) podłączony pod wan i druga robiąca "wirtualnego ap" na tym samym radiu jako lan

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

3 (edytowany przez jOELZ 2015-10-01 13:18:55)

Odp: Dwie niezależne sieci na jednym routerze

Cezary napisał/a:

http://eko.one.pl/?p=openwrt-ath9k#trybapapclient

Dokładnie tak. Jedna konfiguracja jako sta (klient) podłączony pod wan i druga robiąca "wirtualnego ap" na tym samym radiu jako lan

Utworzyło pomyślnie 2 sieci, tylko z tej drugiej co ma pobierać Internet od innego routera nie działa.
wireless

config wifi-device 'radio0'
    option type 'mac80211'
    option hwmode '11g'
    option path 'platform/ar933x_wmac'
    option htmode 'HT20'
    option country 'PL'
    option channel '11'
    option txpower '17'

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option ssid 'SSID Z WANA'
    option network 'lan'
    option encryption 'psk2'
    option key 'HASLO'

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option ssid 'SSID Z WLAN'
    option network 'wwan'
    option encryption 'psk2'
    option key 'HASLO'

config wifi-iface
    option device 'radio0'
    option network 'lan'
    option mode 'ap'
    option ssid 'INNY ROUTER'
  option encryption 'psk2'
    option key 'HASLO'

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 'fdab:07bf:ec0c::/48'

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

config interface 'wan'
    option ifname 'eth1'
    option proto 'dhcp'
    option macaddr '00:00:00:00:00:01'

config interface 'wan6'
    option ifname 'eth1'
    option proto 'dhcpv6'

config interface 'wwan'
    option ifname 'eth0'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.10.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

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'

A jak wezmę w ssid 'inny router' option mode 'sta' to nie wyswietla zadnej sieci

4

Odp: Dwie niezależne sieci na jednym routerze

Ale za dużo tego masz.

sekcja config interface 'wwan' - do wyrzucenia
sekcja: config interface 'wan6' - do wyrzucenia
sekcja: config interface 'wan - wywal ten macadres (czemu wpadłeś na taki pomysł?) wywal option ifname 'eth1'
Ponad to nie masz w wireless sekcji z sta a masz trzy ap - kompletnie zrobione inaczej niż w tym co podałem. A potem się dziwisz że nie działa.

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

5

Odp: Dwie niezależne sieci na jednym routerze

Cezary napisał/a:

Ale za dużo tego masz.

sekcja config interface 'wwan' - do wyrzucenia
sekcja: config interface 'wan6' - do wyrzucenia
sekcja: config interface 'wan - wywal ten macadres (czemu wpadłeś na taki pomysł?) wywal option ifname 'eth1'
Ponad to nie masz w wireless sekcji z sta a masz trzy ap - kompletnie zrobione inaczej niż w tym co podałem. A potem się dziwisz że nie działa.

Gdy wywalę option ifname 'eth1' w tedy nie mam połączenia kablem z routera do karty sieciowej
Zamieniłem ap na sta, i nie pokazuje żadnego SSID.
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 'fdab:07bf:ec0c::/48'

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

config interface 'wan'
    option ifname 'eth1'
    option proto 'dhcp'

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'

wireless

config wifi-device 'radio0'
    option type 'mac80211'
    option hwmode '11g'
    option path 'platform/ar933x_wmac'
    option htmode 'HT20'
    option country 'PL'
    option channel '11'
    option txpower '17'

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option ssid 'Internet z niebieskiego wejscia'
    option network 'lan'
    option encryption 'psk2'
    option key ''

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option ssid 'Internet z innego routera'
    option network 'lan'
    option encryption 'psk2'
    option key ''

config wifi-iface
    option device 'radio0'
    option network 'lan'
    option mode 'sta'
    option ssid 'Router co ma dawac polaczenie do ssid "Internet z innego routera"'
    option encryption 'psk2'
    option key ''

6

Odp: Dwie niezależne sieci na jednym routerze

No nie będziesz miał, przecież przez wifi się chciałeś podłączyć.

wywal ten ifname z wanu
option network 'wan' ma być tam gdzie masz sta

I nadal masz dwa ap na lanie.

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

7 (edytowany przez jOELZ 2015-10-01 14:05:26)

Odp: Dwie niezależne sieci na jednym routerze

Jeszcze raz, bo chyba nie nadajemy na tych samych falach.
Router ma rozgłaszać dwie sieci:
Sieć A: Ma rozgłaszać Internet przez WiFi który dostarczam po kablu (Podłączam kabel do niebieskiego wejścia)
Sieć B: Ma rozgłaszać Internet przez WiFi który jest dostarczany przez inny router (Inny provider niż w sieci A) (Połączenie a'la most tylko z własną pulą DHCP).
Gdy usunę option ifname 'eth1' z sekcji 'wan' w pliku network Internet z niebieskiego wejścia nie chodzi

8

Odp: Dwie niezależne sieci na jednym routerze

A to nie, robisz drugi wan, drugi lan i całkowicie nową konfigurację firewalla. Nigdzie nie opisywałem takiej konfiguracji.

Generalnie - domyślna konfiguracja zapewnia A. Do B potrzebujesz:
- w network zrobić wan2 i lan2
- w wireless sta podłączyć do wan2, dodatkowe ap podłączyć do lan2
- w firewallu całkowicie skopiować istniejące sekcje i zrobić analogicznie jak masz dla wan i lan.

Prościej były by drugi router postawić niż tak kombinować.

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

9

Odp: Dwie niezależne sieci na jednym routerze

Cezary napisał/a:

A to nie, robisz drugi wan, drugi lan i całkowicie nową konfigurację firewalla. Nigdzie nie opisywałem takiej konfiguracji.

Generalnie - domyślna konfiguracja zapewnia A. Do B potrzebujesz:
- w network zrobić wan2 i lan2
- w wireless sta podłączyć do wan2, dodatkowe ap podłączyć do lan2
- w firewallu całkowicie skopiować istniejące sekcje i zrobić analogicznie jak masz dla wan i lan.

Prościej były by drugi router postawić niż tak kombinować.

I nowa sekcja do DHCP też chyba

10

Odp: Dwie niezależne sieci na jednym routerze

I nowa sekcja do dhcp, tak.

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

11 (edytowany przez jOELZ 2015-10-01 14:43:04)

Odp: Dwie niezależne sieci na jednym routerze

Cezary napisał/a:

I nowa sekcja do dhcp, tak.

network:
config interface 'lan2'
    option ifname 'eth0'
i
config interface 'wan2'
    option ifname 'eth1'

tak ma być?

12

Odp: Dwie niezależne sieci na jednym routerze

Bez tego option ifname na wan i bez tego na lan jak nie zamierzasz żadnego fizycznego porty dołączyć.

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

13

Odp: Dwie niezależne sieci na jednym routerze

Cezary napisał/a:

Bez tego option ifname na wan i bez tego na lan jak nie zamierzasz żadnego fizycznego porty dołączyć.

Konfiguracja zrobiona, putty pinguje, ale z poziomu systemu: Reply from 10.0.0.1: Destination port unreachable. (Sieć A)

14

Odp: Dwie niezależne sieci na jednym routerze

A jest domyślna. Więc co zmieniłeś?

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

15 (edytowany przez jOELZ 2015-10-01 16:01:35)

Odp: Dwie niezależne sieci na jednym routerze

Teraz zakomentowałem wszystkie te zmiany (lan2 wan2) co miały być, i powróciło do normy. Zaraz zrobię od nowa konfiguracje i dam znak.

EDIT.
Zrobiłem konfiguracje od nowa, i zaczęło trybić. smile Teraz zobaczymy Sieć B.

@Cezary

Dziwne, po reboot gdy się podłączam do WIFI A, i pinguję przez system operacyjny wyskakuje Reply from 10.0.0.1: Destination port unreachable, lecz gdy odłączę kabel z niebieskiego wejścia i podłącze go znów, to wraca do normy i pinguje dobrze.

16

Odp: Dwie niezależne sieci na jednym routerze

Znalazłem problem. Kiedy jestem na sieci B sieć A nie działa dopóki nie odłączę kabla do WANu, w tedy Sieć A działa a sieć B nie. W czym tkwi problem, może reguły firewalla? Może pomoże dodatek relayd. Nie wiem co o tym myślić.

*działa - czyli pinguje z poziomu komputera.

17

Odp: Dwie niezależne sieci na jednym routerze

relayd jest do czegoś innego.

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

18

Odp: Dwie niezależne sieci na jednym routerze

Cezary napisał/a:

relayd jest do czegoś innego.

Masz coś na myśli co mogło by pomóc aby oba połączenia były aktywne na raz?

19

Odp: Dwie niezależne sieci na jednym routerze

Muszą być oba na raz. Pokaż log z systemu.

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

20

Odp: Dwie niezależne sieci na jednym routerze

Cezary napisał/a:

Muszą być oba na raz. Pokaż log z systemu.

root@OpenWrt:~# logread
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.740000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.750000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.750000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.760000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.850000] PPP generic driver version 2.4.2
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.860000] NET: Registered protocol family 24
Thu Oct  1 19:46:24 2015 kern.debug kernel: [   12.920000] ath: EEPROM regdomain: 0x0
Thu Oct  1 19:46:24 2015 kern.debug kernel: [   12.920000] ath: EEPROM indicates default country code should be used
Thu Oct  1 19:46:24 2015 kern.debug kernel: [   12.920000] ath: doing EEPROM country->regdmn map search
Thu Oct  1 19:46:24 2015 kern.debug kernel: [   12.920000] ath: country maps to regdmn code: 0x3a
Thu Oct  1 19:46:24 2015 kern.debug kernel: [   12.920000] ath: Country alpha2 being used: US
Thu Oct  1 19:46:24 2015 kern.debug kernel: [   12.920000] ath: Regpair used: 0x3a
Thu Oct  1 19:46:24 2015 kern.debug kernel: [   12.940000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.940000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.950000] cfg80211: Calling CRDA for country: US
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.950000] cfg80211: Regulatory domain changed to country: US
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.960000] cfg80211:  DFS Master region: FCC
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.960000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.970000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.980000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 1700 mBm), (N/A)
Thu Oct  1 19:46:24 2015 kern.info kernel: [   12.990000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (0 s)
Thu Oct  1 19:46:24 2015 kern.info kernel: [   13.000000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
Thu Oct  1 19:46:24 2015 kern.info kernel: [   13.010000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
Thu Oct  1 19:46:27 2015 cron.info crond[811]: crond (busybox 1.23.2) started, log level 5
Thu Oct  1 19:46:28 2015 authpriv.info dropbear[828]: Not backgrounding
Thu Oct  1 19:46:30 2015 user.emerg syslog: setting up led WAN
Thu Oct  1 19:46:30 2015 user.emerg syslog: setting up led LAN1
Thu Oct  1 19:46:30 2015 user.emerg syslog: setting up led LAN2
Thu Oct  1 19:46:30 2015 user.emerg syslog: setting up led LAN3
Thu Oct  1 19:46:30 2015 user.emerg syslog: setting up led LAN4
Thu Oct  1 19:46:30 2015 user.emerg syslog: setting up led WLAN
Thu Oct  1 19:46:31 2015 daemon.info procd: - init complete -
Thu Oct  1 19:46:31 2015 daemon.warn netifd: You have delegated IPv6-prefixes but haven't assigned them to any interface. Did you forget to set option ip6assign on your lan-interfaces?
Thu Oct  1 19:46:31 2015 kern.info kernel: [   22.840000] device eth0 entered promiscuous mode
Thu Oct  1 19:46:31 2015 kern.info kernel: [   22.850000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'lan' is enabled
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'lan' is setting up now
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'lan' is now up
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'loopback' is enabled
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'loopback' is setting up now
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'loopback' is now up
Thu Oct  1 19:46:31 2015 kern.info kernel: [   22.930000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'wan' is enabled
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'wan6' is enabled
Thu Oct  1 19:46:31 2015 kern.info kernel: [   22.940000] IPv6: ADDRCONF(NETDEV_UP): br-wlan: link is not ready
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'wlan' is enabled
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'wlan' is setting up now
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'wlan' is now up
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Network device 'lo' link is up
Thu Oct  1 19:46:31 2015 daemon.notice netifd: Interface 'loopback' has link connectivity
Thu Oct  1 19:46:32 2015 user.notice firewall: Reloading firewall due to ifup of lan (br-lan)
Thu Oct  1 19:46:32 2015 kern.info kernel: [   24.060000] cfg80211: Calling CRDA for country: PL
Thu Oct  1 19:46:32 2015 kern.info kernel: [   24.060000] cfg80211: Regulatory domain changed to country: PL
Thu Oct  1 19:46:32 2015 kern.info kernel: [   24.070000] cfg80211:  DFS Master region: ETSI
Thu Oct  1 19:46:32 2015 kern.info kernel: [   24.070000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Thu Oct  1 19:46:32 2015 kern.info kernel: [   24.080000] cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Thu Oct  1 19:46:32 2015 kern.info kernel: [   24.090000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
Thu Oct  1 19:46:32 2015 kern.info kernel: [   24.100000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
Thu Oct  1 19:46:32 2015 kern.info kernel: [   24.110000] cfg80211:   (5490000 KHz - 5710000 KHz @ 160000 KHz), (N/A, 2700 mBm), (0 s)
Thu Oct  1 19:46:32 2015 kern.info kernel: [   24.120000] cfg80211:   (57000000 KHz - 66000000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
Thu Oct  1 19:46:33 2015 kern.info kernel: [   25.060000] eth0: link up (1000Mbps/Full duplex)
Thu Oct  1 19:46:33 2015 kern.info kernel: [   25.060000] br-lan: port 1(eth0) entered forwarding state
Thu Oct  1 19:46:33 2015 kern.info kernel: [   25.070000] br-lan: port 1(eth0) entered forwarding state
Thu Oct  1 19:46:33 2015 daemon.notice netifd: Network device 'eth0' link is up
Thu Oct  1 19:46:33 2015 daemon.notice netifd: Bridge 'br-lan' link is up
Thu Oct  1 19:46:33 2015 daemon.notice netifd: Interface 'lan' has link connectivity
Thu Oct  1 19:46:33 2015 kern.info kernel: [   25.080000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
Thu Oct  1 19:46:33 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:34 2015 kern.info kernel: [   25.420000] eth1: link up (100Mbps/Full duplex)
Thu Oct  1 19:46:34 2015 kern.info kernel: [   25.420000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Thu Oct  1 19:46:34 2015 daemon.notice netifd: Network device 'eth1' link is up
Thu Oct  1 19:46:34 2015 daemon.notice netifd: Interface 'wan' has link connectivity
Thu Oct  1 19:46:34 2015 daemon.notice netifd: Interface 'wan' is setting up now
Thu Oct  1 19:46:34 2015 daemon.notice netifd: Interface 'wan6' has link connectivity
Thu Oct  1 19:46:34 2015 daemon.notice netifd: Interface 'wan6' is setting up now
Thu Oct  1 19:46:34 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:34 2015 daemon.notice netifd: wan (1092): udhcpc (v1.23.2) started
Thu Oct  1 19:46:35 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:35 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:35 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:35 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:35 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:35 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:35 2015 daemon.notice netifd: wan (1092): Sending discover...
Thu Oct  1 19:46:35 2015 daemon.notice netifd: radio0 (931): Configuration file: /var/run/hostapd-phy0.conf
Thu Oct  1 19:46:35 2015 kern.info kernel: [   26.740000] IPv6: ADDRCONF(NETDEV_UP): wlan0-1: link is not ready
Thu Oct  1 19:46:35 2015 kern.info kernel: [   26.750000] device wlan0-1 entered promiscuous mode
Thu Oct  1 19:46:35 2015 daemon.notice netifd: radio0 (931): wlan0-1: interface state UNINITIALIZED->COUNTRY_UPDATE
Thu Oct  1 19:46:35 2015 daemon.notice netifd: radio0 (931): Using interface wlan0-1 with hwaddr 12:fe:ed:3e:29:60 and ssid "NoForSyrianGuys"
Thu Oct  1 19:46:35 2015 kern.info kernel: [   27.070000] br-lan: port 1(eth0) entered forwarding state
Thu Oct  1 19:46:36 2015 kern.info kernel: [   27.380000] device wlan0-2 entered promiscuous mode
Thu Oct  1 19:46:36 2015 kern.info kernel: [   27.390000] br-wlan: port 1(wlan0-2) entered forwarding state
Thu Oct  1 19:46:36 2015 kern.info kernel: [   27.390000] br-wlan: port 1(wlan0-2) entered forwarding state
Thu Oct  1 19:46:36 2015 kern.info kernel: [   27.400000] IPv6: ADDRCONF(NETDEV_UP): wlan0-2: link is not ready
Thu Oct  1 19:46:36 2015 kern.info kernel: [   27.400000] IPv6: ADDRCONF(NETDEV_CHANGE): br-wlan: link becomes ready
Thu Oct  1 19:46:36 2015 daemon.notice netifd: radio0 (931): Using interface wlan0-2 with hwaddr 16:fe:ed:3e:29:60 and ssid "OpenWRT"
Thu Oct  1 19:46:36 2015 daemon.notice netifd: Bridge 'br-wlan' link is up
Thu Oct  1 19:46:36 2015 daemon.notice netifd: Interface 'wlan' has link connectivity
Thu Oct  1 19:46:36 2015 kern.info kernel: [   27.750000] br-wlan: port 1(wlan0-2) entered disabled state
Thu Oct  1 19:46:37 2015 daemon.notice netifd: radio0 (931): wlan0-1: interface state COUNTRY_UPDATE->ENABLED
Thu Oct  1 19:46:37 2015 daemon.notice netifd: radio0 (931): wlan0-1: AP-ENABLED
Thu Oct  1 19:46:37 2015 kern.info kernel: [   28.640000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Thu Oct  1 19:46:37 2015 daemon.notice netifd: radio0 (931): Successfully initialized wpa_supplicant
Thu Oct  1 19:46:37 2015 daemon.notice netifd: Bridge 'br-wlan' link is down
Thu Oct  1 19:46:37 2015 daemon.notice netifd: Interface 'wlan' has link connectivity loss
Thu Oct  1 19:46:37 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:38 2015 daemon.notice netifd: wan (1092): Sending discover...
Thu Oct  1 19:46:38 2015 daemon.notice netifd: wan (1092): Sending select for 10.0.221.101...
Thu Oct  1 19:46:38 2015 daemon.notice netifd: wan (1092): Lease of 10.0.221.101 obtained, lease time 50000
Thu Oct  1 19:46:38 2015 daemon.notice netifd: Interface 'wan' is now up
Thu Oct  1 19:46:38 2015 daemon.notice netifd: Interface 'wwan' is enabled
Thu Oct  1 19:46:38 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:38 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:38 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:38 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:38 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:38 2015 daemon.warn odhcpd[793]: DHCPV6 SOLICIT IA_NA from 000100011d6a5a151867b0dfaecd on br-lan: no addresses available
Thu Oct  1 19:46:38 2015 kern.info kernel: [   30.260000] wlan0: authenticate with 64:70:02:e6:db:f2
Thu Oct  1 19:46:38 2015 kern.info kernel: [   30.280000] wlan0: send auth to 64:70:02:e6:db:f2 (try 1/3)
Thu Oct  1 19:46:38 2015 kern.info kernel: [   30.290000] wlan0: authenticated
Thu Oct  1 19:46:38 2015 kern.info kernel: [   30.300000] wlan0: associate with 64:70:02:e6:db:f2 (try 1/3)
Thu Oct  1 19:46:39 2015 kern.info kernel: [   30.410000] wlan0: associate with 64:70:02:e6:db:f2 (try 2/3)
Thu Oct  1 19:46:39 2015 kern.info kernel: [   30.410000] wlan0: RX AssocResp from 64:70:02:e6:db:f2 (capab=0x431 status=0 aid=1)
Thu Oct  1 19:46:39 2015 kern.info kernel: [   30.420000] wlan0: associated
Thu Oct  1 19:46:39 2015 kern.info kernel: [   30.420000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Thu Oct  1 19:46:39 2015 daemon.notice netifd: Network device 'wlan0' link is up
Thu Oct  1 19:46:39 2015 daemon.notice netifd: Interface 'wwan' has link connectivity
Thu Oct  1 19:46:39 2015 daemon.notice netifd: Interface 'wwan' is setting up now
Thu Oct  1 19:46:39 2015 daemon.notice netifd: wwan (1193): udhcpc (v1.23.2) started
Thu Oct  1 19:46:39 2015 daemon.notice netifd: wwan (1193): Sending discover...
Thu Oct  1 19:46:39 2015 daemon.notice netifd: wwan (1193): Sending select for 192.168.0.101...
Thu Oct  1 19:46:39 2015 daemon.notice netifd: wwan (1193): Lease of 192.168.0.101 obtained, lease time 7200
Thu Oct  1 19:46:39 2015 daemon.notice netifd: Interface 'wwan' is now up
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq[1214]: started, version 2.73 cachesize 150
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq[1214]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC loop-detect inotify
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq[1214]: DNS service limited to local subnets
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq-dhcp[1214]: DHCP, IP range 10.10.0.2 -- 10.10.0.11, lease time 12h
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq-dhcp[1214]: DHCP, IP range 10.0.0.2 -- 10.0.0.11, lease time 12h
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq[1214]: using local addresses only for domain lan
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq[1214]: reading /tmp/resolv.conf.auto
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq[1214]: using local addresses only for domain lan
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq[1214]: using nameserver 10.0.220.1#53
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq[1214]: using nameserver 10.0.220.1#53
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq[1214]: read /etc/hosts - 1 addresses
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq[1214]: read /tmp/hosts/dhcp - 1 addresses
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq[1214]: read /tmp/hosts/odhcpd - 0 addresses
Thu Oct  1 19:46:40 2015 daemon.info dnsmasq-dhcp[1214]: read /etc/ethers - 0 addresses
Thu Oct  1 19:46:40 2015 kern.info kernel: [   31.920000] br-lan: port 2(wlan0-1) entered forwarding state
Thu Oct  1 19:46:40 2015 kern.info kernel: [   31.930000] br-lan: port 2(wlan0-1) entered forwarding state
Thu Oct  1 19:46:40 2015 kern.info kernel: [   31.930000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
Thu Oct  1 19:46:40 2015 daemon.notice netifd: Network device 'wlan0-1' link is up
Thu Oct  1 19:46:41 2015 kern.info kernel: [   33.220000] br-wlan: port 1(wlan0-2) entered forwarding state
Thu Oct  1 19:46:41 2015 kern.info kernel: [   33.220000] br-wlan: port 1(wlan0-2) entered forwarding state
Thu Oct  1 19:46:41 2015 kern.info kernel: [   33.230000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-2: link becomes ready
Thu Oct  1 19:46:41 2015 daemon.notice netifd: Network device 'wlan0-2' link is up
Thu Oct  1 19:46:41 2015 daemon.notice netifd: Bridge 'br-wlan' link is up
Thu Oct  1 19:46:41 2015 daemon.notice netifd: Interface 'wlan' has link connectivity
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1214]: exiting on receipt of SIGTERM
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1282]: started, version 2.73 cachesize 150
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1282]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC loop-detect inotify
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1282]: DNS service limited to local subnets
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq-dhcp[1282]: DHCP, IP range 10.10.0.2 -- 10.10.0.11, lease time 12h
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq-dhcp[1282]: DHCP, IP range 10.0.0.2 -- 10.0.0.11, lease time 12h
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1282]: using local addresses only for domain lan
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1282]: reading /tmp/resolv.conf.auto
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1282]: using local addresses only for domain lan
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1282]: using nameserver 10.0.220.1#53
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1282]: using nameserver 10.0.220.1#53
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1282]: read /etc/hosts - 1 addresses
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1282]: read /tmp/hosts/dhcp - 1 addresses
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq[1282]: read /tmp/hosts/odhcpd - 0 addresses
Thu Oct  1 19:46:42 2015 daemon.info dnsmasq-dhcp[1282]: read /etc/ethers - 0 addresses
Thu Oct  1 19:46:42 2015 kern.info kernel: [   33.930000] br-lan: port 2(wlan0-1) entered forwarding state
Thu Oct  1 19:46:42 2015 user.notice firewall: Reloading firewall due to ifup of wlan (br-wlan)
Thu Oct  1 19:46:43 2015 daemon.info dnsmasq-dhcp[1282]: DHCPREQUEST(br-lan) 10.0.0.11 18:67:b0:df:ae:cd
Thu Oct  1 19:46:43 2015 daemon.info dnsmasq-dhcp[1282]: DHCPACK(br-lan) 10.0.0.11 18:67:b0:df:ae:cd Laptop
Thu Oct  1 19:46:43 2015 kern.info kernel: [   35.220000] br-wlan: port 1(wlan0-2) entered forwarding state
Thu Oct  1 19:46:44 2015 user.notice firewall: Reloading firewall due to ifup of wan (eth1)
Thu Oct  1 19:46:46 2015 user.notice firewall: Reloading firewall due to ifup of wwan (wlan0)
Thu Oct  1 19:46:51 2015 kern.notice kernel: [   42.610000] random: nonblocking pool is initialized
Thu Oct  1 19:49:44 2015 authpriv.info dropbear[1622]: Child connection from 10.0.0.11:50651
Thu Oct  1 19:49:52 2015 authpriv.notice dropbear[1622]: Password auth succeeded for 'root' from 10.0.0.11:50651
root@OpenWrt:~#

21

Odp: Dwie niezależne sieci na jednym routerze

jOELZ - Z ciekawości zrobiłem Twoją konfigurację: dwa ap (jeden z kabla, drugi do tego sta) i sta (sta do drugiego ap) tak samo jak Ty - potwierdzam problem Internetu (net jest tylko na jednym ap co ma połączenie z sta (gdy pinguje przez putty to ping idzie z kabla dziwne)). Wspominałeś że jak wyjmiesz kabel i włożysz to pierwszy ap zaczyna działać, a drugi znowu nie. To też potwierdzam (Destination port unreachable.)
Cezary - Wydaje mi się że to błąd w OpenWRT, gdzieś mi się przewinęło (chyba na dev.openwrt, ale ręki nie dam uciąć)

22

Odp: Dwie niezależne sieci na jednym routerze

Z ciekawości zrobiłem taką samą konfigurację.  I działa. Mówiłem że to kwestia konfiguracji.

1. dodaj różne metric do interfejsów wan bo inaczej ci się dwa gatewaye nie zrobią.
2. sprawdź czy ping na tych interfejsach działa
3. zainstaluj ip i jawnie wskaż że z adresacji sieci lan2 ma iść na gatewaya z wan2.

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

23 (edytowany przez jOELZ 2015-10-02 11:19:07)

Odp: Dwie niezależne sieci na jednym routerze

Cezary napisał/a:

Z ciekawości zrobiłem taką samą konfigurację.  I działa. Mówiłem że to kwestia konfiguracji.

1. dodaj różne metric do interfejsów wan bo inaczej ci się dwa gatewaye nie zrobią.
2. sprawdź czy ping na tych interfejsach działa
3. zainstaluj ip i jawnie wskaż że z adresacji sieci lan2 ma iść na gatewaya z wan2.

1. Metric zrobione:

root@Gargoyle:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.221.1      0.0.0.0         UG    0      0        0 eth1
0.0.0.0         192.168.0.1     0.0.0.0         UG    1      0        0 wlan0-2
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 br-lann
10.0.220.0      0.0.0.0         255.255.252.0   U     0      0        0 eth1
10.10.0.0       0.0.0.0         255.255.255.0   U     0      0        0 br-lan
192.168.0.0     0.0.0.0         255.255.255.0   U     1      0        0 wlan0-2

2. Jak zrobić tego pinga, jeżeli Ci chodzi o np. odłączenie kabla wan, następnie zalogowanie się do Sieci B, polecenie ping w putty, to działa, tak samo działa na odwrót.
3.

root@Gargoyle:~# opkg install ip
WARNING: Package ip is already installed, ignoring
         Use --force-reinstall to force reinstallation

No packages to install.

Domyślam się, że polecenie ip, tylko jak dodać coś takiego?

Zzpiowany config:
https://www.dropbox.com/s/qfi6sex93w0sq … g.zip?dl=0

24

Odp: Dwie niezależne sieci na jednym routerze

ping -I eth1 8.8.8.8
ping -I wlan0-2 8.8.8.8

ip masz zainstalowane. Dodaj sobei coś takiego:

echo "200 wan2" >> /etc/iproute2/rt_tables
ip rule add from 10.0.0.0/24 table wan2
ip route add default via 192.168.0.1 dev wlan0-2 table wan2
ip route flush cache

Lub sobie popraw dane jak coś przekręciłem.

PS. I czemu to robisz na gargoyle a nie na 15.05 jak napisałeś?

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

25 (edytowany przez jOELZ 2015-10-02 11:34:37)

Odp: Dwie niezależne sieci na jednym routerze

Cezary napisał/a:

ping -I eth1 8.8.8.8
ping -I wlan0-2 8.8.8.8

ip masz zainstalowane. Dodaj sobei coś takiego:

echo "200 wan2" >> /etc/iproute2/rt_tables
ip rule add from 10.0.0.0/24 table wan2
ip route add default via 192.168.0.1 dev wlan0-2 table wan2
ip route flush cache

Lub sobie popraw dane jak coś przekręciłem.

PS. I czemu to robisz na gargoyle a nie na 15.05 jak napisałeś?

Dzisiaj wgrałem gargoyle, porównać czy na gargoyle by działało.

Edycja.

ping -I eth1 8.8.8.8
ping -I wlan0-2 8.8.8.8

Pingi przechodzą
U mnie wan2 to wann i tak zmieniłem, adresacja wydaje się ok, dodałem, następnie reboot i lipa SSID_1 działa, SSID_2 nie działa. Zaraz wgram 15.05 i zobaczę jeszcze raz.