Порт 1 свитча не тегированный, входит во VLAN freedom, порт 2 свитча тегированный, входит во вланы freedom и default, порт 3 не тегированный, входит во VLAN default.
Таким образом получается на роутере две виртуальные сетевухи: freedom и local.
Провайдер вещает IPTV, пробовал смотреть ТВ на ноуте воткнув шнур провайдера и ноут в нетегированные порты в свичте - показывает.\
А вот вещать через роутер никак не получается, пробовал igmpproxy.
Код: Выделить всё
# ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
ether 00:25:22:83:0e:1d
inet6 fe80::225:22ff:fe83:e1d%re0 prefixlen 64 scopeid 0x1
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
pflog0: flags=0<> metric 0 mtu 33152
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
pfsync0: flags=0<> metric 0 mtu 1500
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
syncpeer: 0.0.0.0 maxupd: 128
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0xa
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
local: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=3<RXCSUM,TXCSUM>
ether 00:25:22:83:0e:1d
inet 192.168.81.254 netmask 0xffffff00 broadcast 192.168.81.255
inet6 fe80::225:22ff:fe83:e1d%local prefixlen 64 scopeid 0xb
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
vlan: 1 parent interface: re0
freedom: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=3<RXCSUM,TXCSUM>
ether 00:25:22:83:0e:1d
inet 10.3.19.XX netmask 0xffffffc0 broadcast 10.3.19.191
inet6 fe80::225:22ff:fe83:e1d%freedom prefixlen 64 scopeid 0xc
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
vlan: 100 parent interface: re0
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> metric 0 mtu 1450
inet 217.25.225.XX --> 217.25.224.120 netmask 0xffffffff
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
inet6 fe80::225:22ff:fe83:e1d%tun0 prefixlen 64 scopeid 0xe
inet 172.30.10.6 --> 172.30.10.5 netmask 0xffffffff
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Opened by PID 2050
Код: Выделить всё
int_if="local"
ext_if="ng0"
local_if="freedom"
vpn_if="tun0"
int_addr="192.168.81.254"
ext_addr="217.25.225.XX"
local_net="192.168.81.0/24"
icmp_types="{ echoreq, unreach }"
table <local_freedom> { 10.0.0.0/8 }
table <local_bla-bla> { 10.0.15.0/24 10.0.16.0/24 10.0.0.0/24 }
table <test> persist
set limit { states 20000, frags 20000, src-nodes 5000 }
set block-policy return
scrub in all
scrub out all random-id max-mss 1400
set skip on lo0
nat from $local_net to { !<local_freedom> } -> $ext_if
nat from $local_net to { <local_bla-bla> } -> $vpn_if
nat from $local_net to { <local_freedom> } -> $local_if
block in
pass in quick from 224.0.0.0/4
pass quick on { $int_if $ext_if } proto { igmp udp } to { 224.0.0.0/4 } allow-opts modulate state
pass out keep state
antispoof quick for { lo $int_if }
pass in quick from $local_net to $int_addr
pass in proto tcp to $ext_addr port 2222
pass in proto { tcp, udp, igmp } from $local_net to any
pass in inet proto icmp from $local_net to any icmp-type $icmp_types
pass in inet proto icmp from any to $ext_if icmp-type $icmp_types
Код: Выделить всё
quickleave
phyint freedom upstream ratelimit 0 threshold 1
altnet 10.0.0.0/8
phyint local downstream ratelimit 0 threshold 1
phyint ng0 disabled
phyint tun0 disabled
phyint lo0 disabled
Код: Выделить всё
# igmpproxy -vvvvd /usr/local/etc/igmpproxy.conf
Searching for config file at '/usr/local/etc/igmpproxy.conf'
Config: Quick leave mode enabled.
Config: Got a phyint token.
Config: IF: Config for interface freedom.
Config: IF: Got upstream token.
Config: IF: Got ratelimit token '0'.
Config: IF: Got threshold token '1'.
Config: IF: Got altnet token 10.0.0.0/8.
Config: IF: Altnet: Parsed altnet to 10/8.
IF name : freedom
Next ptr : 0
Ratelimit : 0
Threshold : 1
State : 1
Allowednet ptr : c54040
Config: Got a phyint token.
Config: IF: Config for interface local.
Config: IF: Got downstream token.
Config: IF: Got ratelimit token '0'.
Config: IF: Got threshold token '1'.
IF name : local
Next ptr : 0
Ratelimit : 0
Threshold : 1
State : 2
Allowednet ptr : 0
Config: Got a phyint token.
Config: IF: Config for interface ng0.
Config: IF: Got disabled token.
IF name : ng0
Next ptr : 0
Ratelimit : 0
Threshold : 1
State : 0
Allowednet ptr : 0
Config: Got a phyint token.
Config: IF: Config for interface tun0.
Config: IF: Got disabled token.
IF name : tun0
Next ptr : 0
Ratelimit : 0
Threshold : 1
State : 0
Allowednet ptr : 0
Config: Got a phyint token.
Config: IF: Config for interface lo0.
Config: IF: Got disabled token.
IF name : lo0
Next ptr : 0
Ratelimit : 0
Threshold : 1
State : 0
Allowednet ptr : 0
buildIfVc: Interface lo0 Addr: 127.0.0.1, Flags: 0xffff8049, Network: 127/8
buildIfVc: Interface local Addr: 192.168.81.254, Flags: 0xffff8843, Network: 192.168.81/24
buildIfVc: Interface freedom Addr: 10.3.19.141, Flags: 0xffff8843, Network: 10.3.19.128/26
Found config for local
Found config for freedom
adding VIF, Ix 0 Fl 0x0 IP 0xfe51a8c0 local, Threshold: 1, Ratelimit: 0
Network for [local] : 192.168.81/24
adding VIF, Ix 1 Fl 0x0 IP 0x8d13030a freedom, Threshold: 1, Ratelimit: 0
Network for [freedom] : 10.3.19.128/26
Network for [freedom] : 10/8
Got 262144 byte buffer size in 0 iterations
Joining all-routers group 224.0.0.2 on vif 192.168.81.254
joinMcGroup: 224.0.0.2 on local
SENT Membership query from 192.168.81.254 to 224.0.0.1
Sent membership query from 192.168.81.254 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 V2 member report from 192.168.81.254 to 224.0.0.2
The IGMP message was from myself. Ignoring.
RECV Membership query from 192.168.81.254 to 224.0.0.1
RECV V2 member report from 192.168.81.10 to 239.255.255.250
Should insert group 239.255.255.250 (from: 192.168.81.10) to route table. Vif Ix : 0
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 #0
Joining group 239.255.255.250 upstream on IF address 10.3.19.141
joinMcGroup: 239.255.255.250 on freedom
Current routing table (Insert Route):
-----------------------------------------------------
#0: Src: 0.0.0.0, Dst: 239.255.255.250, Age:2, St: I, OutVifs: 0x00000001
-----------------------------------------------------
RECV V2 member report from 192.168.81.254 to 224.0.0.2
The IGMP message was from myself. Ignoring.
RECV Leave message from 192.168.81.10 to 224.0.0.2
Got leave message from 192.168.81.10 to 233.0.42.100. Starting last member detection.
SENT Membership query from 192.168.81.254 to 233.0.42.100
Sent membership query from 192.168.81.254 to 233.0.42.100. Delay: 10
Created timeout 3 (#1) - delay 3 secs
(Id:1, Time:7)
(Id:3, Time:3)
(Id:2, Time:18)
RECV Membership query from 192.168.81.254 to 233.0.42.100
RECV V2 member report from 192.168.81.10 to 233.0.41.102
Should insert group 233.0.41.102 (from: 192.168.81.10) to route table. Vif Ix : 0
No existing route for 233.0.41.102. Create new.
Found existing routes. Find insert location.
Inserting at beginning, before route 239.255.255.250
Inserted route table entry for 233.0.41.102 on VIF #0
Joining group 233.0.41.102 upstream on IF address 10.3.19.141
joinMcGroup: 233.0.41.102 on freedom
Current routing table (Insert Route):
-----------------------------------------------------
#0: Src: 0.0.0.0, Dst: 233.0.41.102, Age:2, St: I, OutVifs: 0x00000001
#1: Src: 0.0.0.0, Dst: 239.255.255.250, Age:2, St: I, OutVifs: 0x00000001
-----------------------------------------------------
RECV V2 member report from 192.168.81.10 to 233.0.41.102
Should insert group 233.0.41.102 (from: 192.168.81.10) to route table. Vif Ix : 0
Updated route entry for 233.0.41.102 on VIF #0
Current routing table (Insert Route):
-----------------------------------------------------
#0: Src: 0.0.0.0, Dst: 233.0.41.102, Age:2, St: I, OutVifs: 0x00000001
#1: Src: 0.0.0.0, Dst: 239.255.255.250, Age:2, St: I, OutVifs: 0x00000001
-----------------------------------------------------
About to call timeout 1 (#0)
Aging routes in table.
Current routing table (Age active routes):
-----------------------------------------------------
#0: Src: 0.0.0.0, Dst: 233.0.41.102, Age:2, St: I, OutVifs: 0x00000001
#1: Src: 0.0.0.0, Dst: 239.255.255.250, Age:1, St: I, OutVifs: 0x00000001
-----------------------------------------------------
About to call timeout 3 (#0)
RECV Leave message from 192.168.81.10 to 224.0.0.2
Got leave message from 192.168.81.10 to 233.0.41.102. Starting last member detection.
Leaving group 233.0.41.102 upstream on IF address 10.3.19.141
leaveMcGroup: 233.0.41.102 on freedom
SENT Membership query from 192.168.81.254 to 233.0.41.102
Sent membership query from 192.168.81.254 to 233.0.41.102. Delay: 10
Created timeout 4 (#0) - delay 10 secs
(Id:4, Time:10)
(Id:2, Time:8)
RECV Membership query from 192.168.81.254 to 233.0.41.102
^Cselect() failure; Errno(4): Interrupted system call
Got a interupt signal. Exiting.
clean handler called
Removing route entry for 233.0.41.102
Route is not active. No kernel updates done.
Leaving group 233.0.41.102 upstream on IF address 10.3.19.141
leaveMcGroup: 233.0.41.102 on freedom
MRT_DROP_MEMBERSHIP failed; Errno(49): Can't assign requested address
Removing route entry for 239.255.255.250
Route is not active. No kernel updates done.
Leaving group 239.255.255.250 upstream on IF address 10.3.19.141
leaveMcGroup: 239.255.255.250 on freedom
All routes removed. Routing table is empty.
Shutdown complete....
Не знаю даже в какую сторону рыть (