Change background image
LOVE quotion

Bắt đầu từ 4.53' thứ Hai ngày 17/10/2011


You are not connected. Please login or register

Xem chủ đề cũ hơn Xem chủ đề mới hơn Go down  Thông điệp [Trang 1 trong tổng số 1 trang]

Zone
Zone Ưu tú

Cấp bậc: Ưu tú

Bài viết : 832

Danh vọng : 1544

Uy tín : 0

Hi! Thanks to the kindness of people on this board - successfully configured the router route your support IPTV.
For this reason I decided to gather in one place relevant knowledge and to share with you my configuration.


IMPORTANT

Before you read the following guide przeczytaj:
- http://wiki.openwrt.org/doc/uci/network/switch
- http://wiki.openwrt.org/doc/howto/udp_multicast
- http://www.computerhilfen.de/hilfen-22-389919-0.html

Diagram - my assumption

[HOWTO] IPTV - sample configuration 4krgsg11

From supplier I have:

  • Internet - Nietagowany (VLAN5, Eth0.5, Wan)
  • IPTV - tagging VLAN1 (VLAN1, eth0.1, wan_iptv)
  • Management - tagging VLAN6 (VLAN6, eth0.6, wan_adm)


What I wanted to achieve:

  • Internet ports 2.3 and WIFI - for computers
  • TV on port 1 (multicast) - IPTV decoder (SetTopBox)
  • TV on port 2.3 and WIFI (tcp) - for computers
  • everything on the port 4 - for a neighbor (to on your router did the same as me)


1. Know VLANs in your network

- I used sniffer with http://networksecuritytoolkit.org
- Windows hard sniff VLAN, because often drivers for network cards do not support cit. http://wiki.wireshark.org/CaptureSetup/VLAN#Windows

Windows has no built- in support mechanisms for VLANs. There are not separate physical and VLAN interfaces you can capture from, or unless a specialized driver That adds dry support is present.

So it is best to use for this some linux

2. Configure VLANs on the router

For me, the high VLANs so if you must remember to set the use enable_vlan4k  ' 1 ' in the file / etc / config / network
Code:
config 'switch'
    option 'name' 'rtl8366rb'
    option 'reset' '1'
    option 'enable_vlan' '1'
    option 'enable_vlan4k' '1'

/etc/config/network
Code:
config 'interface' 'loopback'
    option 'ifname' 'lo'
    option 'proto' 'static'
    option 'ipaddr' '127.0.0.1'
    option 'netmask' '255.0.0.0'

#VLAN6
config 'interface' 'wan_adm'
    option 'ifname' 'eth0.6'
    option 'proto' 'dhcp'
    option 'metric' '10'

#VLAN1
config 'interface' 'wan_iptv'
    option 'ifname' 'eth0.1'
    option 'proto' 'dhcp'
    option 'metric' '20'

#VLAN5
config 'interface' 'wan'
    option 'ifname' 'eth0.5'
    option 'proto' 'dhcp'
    
config 'interface' 'lan'
    option 'ifname' 'eth0.2'
    option 'type' 'bridge'
    option 'proto' 'static'
    option 'netmask' '255.255.255.0'
    option 'ipaddr' '192.168.1.1'

config 'switch'
    option 'name' 'rtl8366rb'
    option 'reset' '1'
    option 'enable_vlan' '1'
    option 'enable_vlan4k' '1'

config 'switch_vlan'
    option 'device' 'rtl8366rb'
    option 'vlan' '6'
    option 'ports' '0t 4t 5t'
    #na port 0 (WAN - wan_adm) - comes tagged VLAN6,
    #na port 4 - tagged out
    #na port 5 (Procek) - comes tagged

config 'switch_vlan'
    option 'device' 'rtl8366rb'
    option 'vlan' '1'
    option 'ports' '0t 1 4t 5t'
    #na port 0 (WAN - wan_iptv) - comes tagged VLAN1,
    #na port 4 - tagged out
    #na port 1 - out nietagowany (connection of the decoder)
    #na port 5 (Procek) - comes tagged

config 'switch_vlan'
    option 'device' 'rtl8366rb'
    option 'vlan' '5'
    option 'ports' '0 4 5t'
    #na port 0 (WAN - wan) - comes nietagowany,
    #na port 4 - out nietagowany
    #na port 5 (Procek) - comes tagged

config 'switch_vlan'
    option 'device' 'rtl8366rb'
    option 'vlan' '2'
    option 'ports' '2 3 5t'
    #na port 2 and 3 - out nietagowany
    #na port 5 (Procek) - comes tagged VLAN2

config 'route'
        option 'interface' 'wan_iptv'
        option 'target' '224.0.0.0'
        option 'netmask' '240.0.0.0'

we add to the default configuration of / etc / config / dhcp
Code:
dhcp config wan_iptv
    option 'interface' 'wan_iptv'
    option 'ignore' '1'

config dhcp wan_adm
    option 'interface' 'wan_adm'
    option 'ignore' '1'  

we add to the default configuration of / etc / config / firewall
Code:
#definicja for wan_iptv with nat
config 'zone'
        option 'name' 'wan_iptv'
        option 'input' 'REJECT'
        option 'output' 'ACCEPT'
        option 'forward' 'REJECT'
        option 'masq' '1'
        option 'mtu_fix' 1 '
        option 'network' 'wan_iptv'

config 'forwarding'
        option 'src' 'lan'
        option '' 'wan_iptv'

# ----- PINGI the wan_iptv
config 'rule'
        option 'name' 'Allow-DHCP-Renew-wan_iptv'
        option 'src' 'wan_iptv'
        option 'proto' 'udp'
        option 'dest_port' '68'
        option 'target' 'ACCEPT'
        option 'family' 'ipv4'

config 'rule'
        option 'name' 'Allow-Ping-wan_iptv'
        option 'src' 'wan_iptv'
        option 'proto' 'icmp'
        option 'icmp_type' 'echo-request'
        option 'family' 'ipv4'
        option 'target' 'ACCEPT'
        
# ----- Udpxy
config 'rule'
       option 'src' 'wan_iptv'
       option 'proto' 'igmp'
       option 'target' 'ACCEPT'

config 'rule'
       option 'src' 'wan_iptv'
       option 'proto' 'udp'
       option 'dest_x' '224.0.0.0/4'
       option 'target' 'ACCEPT'

3. Check VLANs in your network


When such a configuration, the result
Code:
route -n

It should look something like this (of course, IP addresses and VLANs are specific to your network):
Code:
root@OpenWrt:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
0.0.0.0 213.154.24.0 255.255.255.0 U 0 0 0 eth0.5
0.0.0.0 172.18.15.0 255.255.254.0 U 0 0 0 eth0.1
0.0.0.0 172.14.18.0 255.255.252.0 U 0 0 0 eth0.6
224.0.0.0 240.0.0.0 0.0.0.0 U 0 0 0 eth0.1
0.0.0.0 213.154.24.1 0.0.0.0 UG 0 0 0 eth0.5

Results of swconfig should look something like this:
Code:
root@OpenWrt:~# swconfig dev rtl8366rb vlan 1 show
VLAN 1:
        info: VLAN 1: Ports: '0t14t5t', members=003d, untag=000c, fid=0
        in: 0
        ports: 0t 1 4t 5t

root@OpenWrt:~# swconfig dev rtl8366rb vlan 2 show
VLAN 2:
        info: VLAN 2: Ports: '235t', members=0022, untag=0002, fid=0
        in: 0
        ports: 2 3 5t

root@OpenWrt:~# swconfig dev rtl8366rb vlan 5 show
VLAN 5:
        info: VLAN 5: Ports: '045t', members=0031, untag=0011, fid=0
        in: 0
        ports: 0 4 5t

root@OpenWrt:~# swconfig dev rtl8366rb vlan 6 show
VLAN 6:
        info: VLAN 6: Ports: '0t4t5t', members=0031, untag=0000, fid=0
        in: 0
        ports: 0t 4t 5t

This is where IPTV should work now.

IPTV WIFI

Use the package udpxy (multicast to unicast) 

Installation package
Code:
opkg install udpxy

Creating a startup script (if there is)
Code:
touch /etc/init.d/udpxy
chmod a+x /etc/init.d/udpxy

the contents of the script /etc/init.d/udpxy where 192.168.1.1 is the IP address of the router on the LAN
Code:
#!/bin/sh /etc/rc.common
# Copyright (C) 2010 OpenWrt.org

START=99
STOP=10

# 192.168.1.1 - IP address of the router's LAN
# 8080 - the port on which to operate
IGMP_OPTS="-p 8080 -a 192.168.1.1"
IGMP_BIN="/usr/bin/udpxy"
PID_F="/var/run/udpxy.pid"

start() {
        echo "Starting udpxy"
        start-stop-daemon -S -x $IGMP_BIN -p $PID_F -b -m -- $IGMP_OPTS
}

stop() {
        echo "Stopping udpxy"
        start-stop-daemon -K -x $IGMP_BIN -p $PID_F -q
}

We turn on the service:
Code:
/etc/init.d/udpxy enable

We run the service:
Code:
/etc/init.d/udpxy start

When you start please check the log does not appear in the following problems, we read log:
Code:
logread

Unfortunately for us, there can appear:
Code:
udpxy[55201]: read_buf: read: Resource temporarily unavailable

Then you have to fight with the configuration
- the firewall (eg. Closed ports)
- network (eg. Bad VLANs, no routes)

Generally udpxy it is working problems through WIFI up 802.11 g.
If everything is in order at this
Code:
http://192.168.1.1:8080/status

You will be an information page.
If the cable , it is possible to play in VLC (where 239.64.64.58:6000 is an address transmission)
Code:
udp://@239.64.64.58:6000

For WIFI stream video to VLC we get:
Code:
http://192.168.1.1:8080/udp/239.64.64.58:6000

Saving IPTV streams
Code:
udpxrec -T -c 239.64.64.58:6000 /tmp/streamdump.mpg

Package igmpproxy
On the Attitude Adjustment 12.09 you can successfully use a package igmpproxy when the function 'IGMP snooping' (see below)
installation package
Code:
opkg install igmpproxy

We turn on the service:
Code:
/etc/init.d/igmpproxy enable

Pzykładowa configuration / etc / config / igmpproxy
Code:
config igmpproxy
        option quickleave 1

config phyint
        option network wan
        option direction upstream
        list altnet 192.168.65.0/24

config phyint
        option network lan
        option direction downstream

We run the service:
Code:
/etc/init.d/igmpproxy start

In this configuration, it is important to correctly set the parameter "Altnet".
If you do not know how to set the parameter "Altnet" search log something like: "Warn: The source address 192.168.65.166 for group 233.32.240.222, is not in any valid net for upstream VIF " In this way, you know the source of the multicast address by your provider.

IGMP snooping i multicast forwarding
IGMP snooping is not supported in older versions (eg. Backfire 10.03.1), and this may cause flooding of packets (ang. "IGMP multicast flooding")
At 12.09 AA function it is by default OFF
(worth following http://wiki.openwrt.org/doc/howto/udp_multicast because previously it was different)

Installation:
Code:
opkg update
opkg install kmod-bridge

For efficient operation of IPTV benefiting of igmpproxy or udpxy should:
- enable IGMP snooping in the interface lan
Code:
config interface lan
        option type bridge
        option igmp_snooping 1
        ...

-  Turn off multicast snooping

Code:
echo "1" > /sys/devices/virtual/net/br-lan/bridge/multicast_snooping

Nguồn: http://eko.one.pl/forum/viewtopic.php?id=3400
      
Zone
Zone Ưu tú

Cấp bậc: Ưu tú

Bài viết : 832

Danh vọng : 1544

Uy tín : 0

Config IPTV for WR1043ND v.3 với Chaos Calmer 15.05.1


Part 1. Default configuration:

WAN -> {p5 -> p6 in vlan2 (these VLAN's are internal in switch)} -> eth0 -> CPU-> eth1 -> {p0 -> p1-p4 in vlan1}. This is the default "router" mode.

Code:
                ________________________________
               |               CPU              |
               |eth1                        eth0|          
               |________________________________|
                 |                            |
_________________|____________________________|__
switch port   | p0 | p1 | p2 | p3 | p4 | p5 | p6 |
______________|____|____|____|____|____|____|____|
router port   |  - |lan4|lan3|lan2|lan1|wan |  - |
______________|____|____|____|____|____|____|____|
vlan1         |  u |  u |  u |  u |  u |  x |  x |          
______________|____|____|____|____|____|____|____|
vlan2         |  x |  x |  x |  x |  x |  u |  u |          
______________|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

Part 2. My configuration at this moment:

My ISP gives me Internet in vlan35 and IPTV in vlan36.

For IPTV, I need to make a bridge between tagged WAN port p5 and LAN4 port p1 (my IP adapter is connected to LAN4).

vlan36 -> WAN -> p5 -> p1 untagged

For Internet traffic:

vlan35 -> WAN -> p5 -> p6 untagged -> eth0 -> CPU -> eth1 -> p0 -> p2-p4 in vlan1

Code:
                ________________________________
               |               CPU              |
               |eth1                        eth0|          
               |________________________________|
                 |                            |
_________________|____________________________|__
switch port   | p0 | p1 | p2 | p3 | p4 | p5 | p6 |
______________|____|____|____|____|____|____|____|
router port   |  - |lan4|lan3|lan2|lan1|wan |  - |
______________|____|____|____|____|____|____|____|
vlan1 (lan)   |  u |  x |  u |  u |  u |  x |  x |          
______________|____|____|____|____|____|____|____|
vlan35 (inet) |  x |  x |  x |  x |  x |  t |  u |          
______________|____|____|____|____|____|____|____|
vlan36 (iptv) |  x |  u |  x |  x |  x |  t |  x |          
______________|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

Configuration file /etc/config/network is:

Code:
config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config interface 'lan'
    option ifname 'eth1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '10.1.6.8'
    option netmask '255.255.254.0'

config interface 'wan'
    option ifname 'eth0'
    option proto 'pppoe'
    option username 'username'
    option password 'password'
    option dns '8.8.8.8 8.8.4.4'

config interface 'guest'
    option proto 'static'
    option ipaddr '172.16.7.8'
    option netmask '255.255.255.0'

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

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option vid '1'
    option ports '0 2 3 4'

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

config switch_vlan
    option device 'switch0'
    option vlan '3'
    option vid '36'
    option ports '1 5t'

Part 3. For configuration as above, plus VoIP in vlan37 (let's say, VoIP goes to LAN3) is necessary:

a. exclude LAN3 (p2) from vlan1 to release this port for VoIP vlan37

b. add vlan37 to config and make a bridge between tagged WAN port p5 and LAN3 port p2.

Code:
                ________________________________
               |               CPU              |
               |eth1                        eth0|          
               |________________________________|
                 |                            |
_________________|____________________________|__
switch port   | p0 | p1 | p2 | p3 | p4 | p5 | p6 |
______________|____|____|____|____|____|____|____|
router port   |  - |lan4|lan3|lan2|lan1|wan |  - |
______________|____|____|____|____|____|____|____|
vlan1 (lan)   |  u |  x |  x |  u |  u |  x |  x |          
______________|____|____|____|____|____|____|____|
vlan35 (inet) |  x |  x |  x |  x |  x |  t |  u |          
______________|____|____|____|____|____|____|____|
vlan36 (iptv) |  x |  u |  x |  x |  x |  t |  x |          
______________|____|____|____|____|____|____|____|
vlan37 (voip) |  x |  x |  u |  x |  x |  t |  x |          
______________|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

So now vlan part of /etc/config/network will looks as following:

Code:
config switch_vlan
    option device 'switch0'
    option vlan '1'
    option vid '1'
    option ports '0 3 4'

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

config switch_vlan
    option device 'switch0'
    option vlan '3'
    option vid '36'
    option ports '1 5t'

config switch_vlan
    option device 'switch0'
    option vlan '4'
    option vid '37'
    option ports '2 5t'

Note: VoIP config in part 3 was not tested, but IPTV config in part 2 is working perfectly for me.

[HOWTO] IPTV - sample configuration Wr104310
Switch

[HOWTO] IPTV - sample configuration Wr104312
Interface Overview
      
Zone
Zone Ưu tú

Cấp bậc: Ưu tú

Bài viết : 832

Danh vọng : 1544

Uy tín : 0

Config IPTV for Archer C7

Part 1. Default configuration:

WAN -> {p1 -> p6 in vlan2 (these VLAN's are internal in switch)} -> eth0 -> CPU-> eth1 -> {p0 -> p2-p5 in vlan1}. This is the default "router" mode.

[HOWTO] IPTV - sample configuration C7vlan10

Code:
                ________________________________
               |               CPU              |
               |eth1                        eth0|          
               |________________________________|
                 |                            |
_________________|____________________________|__
switch port   | p0 | p1 | p2 | p3 | p4 | p5 | p6 |
______________|____|____|____|____|____|____|____|
router port   |  - |wan |lan1|lan2|lan3|lan4|  - |
______________|____|____|____|____|____|____|____|
vlan1         |  u |  x |  u |  u |  u |  u |  x |          
______________|____|____|____|____|____|____|____|
vlan2         |  x |  u |  x |  x |  x |  x |  u |          
______________|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

Configuration file /etc/config/network is:

Code:
config interface 'loopback'
 option ifname 'lo'
 option proto 'static'
 option ipaddr '127.0.0.1'
 option netmask '255.0.0.0'

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

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'

config switch_vlan
 option device 'switch0'
 option vlan '1'
 option ports '2 3 4 5 0'

config switch_vlan
 option device 'switch0'
 option vlan '2'
 option ports '1 6'

Part 2. My configuration at this moment:

My ISP gives me Internet in vlan35 and IPTV in vlan36.

For IPTV, I need to make a bridge between tagged WAN port p1 and LAN4 port p5 (my IP adapter is connected to LAN4).

vlan36 -> WAN -> p1 -> p5 untagged

For Internet traffic:

vlan35 -> WAN -> p1 -> p6 untagged -> eth0 -> CPU -> eth1 -> p0 -> p2-p4 in vlan1

Code:
                ________________________________
               |               CPU              |
               |eth1                        eth0|          
               |________________________________|
                 |                            |
_________________|____________________________|__
switch port   | p0 | p1 | p2 | p3 | p4 | p5 | p6 |
______________|____|____|____|____|____|____|____|
router port   |  - |wan |lan1|lan2|lan3|lan4|  - |
______________|____|____|____|____|____|____|____|
vlan1 (lan)   |  t |  x |  u |  x |  x |  x |  x |          
______________|____|____|____|____|____|____|____|
vlan35 (inet) |  t |  x |  x |  u |  u |  x |  x |          
______________|____|____|____|____|____|____|____|
vlan36 (iptv) |  t |  x |  x |  x |  x |  u |  x |          
______________|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

Configuration file /etc/config/network is:

Code:
config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config interface 'lan'
    option ifname 'eth1'
    option type 'bridge'openwrt
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config interface 'wan'
    option ifname 'eth0'
    option proto 'static'
    option ipaddr '172.21.41.45'
    option netmask '255.255.0.0'
    option gateway '172.21.0.1'
    option dns '8.8.8.8 8.8.4.4'

config interface 'wan6'
    option ifname '@wan'
    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 vid '1'
    option ports '2 3 4 0'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '1t 6'
    option vid '35'

config switch_vlan
    option device 'switch0'
    option vlan '3'
    option vid '36'
    option ports '1t 5'

Part 3. For configuration as above, plus VoIP in vlan37 (let's say, VoIP goes to LAN3) is necessary:

a. exclude LAN3 (p4) from vlan1 to release this port for VoIP vlan37

b. add vlan37 to config and make a bridge between tagged WAN port p1 and LAN3 port p4.

Code:
                ________________________________
               |               CPU              |
               |eth1                        eth0|          
               |________________________________|
                 |                            |
_________________|____________________________|__
switch port   | p0 | p1 | p2 | p3 | p4 | p5 | p6 |
______________|____|____|____|____|____|____|____|
router port   |  - |wan |lan1|lan2|lan3|lan4|  - |
______________|____|____|____|____|____|____|____|
vlan1 (lan)   |  u |  x |  u |  u |  x |  x |  x |          
______________|____|____|____|____|____|____|____|
vlan35 (inet) |  x |  t |  x |  x |  x |  x |  u |          
______________|____|____|____|____|____|____|____|
vlan36 (voip) |  x |  t |  x |  x |  x |  u |  x |          
______________|____|____|____|____|____|____|____|
vlan37 (iptv) |  x |  t |  x |  x |  u |  x |  x |          
______________|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

So now vlan part of /etc/config/network will looks as following:

Code:
config switch_vlan
    option device 'switch0'
    option vlan '1'
    option vid '1'
    option ports '0 2 3'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '1t 6'
    option vid '35'

config switch_vlan
    option device 'switch0'
    option vlan '3'
    option vid '36'
    option ports '1t 5'

config switch_vlan
    option device 'switch0'
    option vlan '4'
    option vid '37'
    option ports '1t 4'

Link:
https://coredump.net.au/tp-link-archer-c7-multiple-ssid-and-vlan-tagging-with-openwrt/#more-30
https://forum.openwrt.org/viewtopic.php?id=57944
https://wiki.openwrt.org/toh/tp-link/tl-wdr7500

với GoldenOrb 2017-07-01 (multi wan)

[HOWTO] IPTV - sample configuration Acherc10
      
Zone
Zone Ưu tú

Cấp bậc: Ưu tú

Bài viết : 832

Danh vọng : 1544

Uy tín : 0

Config IPTV for Xiaomi Mini R1CM with OpenWrt Designated Driver

OpenWrt Designated Driver r49395:

OpenWrt Designated Driver r49379:
      
Zone
Zone Ưu tú

Cấp bậc: Ưu tú

Bài viết : 832

Danh vọng : 1544

Uy tín : 0

Config IPTV for Xiaomi Mini R1CM on OpenWrt/PandoraBox

Part 1. Default configuration:

Port4: WAN
Port1: LAN1
Port0: LAN2

WAN -> {p1 -> p6 in vlan2 (these VLAN's are internal in switch)} -> eth0 -> CPU-> eth1 -> {p0 -> p2-p5 in vlan1}. This is the default "router" mode.

[HOWTO] IPTV - sample configuration Pandor10

Code:
                _____________________________________
               |                 CPU                 |
               |eth1                             eth0|          
               |_____________________________________|
                 |                                |
_________________|________________________________|___
switch port   | p0 | p1 | p2 | p3 | p4 | p5 | p6 | p7 |
______________|____|____|____|____|____|____|____|____|
router port   |lan2|lan1|  - |  - |wan |  - |CPU |  - |
______________|____|____|____|____|____|____|____|____|
vlan1         |  u |  u |  u |  u |  x |  u |  t |  t |          
______________|____|____|____|____|____|____|____|____|
vlan2         |  x |  x |  x |  x |  u |  x |  t |  t |          
______________|____|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

Configuration file /etc/config/network is:

Code:
# /etc/config/network

config globals 'globals'
    option ula_prefix 'auto'

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config interface 'lan'
    option ifname 'eth0.1'
    option type 'bridge'
    option proto 'static'
    option macaddr 'ba:db:ad:fa:ca:de'
    option ipaddr '10.0.0.1'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option force_link '1'

config interface 'wan'
    option ifname 'eth0.2'
    option proto 'dhcp'
    option macaddr '53:3f:ac:e2:fa:ce'

config interface 'modem'
    option ifname 'eth0.2'
    option proto 'static'
    option delegate '0'
    option ipaddr '192.168.1.2'
    option netmask '255.255.255.0'
    option layer '1'

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

config switch_vlan
    option device 'mt762x'
    option vlan '1'
    option ports '0 1 2 3 5 6t 7t'

config switch_vlan
    option device 'mt762x'
    option vlan '2'
    option ports '4 6t 7t'

Part 2. My configuration at this moment:

My ISP gives me Internet in vlan35 and IPTV in vlan36.

For IPTV, I need to make a bridge between tagged WAN port p1 and LAN4 port p5 (my IP adapter is connected to LAN4).

vlan36 -> WAN -> p1 -> p5 untagged

For Internet traffic:

vlan35 -> WAN -> p1 -> p6 untagged -> eth0 -> CPU -> eth1 -> p0 -> p2-p4 in vlan1

Code:
                ________________________________
               |               CPU              |
               |eth1                        eth0|          
               |________________________________|
                 |                            |
_________________|____________________________|_______
switch port   | p0 | p1 | p2 | p3 | p4 | p5 | p6 | p7 |
______________|____|____|____|____|____|____|____|____|
router port   |lan1|lan2| _  | _  |wan |    |CPU |    |
______________|____|____|____|____|____|____|____|____|
vlan1 (lan)   |  u |  x |  u |  u |  u |  x |  x |    |        
______________|____|____|____|____|____|____|____|____|
vlan35 (inet) |  x |  t |  x |  x |  x |  x |  u |    |        
______________|____|____|____|____|____|____|____|____|
vlan36 (iptv) |  x |  t |  x |  x |  x |  u |  x |    |         
______________|____|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

Configuration file /etc/config/network is:

Code:
config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config interface 'lan'
    option ifname 'eth1'
    option type 'bridge'openwrt
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config interface 'wan'
    option ifname 'eth0'
    option proto 'static'
    option ipaddr '172.21.41.45'
    option netmask '255.255.0.0'
    option gateway '172.21.0.1'
    option dns '8.8.8.8 8.8.4.4'

config interface 'wan6'
    option ifname '@wan'
    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 vid '1'
    option ports '2 3 4 0'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '1t 6'
    option vid '35'

config switch_vlan
    option device 'switch0'
    option vlan '3'
    option vid '36'
    option ports '1t 5'

Part 3. For configuration as above, plus VoIP in vlan37 (let's say, VoIP goes to LAN3) is necessary:

a. exclude LAN3 (p4) from vlan1 to release this port for VoIP vlan37

b. add vlan37 to config and make a bridge between tagged WAN port p1 and LAN3 port p4.

Code:
                ________________________________
               |               CPU              |
               |eth1                        eth0|          
               |________________________________|
                 |                            |
_________________|____________________________|__
switch port   | p0 | p1 | p2 | p3 | p4 | p5 | p6 |
______________|____|____|____|____|____|____|____|
router port   |  - |wan |lan1|lan2|lan3|lan4|  - |
______________|____|____|____|____|____|____|____|
vlan1 (lan)   |  u |  x |  u |  u |  x |  x |  x |          
______________|____|____|____|____|____|____|____|
vlan35 (inet) |  x |  t |  x |  x |  x |  x |  u |          
______________|____|____|____|____|____|____|____|
vlan36 (voip) |  x |  t |  x |  x |  x |  u |  x |          
______________|____|____|____|____|____|____|____|
vlan37 (iptv) |  x |  t |  x |  x |  u |  x |  x |          
______________|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

So now vlan part of /etc/config/network will looks as following:

Code:
config switch_vlan
    option device 'switch0'
    option vlan '1'
    option vid '1'
    option ports '0 2 3'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '1t 6'
    option vid '35'

config switch_vlan
    option device 'switch0'
    option vlan '3'
    option vid '36'
    option ports '1t 5'

config switch_vlan
    option device 'switch0'
    option vlan '4'
    option vid '37'
    option ports '1t 4'
      
Zone
Zone Ưu tú

Cấp bậc: Ưu tú

Bài viết : 832

Danh vọng : 1544

Uy tín : 0

Config Xiaomi Router Mini với firmware Padavan (XRMWRT) dùng IPTV

[HOWTO] IPTV - sample configuration 720px-10

Прошивка роутера Xiaomi WiFi Mini от Padavan или Asus
DMZ setup with router Asus RT-N56U
Mini-FAQ for routers ASUS RT-N14U/N56U/N65U/N11P/AC51U/AC54U/AC1200HP/N56UB1
Xiaomi Router Mini with full Unifi support, turn into a beast with custom asus rom!
[TUTORIAL + REVIEW] XIAOMI MINI ROUTER - PADAVAN ASUS - T

[HOWTO] IPTV - sample configuration Screen27[HOWTO] IPTV - sample configuration Ralink10

Card wifi MediaTek 7630 hoặc Ralink cần chỉnh lại Country Region #1 (1-13) để tương thich với Region Code ngoài US

[HOWTO] IPTV - sample configuration Wifi10

Hoặc chọn Region code trên ASUS Router là USA (chanels 1-11) hoặc cố định kênh trong Radio Chanel

IPTV với STB của Viettel:

IPTV không cần STB với FPT, VNPT:

[HOWTO] IPTV - sample configuration Padava21
Set IP tĩnh cho từng thiết bị (nếu muốn)

[HOWTO] IPTV - sample configuration Padava19
Enable firewall cho router và các chức năng nâng cao cho tường lửa 

[HOWTO] IPTV - sample configuration Padava20
Mở cổng ngoài để có thể đăng nhập router từ cổng WAN

[HOWTO] IPTV - sample configuration Screen22
Firmware Padavan cho IPTV trên SCH cực ổn định (hình trên cho thấy hơn 320 ngày)

Lưu ý: What are the existing network interfaces (transcript naming interfaces)?

br0 = LAN + WLAN + AP-Client + WDS
eth2 = Ethernet interface GMAC1, that connected to the switch (trunk port).
eth2.1 = LAN (VLAN VID1)
eth2.2 = WAN (VLAN VID2)
ra0 = WLAN 2.4GHz
ra1 = WLAN 2.4GHz Guest

rai0 = WLAN 5GHz
rai1 = WLAN 5GHz Guest
apcli0 = AP-Client 5GHz
apclii0 = AP-Client 2.4GHz
wds0-wds3 = WDS 5GHz
wdsi0-wdsi3 = WDS 2.4GHz


CMD cho cấu hình bước đầu:

passwd
wget http://downloads.openwrt.org.cn/PandoraBox/Xiaomi-Mini-R1CM/stable/PandoraBox-ralink-mt7620-xiaomi-mini-squashfs-sysupgrade-r1024-20150608.bin -P /tmp
cat /proc/mtd
df -h
cp /dev/mtd2 /tmp/mtd2.bin
mtd_storage.sh save
mtd_write write /tmp/mtd2.bin Factory
mtd_write write /tmp/mtd0.bin Bootloader


IFCONFIG có được sau khi thiết lập IPTV Viettel:

/home/root # ifconfig
br0       Link encap:Ethernet  HWaddr F0:B4:29:7F:00:0C
         inet addr:10.1.6.8  Bcast:10.1.7.255  Mask:255.255.254.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:1682538 errors:0 dropped:0 overruns:0 frame:0
         TX packets:2750833 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:160157263 (152.7 MiB)  TX bytes:3690113106 (3.4 GiB)

eth2      Link encap:Ethernet  HWaddr F0:B4:29:7F:00:0C
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:4319398 errors:0 dropped:0 overruns:0 frame:0
         TX packets:2186858 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:5376311057 (5.0 GiB)  TX bytes:598344504 (570.6 MiB)
         Interrupt:5

eth2.1    Link encap:Ethernet  HWaddr F0:B4:29:7F:00:0C
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:294054 errors:0 dropped:0 overruns:0 frame:0
         TX packets:274716 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:28217357 (26.9 MiB)  TX bytes:81661769 (77.8 MiB)

eth2.35   Link encap:Ethernet  HWaddr EC:08:6B:57:EE:9D
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:2717419 errors:0 dropped:0 overruns:0 frame:0
         TX packets:1856863 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:3546014242 (3.3 GiB)  TX bytes:497157012 (474.1 MiB)

eth2.36   Link encap:Ethernet  HWaddr EC:08:6B:57:EE:9D
         inet addr:10.171.252.3  Bcast:10.171.252.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:1236022 errors:0 dropped:0 overruns:0 frame:0
         TX packets:399 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:1699331190 (1.5 GiB)  TX bytes:91710 (89.5 KiB)

lo        Link encap:Local Loopback
         inet addr:127.0.0.1  Mask:255.0.0.0
         UP LOOPBACK RUNNING  MTU:65536  Metric:1
         RX packets:161 errors:0 dropped:0 overruns:0 frame:0
         TX packets:161 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:17468 (17.0 KiB)  TX bytes:17468 (17.0 KiB)

ppp0      Link encap:Point-to-Point Protocol
         inet addr:115.77.186.189  P-t-P:115.77.184.1  Mask:255.255.255.255
         UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
         RX packets:2662580 errors:0 dropped:0 overruns:0 frame:0
         TX packets:1799980 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:3
         RX bytes:3495012782 (3.2 GiB)  TX bytes:448561591 (427.7 MiB)

ra0       Link encap:Ethernet  HWaddr F0:B4:29:7F:00:0D
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:291376 errors:13 dropped:0 overruns:0 frame:0
         TX packets:319758 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:117968156 (112.5 MiB)  TX bytes:222846447 (212.5 MiB)
         Interrupt:6

ra1       Link encap:Ethernet  HWaddr F2:B4:29:7C:00:0D
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:1344982 errors:0 dropped:0 overruns:0 frame:0
         TX packets:2396673 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:121267596 (115.6 MiB)  TX bytes:3420510873 (3.1 GiB)

rai0      Link encap:Ethernet  HWaddr F0:B4:29:7F:00:0E
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:280 errors:0 dropped:0 overruns:0 frame:0
         TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:6774 (6.6 KiB)  TX bytes:22 (22.0 B)
         Interrupt:4

rai1      Link encap:Ethernet  HWaddr F2:B4:29:7C:00:0E
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
      
DuyHung
DuyHung Xuất sắc

Cấp bậc: Xuất sắc

Giới tính : Nam

Bài viết : 1260

Danh vọng : 2272

Uy tín : 32

Config IPTV for WR1043ND v.3 với Openwrt/LEDE/SWRT


[HOWTO] IPTV - sample configuration Fawfj010

Part 1. Default configuration:


* LEDE Reboot 17.01.4 r3560-79f57e422d (git-17.290.79498-d3f0685): WAN -> {p5 -> p6 in vlan2 (these VLAN's are internal in switch)} -> eth0 -> CPU-> eth1 -> {p0 -> p1-p4 in vlan1}. This is the default "router" mode.

[HOWTO] IPTV - sample configuration Openwr10

Code:
_________________________________________________
switch port   | p0 | p6 | p4 | p3 | p2 | p1 | p5 |
______________|____|____|____|____|____|____|____|
router port   |CPU |CPU |lan1|lan2|lan3|lan4|wan |
______________|eth1|eth0|____|____|____|____|____|
vlan1         |  u |  x |  u |  u |  u |  u |  x |          
______________|____|____|____|____|____|____|____|
vlan2         |  x |  u |  x |  x |  x |  x |  u |          
______________|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

Configuration file /etc/config/network is:

Code:
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 'fd1c:376c:a0f5::/48'

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

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'

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

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

* SWRT Snapshot r5784-69a36cbab2 (git-18.013.44459-84a63dd): WAN -> {p5 -> p6 in vlan2 (these VLAN's are internal in switch)} -> eth0 -> CPU-> eth1 -> {p0 -> p1-p4 in vlan1}. This is the default "router" mode.

[HOWTO] IPTV - sample configuration Swrtip10

Code:
_________________________________________________
switch port   | p0 | p6 | p4 | p3 | p2 | p1 | p5 |
______________|____|____|____|____|____|____|____|
router port   |CPU |CPU |lan1|lan2|lan3|lan4|wan |
______________|eth1|eth0|____|____|____|____|____|
vlan1         |  t |  x |  u |  u |  u |  u |  x |          
______________|____|____|____|____|____|____|____|
vlan2         |  x |  t |  x |  x |  x |  x |  u |          
______________|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

Configuration file /etc/config/network is:

Code:
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 'fd1c:376c:a0f5::/48'

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

config interface 'wan'
 option ifname 'eth0.2'
 option proto 'dhcp'
 option ipv6 'auto'
 option username 'USERNAME'
 option password 'PASSWORD'

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

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

Part 2. My configuration at this moment:

My ISP gives me Internet in vlan35 and IPTV in vlan36.

For IPTV, I need to make a bridge between tagged WAN port p5 to LAN2 port p3, LAN3 port p2 & LAN4 port p1 .

vlan36 -> WAN -> p5 -> p2-3-4  untagged

For Internet traffic:

vlan35 -> WAN -> p5 -> p6 untagged -> eth0 -> CPU -> eth1 -> p0 -> LAN1 port p4 in vlan1

Code:
_________________________________________________
switch port   | p0 | p6 | p4 | p3 | p2 | p1 | p5 |
______________|____|____|____|____|____|____|____|
router port   |eth1|eth0|lan1|lan2|lan3|lan4|wan |
______________|____|____|____|____|____|____|____|
vlan1         |  t |  x |  u |  x |  x |  x |  x |          
______________|____|____|____|____|____|____|____|
vlan35        |  x |  t |  x |  x |  x |  x |  t |          
______________|____|____|____|____|____|____|____|
vlan36        |  x |  x |  x |  u |  u |  u |  t |          
______________|____|____|____|____|____|____|____|

t = tagged
u = untagged
x = not used

Configuration file /etc/config/network is:

Code:
config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config interface 'lan'
    option ifname 'eth1.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.35'
    option proto 'pppoe'
    option username 'username'
    option password 'password'
    option dns '8.8.8.8 8.8.4.4'

config interface 'iptv'
    option ifname 'eth1.36'
    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 vid '1'
    option ports '0t 4'

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

config switch_vlan
    option device 'switch0'
    option vlan '3'
    option ports '1 2 3 5t'
    option vid '36'

Note:

- Port 0 - CPU (eth1) on vlan 1 & port 6 - CPU (eth0) on vlan 35 must be tagged.
- Port 5 on vlan 35, 36 must also be tagged.

[HOWTO] IPTV - sample configuration Lede0110
Switch on LEDE

[HOWTO] IPTV - sample configuration Lede0210
Interface Overview on LEDE

[HOWTO] IPTV - sample configuration Swrtip11
Switch on SWRT

[HOWTO] IPTV - sample configuration Swrtip12
Interface Overview on SWRT

Với TV kỹ thuật số sử dụng VLAN 2502 cũng làm tương tự (thay thế VLAN 35 bằng VLAN 2502):

[HOWTO] IPTV - sample configuration Tplink18
      
DuyHung
DuyHung Xuất sắc

Cấp bậc: Xuất sắc

Giới tính : Nam

Bài viết : 1260

Danh vọng : 2272

Uy tín : 32

      
      

Xem chủ đề cũ hơn Xem chủ đề mới hơn Về Đầu Trang  Thông điệp [Trang 1 trong tổng số 1 trang]

Quyền hạn của bạn

Bạn không có quyền trả lời bài viết
free counters



  • Đoàn Ngọc Khánh

    mobile phone 098 376 5575


    Đỗ Quang Thảo

    mobile phone 090 301 9666


    Nguyễn Văn Của

    mobile phone 090 372 1401


    IP address signature
    Free forum | Văn hóa | Childhood, Gia đình | ©phpBB | Free forum support | Báo cáo lạm dụng | Thảo luận mới nhất