Temat: PIM router multicast via NAT

Hej,

Próbuje przepchnac jakoś multikasty przez moj router. Router ma konfiguracje domyślna, włączone natowianie, z bridgem na lan. Moim dostawca jest Orange Światlowod, z livebox 3. Probowalem robić wg tego poradnika https://wiki.openwrt.org/doc/howto/udp_multicast i niestety bez efektu, nadal multikasty nie docierają do urządzeń, w tym dekodera orange, za routerem. Urządzenia co prawda rejestrują się do grup multikastowych ale nic nie odbierają. Adresacja przed routerem 192.168.100.0/24, za routerem 192.168.1.0/24. Nie mogę skonfigurować swojego routera jako bridge, bo router od Orange ma ograniczone mozliwosci konfiguracji, tak samo nie mam mozliwosci na routerze Orange włączyć bridge na którymś z interfejsow (w livebox 2 była taka opcja, ale Orange odrzucili moja reklamacje). Prośba o pomoc.

Dzieki :-)

2

Odp: PIM router multicast via NAT

Pokaż konfigurację

/etc/config/network
/etc/config/igmpproxy

i log po uruchomieniu igmpproxy

TP-Link TL-WDR4300 v1, Reboot (17.01-SNAPSHOT, r3876-efb6ca1)

3 (edytowany przez Bartek1202 2017-09-15 01:24:45)

Odp: PIM router multicast via NAT

root@Router-Bonczyk:~# cat /etc/config/igmpproxy
config igmpproxy                                 
        option quickleave 1                     
                                                 
config phyint eth0                               
        option network wan                       
        option direction upstream               
        list altnet 192.168.100.0/24             
        list altnet 192.168.1.0/24               
                                                 
config phyint br-lan                             
        option network lan                       
        option direction downstream

root@Router-Bonczyk:~# 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 'fd9f:c91f:de25::/48'                                             
                                                                                           
config interface 'lan'                                                                     
        option igmp_snooping '1'                                                           
        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'                                                     
                                                                                           
config interface 'wan'                                                                     
        option ifname 'eth0'                                                               
        option proto 'dhcp'                                                                 
                                                                                           
config interface 'wan6'                                                                     
        option ifname 'eth0'                                                               
        option proto 'dhcpv6'                                                               
                                                                                           
config switch                                                                               
        option name 'switch0'                                                               
        option reset '1'                                                                   
        option enable_vlan '1'                                                             
        option mirror_source_port '0'                                                       
        option mirror_monitor_port '0'                                                     
                                                                                           
config switch_vlan                                                                         
        option device 'switch0'                                                             
        option vlan '1'                                                                     
        option vid '1'                                                                     
        option ports '0 1 2 3 4'                                                           
                                                                                           
config switch_vlan                                                                         
        option device 'switch0'                                                             
        option vlan '8'                                                                     
        option ports '5 6'                                                                 
        option vid '2'

W logu nic nie mam, co najwyzej mogę uruchomić igmp proxy w trybie debugowania i pokazać zrzut.

4

Odp: PIM router multicast via NAT

Wypróbuje może tak:

config igmpproxy                                 
        option quickleave 1                      
                                                 
config phyint eth0                               
        option network wan                       
        option direction upstream                
        list altnet 192.168.100.0/24             
                                                         
config phyint br-lan                             
        option network lan                       
        option direction downstream
        list altnet 192.168.1.0/24               

A jak nie pójdzie to, standardowo ...

config igmpproxy                                 
        option quickleave 1                      
                                                 
config phyint eth0                               
        option network wan                       
        option direction upstream                
        list altnet 0.0.0.0/0
                                                         
config phyint br-lan                             
        option network lan                       
        option direction downstream

Multikasty masz na wan ? Czy może wan w tagowanej podsieci ?
Jak podłączysz się pod kabel od odstawy bezpośrednio np. komputerem to masz dostęp do multicastów (powiedzmy przez vlc -vvv udp:@239.255.12.42, gdzie 239.255.12.42 to adres strumienia wideo) ?

TP-Link TL-WDR4300 v1, Reboot (17.01-SNAPSHOT, r3876-efb6ca1)

5 (edytowany przez Bartek1202 2017-09-15 10:36:05)

Odp: PIM router multicast via NAT

Tak, jeśli podłącze się pod router dostawcy to multikasty działają, z tego powodu, że aktualnie tak jest podpięty jeden z dekoderów i usługa działa. Usługa na wyjściu z routera dostawcy jest bez tagów. wystawiona na wszystkich portach wbudowanego switcha. Widocznie Dekoder sam sobie wskakuje w odpowiedni VLAN. Na WAN mam multikasty bo w logach IGMP Proxy widzę logi z dekodera 192.168.100.x jak się dopisuje do grupy multikastowej 239.x.x.x i pobiera adresy multikast 224.x.x.x. Standardową konfigurację już przetestowałem, stąd też wylistowane adresy altnet. IGMP Proxy uruchomione w trybie debugowania daje nieskończone rezultaty, ale bardzo zbliżone do siebie.

Poniżej wyniki debugowania z altnet ustawione na 0.0.0.0/0
Zaznacze również że na firewallu mam odblokowany ruch dla IGMP

root@Router-Bonczyk:~# igmpproxy -d -vv /etc/igmpproxy.conf
Searching for config file at '/etc/igmpproxy.conf'
Config: Quick leave mode enabled.
Config: Got a phyint token.
Config: IF: Config for interface eth0.
Config: IF: Got upstream token.
Config: IF: Got ratelimit token '0'.
Config: IF: Got threshold token '1'.
Config: IF: Got altnet token 0.0.0.0/0.
Config: IF: Altnet: Parsed altnet to default.
IF name : eth0
Next ptr : 0
Ratelimit : 0
Threshold : 1
State : 1
Allowednet ptr : 6212a8
Config: Got a phyint token.
Config: IF: Config for interface br-lan.
Config: IF: Got downstream token.
Config: IF: Got ratelimit token '0'.
Config: IF: Got threshold token '1'.
IF name : br-lan
Next ptr : 0
Ratelimit : 0
Threshold : 1
State : 2
Allowednet ptr : 0
Config: Got a phyint token.
Config: IF: Config for interface lo.
Config: IF: Got disabled token.
IF name : lo
Next ptr : 0
Ratelimit : 0
Threshold : 1
State : 0
Allowednet ptr : 0
buildIfVc: Interface lo Addr: 127.0.0.1, Flags: 0x0049, Network: 127/8
buildIfVc: Interface eth0 Addr: 192.168.100.254, Flags: 0x1043, Network: 192.168.100/24
buildIfVc: Interface br-lan Addr: 192.168.1.1, Flags: 0x1043, Network: 192.168.1/24
buildIfVc: Interface br-guest Addr: 10.10.0.1, Flags: 0x1043, Network: 10.0/12
Found config for eth0
Found config for br-lan
adding VIF, Ix 0 Fl 0x0 IP 0xc0a864fe eth0, Threshold: 1, Ratelimit: 0
        Network for [eth0] : 192.168.100/24
        Network for [eth0] : default
adding VIF, Ix 1 Fl 0x0 IP 0xc0a80101 br-lan, Threshold: 1, Ratelimit: 0
        Network for [br-lan] : 192.168.1/24
Got 262144 byte buffer size in 0 iterations
Joining all-routers group 224.0.0.2 on vif 192.168.1.1
joinMcGroup: 224.0.0.2 on br-lan
SENT Membership query   from 192.168.1.1     to 224.0.0.1
Sent membership query from 192.168.1.1 to 224.0.0.1. Delay: 10
Created timeout 1 (#0) - delay 10 secs
(Id:1, Time:10)
Created timeout 2 (#1) - delay 21 secs
(Id:1, Time:10)
(Id:2, Time:21)
RECV Membership query   from 192.168.1.1     to 224.0.0.1
RECV Membership query   from 192.168.100.1   to 224.0.0.1
RECV V2 member report   from 192.168.1.10    to 239.255.255.250
Should insert group 239.255.255.250 (from: 192.168.1.10) to route table. Vif Ix : 1
No existing route for 239.255.255.250. Create new.
No routes in table. Insert at beginning.
Inserted route table entry for 239.255.255.250 on VIF #1
Joining group 239.255.255.250 upstream on IF address 192.168.100.254
joinMcGroup: 239.255.255.250 on eth0

Current routing table (Insert Route):
-----------------------------------------------------
#0: Src: 0.0.0.0, Dst: 239.255.255.250, Age:2, St: I, OutVifs: 0x00000002
-----------------------------------------------------
RECV V2 member report   from 192.168.100.254 to 239.255.255.250
The IGMP message was from myself. Ignoring.
Route activation request from 192.168.100.254 for 239.255.255.250 is from myself. Ignoring.
RECV V2 member report   from 192.168.1.1     to 224.0.0.2
The IGMP message was from myself. Ignoring.
Route activate request from 192.168.100.2 to 239.255.255.250
Vif bits : 0x00000002
Setting TTL for Vif 1 to 1
Adding MFC: 192.168.100.2 -> 239.255.255.250, InpVIf: 0

Current routing table (Activate Route):
-----------------------------------------------------
#0: Src: 192.168.100.2, Dst: 239.255.255.250, Age:2, St: A, OutVifs: 0x00000002
-----------------------------------------------------
About to call timeout 1 (#0)
Aging routes in table.

Current routing table (Age active routes):
-----------------------------------------------------
#0: Src: 192.168.100.2, Dst: 239.255.255.250, Age:1, St: A, OutVifs: 0x00000002
-----------------------------------------------------
RECV V2 member report   from 192.168.100.254 to 239.255.255.250
The IGMP message was from myself. Ignoring.
RECV V2 member report   from 192.168.100.254 to 239.255.255.250
The IGMP message was from myself. Ignoring.
Route activation request from 192.168.100.254 for 239.255.255.250 is from myself. Ignoring.
About to call timeout 2 (#0)
SENT Membership query   from 192.168.1.1     to 224.0.0.1
Sent membership query from 192.168.1.1 to 224.0.0.1. Delay: 10
Created timeout 3 (#0) - delay 10 secs
(Id:3, Time:10)
Created timeout 4 (#1) - delay 21 secs
(Id:3, Time:10)
(Id:4, Time:21)
RECV Membership query   from 192.168.1.1     to 224.0.0.1
RECV V2 member report   from 192.168.1.10    to 239.255.255.250
Should insert group 239.255.255.250 (from: 192.168.1.10) to route table. Vif Ix : 1
Updated route entry for 239.255.255.250 on VIF #1
Vif bits : 0x00000002
Setting TTL for Vif 1 to 1
Adding MFC: 192.168.100.2 -> 239.255.255.250, InpVIf: 0

Current routing table (Insert Route):
-----------------------------------------------------
#0: Src: 192.168.100.2, Dst: 239.255.255.250, Age:1, St: A, OutVifs: 0x00000002
-----------------------------------------------------
RECV V2 member report   from 192.168.1.5     to 239.255.255.250
Should insert group 239.255.255.250 (from: 192.168.1.5) to route table. Vif Ix : 1
Updated route entry for 239.255.255.250 on VIF #1
Vif bits : 0x00000002
Setting TTL for Vif 1 to 1
Adding MFC: 192.168.100.2 -> 239.255.255.250, InpVIf: 0

Current routing table (Insert Route):
-----------------------------------------------------
#0: Src: 192.168.100.2, Dst: 239.255.255.250, Age:1, St: A, OutVifs: 0x00000002
-----------------------------------------------------
RECV V2 member report   from 192.168.1.1     to 224.0.0.2
The IGMP message was from myself. Ignoring.
RECV Membership query   from 192.168.100.1   to 224.0.0.1
RECV V2 member report   from 192.168.100.2   to 239.255.255.250
Mebership report was recieved on the upstream interface. Ignoring.
About to call timeout 3 (#0)
Aging routes in table.

Current routing table (Age active routes):
-----------------------------------------------------
#0: Src: 192.168.100.2, Dst: 239.255.255.250, Age:2, St: A, OutVifs: 0x00000002
-----------------------------------------------------
About to call timeout 4 (#0)
SENT Membership query   from 192.168.1.1     to 224.0.0.1
Sent membership query from 192.168.1.1 to 224.0.0.1. Delay: 10
Created timeout 5 (#0) - delay 10 secs
(Id:5, Time:10)
Created timeout 6 (#1) - delay 115 secs
(Id:5, Time:10)
(Id:6, Time:115)
RECV Membership query   from 192.168.1.1     to 224.0.0.1
RECV V2 member report   from 192.168.1.1     to 224.0.0.2
The IGMP message was from myself. Ignoring.
RECV V2 member report   from 192.168.1.10    to 239.255.255.250
Should insert group 239.255.255.250 (from: 192.168.1.10) to route table. Vif Ix : 1
Updated route entry for 239.255.255.250 on VIF #1
Vif bits : 0x00000002
Setting TTL for Vif 1 to 1
Adding MFC: 192.168.100.2 -> 239.255.255.250, InpVIf: 0

Current routing table (Insert Route):
-----------------------------------------------------
#0: Src: 192.168.100.2, Dst: 239.255.255.250, Age:2, St: A, OutVifs: 0x00000002
-----------------------------------------------------
RECV V2 member report   from 192.168.1.5     to 239.255.255.250
Should insert group 239.255.255.250 (from: 192.168.1.5) to route table. Vif Ix : 1
Updated route entry for 239.255.255.250 on VIF #1
Vif bits : 0x00000002
Setting TTL for Vif 1 to 1
Adding MFC: 192.168.100.2 -> 239.255.255.250, InpVIf: 0

Current routing table (Insert Route):
-----------------------------------------------------
#0: Src: 192.168.100.2, Dst: 239.255.255.250, Age:2, St: A, OutVifs: 0x00000002
-----------------------------------------------------
About to call timeout 5 (#0)
Aging routes in table.

Current routing table (Age active routes):
-----------------------------------------------------
#0: Src: 192.168.100.2, Dst: 239.255.255.250, Age:2, St: A, OutVifs: 0x00000002
-----------------------------------------------------
RECV Membership query   from 192.168.100.1   to 224.0.0.1
RECV V2 member report   from 192.168.100.2   to 239.255.255.250
Mebership report was recieved on the upstream interface. Ignoring.
RECV Membership query   from 192.168.100.1   to 224.0.0.1
RECV V2 member report   from 192.168.100.254 to 239.255.255.250
The IGMP message was from myself. Ignoring.
Route activation request from 192.168.100.254 for 239.255.255.250 is from myself. Ignoring.
Route activate request from 192.168.100.1 to 239.255.255.250
The origin for route 239.255.255.250 changed from 192.168.100.2 to 192.168.100.1
Vif bits : 0x00000002
Setting TTL for Vif 1 to 1
Adding MFC: 192.168.100.1 -> 239.255.255.250, InpVIf: 0

Current routing table (Activate Route):
-----------------------------------------------------
#0: Src: 192.168.100.1, Dst: 239.255.255.250, Age:2, St: A, OutVifs: 0x00000002
-----------------------------------------------------
RECV Leave message      from 192.168.1.10    to 224.0.0.2
Got leave message from 192.168.1.10 to 224.0.0.251. Starting last member detection.
Created timeout 7 (#0) - delay 10 secs
(Id:7, Time:10)
(Id:6, Time:30)
About to call timeout 7 (#0)
RECV Membership query   from 192.168.100.1   to 224.0.0.1
RECV V2 member report   from 192.168.100.254 to 239.255.255.250
The IGMP message was from myself. Ignoring.
Route activation request from 192.168.100.254 for 239.255.255.250 is from myself. Ignoring.
^Cselect() failure; Errno(4): Interrupted system call
Got a interupt signal. Exiting.
clean handler called
Removing route entry for 239.255.255.250
Vif bits : 0x00000002
Setting TTL for Vif 1 to 1
Removing MFC: 192.168.100.1 -> 239.255.255.250, InpVIf: 0
Leaving group 239.255.255.250 upstream on IF address 192.168.100.254
leaveMcGroup: 239.255.255.250 on eth0
All routes removed. Routing table is empty.
Shutdown complete....
config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Routing IGMP'
        option src 'wan'
        option proto 'udp'
        option dest 'lan'
        option dest_ip '224.0.0.0/4'
        option target 'ACCEPT'
        option family 'ipv4'

192.168.100.254 jak i 192.168.1.1 to adres routera WAN/LAN
192.168.100.1 - router dostawcy
192.168.100.2 - dekoder podłączony do routera dostawcy
192.168.1.10 - kamera IP

Chwilowo dekoder za LAN mojego routera odłączony, nie mam możliwości teraz podłączenia, ale we wcześniejszych próbach pobierał adres z DHCP mojego routera i większość zarejestrowań do grupy było odrzucane, jako "Mebership report was recieved on the upstream interface. Ignoring."

6

Odp: PIM router multicast via NAT

Trochę się zgubiłem jak masz to wszystko połączone, czy dobrze rozumiem:

1. router1 masz od dostawcy 192.168.100.1
2. gdy podłączysz dekoder (pod router1)  to dostaje on adres 192.168.100.2 z router1 - wtedy działają multikasty
3. gdy podłączysz swój router2 z LEDE  (pod router1), to dostaje on adres 192.168.100.254 i router2 ma LAN 192.168.1.1/24
4. gdy podłączysz dekoder (pod swój router2), to dostaje adres 192.168.1.x z router2 - wtedy NIE masz multikastów  ?

Czy tak ? Jak nie tak to rozrysuj jak to jest połączone i w której konfiguracji działa a w której nie.

TP-Link TL-WDR4300 v1, Reboot (17.01-SNAPSHOT, r3876-efb6ca1)

7

Odp: PIM router multicast via NAT

Dokładnie tak. Natomiast kwestia przydzielania adresów z DHCP myśle, że nie ma tu znaczenia. Problemem jest że multikasty działają tylko w L2, nie ma natomiast możliwości routingu multikastów za NAT za moim routerem (router2), choć jest prawidłowo uruchomiony PIM jak i odblokowane IGMP na routerze. Nie mam pomysłu co jeszcze mogę uruchomić by podłączając dekoder za moim routerem były odbierane kanały IPTV. Rekonfiguracja mojego routera aby pracował w L2 odpada, więc zostaje tylko uruchomienie tego w jakiś sposób w L3. Sygnał od operatora dla IPTV i tak jest kodowany, ale podłączając dekoder z kartą po internecie chciałbym odpierać strumienie video. Dodam jeszcze że usługi takie jak VOD działają na dekoderze podłączonym za moim routerem, ale być może dlatego, że jest to inaczej odbierane (więc tutaj mogę podejrzewać, że nie ma tam żadnych VLANów do wysyłania żądań jak i odbioru).

8

Odp: PIM router multicast via NAT

Bartek1202 napisał/a:

kwestia przydzielania adresów z DHCP myśle, że nie ma tu znaczenia. Problemem jest że multikasty działają tylko w L2, nie ma natomiast możliwości routingu multikastów za NAT za moim routerem (router2), choć jest prawidłowo uruchomiony PIM jak i odblokowane IGMP na routerze. Nie mam pomysłu co jeszcze mogę uruchomić by podłączając dekoder za moim routerem były odbierane kanały IPTV. Rekonfiguracja mojego routera aby pracował w L2 odpada, więc zostaje tylko uruchomienie tego w jakiś sposób w L3. Sygnał od operatora dla IPTV i tak jest kodowany, ale podłączając dekoder z kartą po internecie chciałbym odpierać strumienie video. Dodam jeszcze że usługi takie jak VOD działają na dekoderze podłączonym za moim routerem, ale być może dlatego, że jest to inaczej odbierane (więc tutaj mogę podejrzewać, że nie ma tam żadnych VLANów do wysyłania żądań jak i odbioru).

Mam wrażenie że aby to zadziałało to igmpproxy "musiałoby" działać na router1 i router2.
A może pozbyć się router1 i tak skonfigurować router2 aby wszystko do niego podłączyć ?

TP-Link TL-WDR4300 v1, Reboot (17.01-SNAPSHOT, r3876-efb6ca1)