Возникла проблема с настройкой igmpproxy. С udpxy проблем нет, но хочется чтобы работало и то, и то. Конфиги в спойлере:
eth0 - сеть провайдера, br-lan - внутренняя сеть.
br-lan Link encap:Ethernet HWaddr F8:1A:67:E6:27:88
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:145921 errors:0 dropped:1 overruns:0 frame:0
TX packets:53344 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:169213652 (161.3 MiB) TX bytes:20972154 (20.0 MiB)
eth0 Link encap:Ethernet HWaddr F8:1A:67:E6:27:87
inet addr:10.22.4.76 Bcast:10.22.4.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:63432 errors:0 dropped:158 overruns:0 frame:0
TX packets:153002 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:21785692 (20.7 MiB) TX bytes:171939354 (163.9 MiB)
Interrupt:4
tcpdump -ni eth0 igmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
18:02:55.698835 IP 10.22.201.1 > 224.0.0.1: igmp query v2
18:05:00.705689 IP 10.22.201.1 > 224.0.0.1: igmp query v2
18:13:20.730527 IP 10.22.201.1 > 224.0.0.1: igmp query v2
18:15:25.735515 IP 10.22.201.1 > 224.0.0.1: igmp query v2
18:17:30.740653 IP 10.22.201.1 > 224.0.0.1: igmp query v2
18:19:35.747282 IP 10.22.201.1 > 224.0.0.1: igmp query v2
18:21:40.752746 IP 10.22.201.1 > 224.0.0.1: igmp query v2
18:23:45.759415 IP 10.22.201.1 > 224.0.0.1: igmp query v2
18:25:50.766962 IP 10.22.201.1 > 224.0.0.1: igmp query v2
Лог tcpdump на внутреннем интерфейсе:
tcpdump -ni br-lan igmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br-lan, link-type EN10MB (Ethernet), capture size 65535 bytes
18:28:31.192503 IP 192.168.1.198 > 224.0.0.2: igmp leave 239.1.2.131
18:28:32.360252 IP 192.168.1.198 > 224.0.0.2: igmp leave 239.1.39.130
18:28:33.344942 IP 192.168.1.198 > 224.0.0.2: igmp leave 239.1.16.129
18:28:33.960200 IP 192.168.1.198 > 224.0.0.2: igmp leave 239.1.34.3
18:28:34.504327 IP 192.168.1.198 > 224.0.0.2: igmp leave 239.1.34.130
18:28:35.168363 IP 192.168.1.198 > 224.0.0.2: igmp leave 239.1.39.130
cat /etc/config/igmpproxy
quickleave
phyint eth0 upstream ratelimit 0 threshold 1
altnet 10.22.201.1/24
altnet 10.10.0.0/16
phyint br-lan downstream ratelimit 0 threshold 1
igmpproxy -dvv /etc/config/igmpproxy
Searching for config file at '/etc/config/igmpproxy'
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 10.22.201.1/24.
Config: IF: Altnet: Parsed altnet to 10.22.201/24.
Config: IF: Got altnet token 10.10.0.0/16.
Config: IF: Altnet: Parsed altnet to 10.10/16.
IF name : eth0
Next ptr : 0
Ratelimit : 0
Threshold : 1
State : 1
Allowednet ptr : 5952a8
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
buildIfVc: Interface lo Addr: 127.0.0.1, Flags: 0x0049, Network: 127/8
buildIfVc: Interface eth0 Addr: 10.22.4.76, Flags: 0x1043, Network: 10.22.4/24
buildIfVc: Interface br-lan Addr: 192.168.1.1, Flags: 0x1043, Network: 192.168.1/24
Found config for eth0
Found config for br-lan
adding VIF, Ix 0 Fl 0x0 IP 0x0a16044c eth0, Threshold: 1, Ratelimit: 0
Network for [eth0] : 10.22.4/24
Network for [eth0] : 10.22.201/24
Network for [eth0] : 10.10/16
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 V2 member report from 192.168.1.1 to 224.0.0.2
The IGMP message was from myself. Ignoring.
RECV Leave message from 192.168.1.198 to 224.0.0.2
Got leave message from 192.168.1.198 to 239.1.25.129. Starting last member detection.
SENT Membership query from 192.168.1.1 to 239.1.25.129
Sent membership query from 192.168.1.1 to 239.1.25.129. Delay: 10
Created timeout 3 (#1) - delay 0 secs
(Id:1, Time:10)
(Id:3, Time:0)
(Id:2, Time:21)
RECV Membership query from 192.168.1.1 to 239.1.25.129
RECV Leave message from 192.168.1.198 to 224.0.0.2
Got leave message from 192.168.1.198 to 239.1.38.129. Starting last member detection.
SENT Membership query from 192.168.1.1 to 239.1.38.129
Sent membership query from 192.168.1.1 to 239.1.38.129. Delay: 10
Created timeout 4 (#2) - delay 5 secs
(Id:1, Time:5)
(Id:3, Time:0)
(Id:4, Time:5)
(Id:2, Time:16)
RECV Membership query from 192.168.1.1 to 239.1.38.129
About to call timeout 1 (#0)
Aging routes in table.
Current routing table (Age active routes):
-----------------------------------------------------
No routes in table...
-----------------------------------------------------
About to call timeout 3 (#1)
Конфиг файервола:
config rule
option src 'wan'
option proto 'igmp'
option src_ip '0.0.0.0/0'
option target 'ACCEPT'
config rule
option src 'wan'
option proto 'udp'
option dest 'lan'
option dest_ip '224.0.0.0/4'
option target 'ACCEPT'
option src_ip '0.0.0.0/0'