家里弱电箱到卧室只有一根线,如何才能同时满足iptv和宽带同时使用呢?
买2台vlan交换机,其中一个vlan交换机用支持openwrt的路由器代替:
拓扑如下(借用购买的sucom交换机图):
弱电箱交换机配置如下:
卧室openwrt配置如下:
[root@PandoraBox_DF50:/]#swconfig dev switch0 show
Global attributes:
enable_vlan: 1
Port 0:
pvid: 2
link: port:0 link:down
Port 1:
pvid: 3
link: port:1 link:down
Port 2:
pvid: 0
link: port:2 link:down
Port 3:
pvid: 0
link: port:3 link:down
Port 4:
pvid: 1
link: port:4 link:up speed:100baseT full-duplex
Port 5:
pvid: 0
link: port:5 link:down
Port 6:
pvid: 0
link: port:6 link:up speed:1000baseT full-duplex
Port 7:
pvid: 0
link: port:7 link:down
VLAN 1:
vid: 1
ports: 0 1 4 6t 7t
VLAN 2:
vid: 2
ports: 0 4t 6t 7t
VLAN 3:
vid: 3
ports: 1 4t 6t 7t
[root@PandoraBox_DF50:/]#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 'fdcc:4b25:9dd1::/48'
config interface 'vp1'
option type 'bridge'
option _orig_ifname 'eth0.1'
option _orig_bridge 'true'
option proto 'dhcp'
option ifname 'eth0.1 eth0.2'
config device 'lan_dev'
option name 'eth0.1'
option macaddr '20:76:93:20:df:50'
config device 'wan_dev'
option name 'eth0.2'
option macaddr '20:76:93:20:df:51'
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 1 4 6t 7t'
config switch_vlan
option device 'switch0'
option vlan '2'
option vid '2'
option ports '0 4t 6t 7t'
config switch_vlan
option device 'switch0'
option vlan '3'
option vid '3'
option ports '1 4t 6t 7t'
config interface 'pc'
option type 'bridge'
option proto 'none'
option ifname 'eth0.2'
option auto '1'
[root@PandoraBox_DF50:/]#
结果:iptv和宽带在卧室只要一根线就可以了
版权声明:本文为sjbost原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。