利用兩台Mikrotik Router的switch晶片橋接IPTV與網路
本帖最後由 gfx86674 於 2019-8-5 13:57 編輯
在家中橋接網通設備,若中間置入台MOD(IPTV,透過Modem multicast發送)是個很頭痛的問題.
但若是分享器或交換器支援vlan,就容易的多.
以下是用RB450G+RB750GL建置:
因這兩台Router的內部交換機晶片可處理vlan標記,
所以就不再使用軟體的bridge ,而是用switch chip.
- #RB450G
- /interface bridge add name=bridge
- /interface bridge port
- add bridge=bridge interface=ether1 hw=yes
- add bridge=bridge interface=ether2 hw=yes
- add bridge=bridge interface=ether3 hw=yes
- add bridge=bridge interface=ether4 hw=yes
- add bridge=bridge interface=ether5 hw=yes
- /interface ethernet switch port
- set ether5 vlan-header=add-if-missing vlan-mode=fallback
- set ether1 default-vlan-id=100 vlan-header=always-strip vlan-mode=fallback
- set ether2 default-vlan-id=200 vlan-header=always-strip vlan-mode=fallback
- set ether3 default-vlan-id=200 vlan-header=always-strip vlan-mode=fallback
- set ether4 default-vlan-id=100 vlan-header=always-strip vlan-mode=fallback
- set switch1-cpu vlan-header=add-if-missing vlan-mode=fallback
- /interface ethernet switch vlan
- add ports=ether5,ether1,ether4,switch1-cpu switch=switch1 vlan-id=100
- add ports=ether5,ether2,ether3,switch1-cpu switch=switch1 vlan-id=200
- /interface vlan
- add name=wan vlan-id=100 interface=bridge
- add name=lan vlan-id=200 interface=bridge
- /ip address
- add address=192.168.88.1/24 interface=lan network=192.168.88.0
- /ip dhcp-server
- add address-pool=dhcp-pool authoritative=after-2sec-delay interface=lan name=DHCP
- /interface pppoe-client
- add allow=pap interface=wan keepalive-timeout=60 profile=default name=pppoe-out1 password=xxxx user=xxxx
複製代碼- #RB750GL
- /interface bridge add name=bridge
- /interface bridge port
- add bridge=bridge interface=ether1 hw=yes
- add bridge=bridge interface=ether2 hw=yes
- add bridge=bridge interface=ether3 hw=yes
- add bridge=bridge interface=ether4 hw=yes
- add bridge=bridge interface=ether5 hw=yes
- /interface ethernet switch port
- set ether5 vlan-header=add-if-missing vlan-mode=fallback
- set ether1 default-vlan-id=200 vlan-header=always-strip vlan-mode=fallback
- set ether2 default-vlan-id=200 vlan-header=always-strip vlan-mode=fallback
- set ether3 default-vlan-id=200 vlan-header=always-strip vlan-mode=fallback
- set ether4 default-vlan-id=100 vlan-header=always-strip vlan-mode=fallback
- set switch1_cpu vlan-header=add-if-missing vlan-mode=fallback
- /interface ethernet switch vlan
- add ports=ether5,ether4,switch1-cpu switch=switch1 vlan-id=100
- add ports=ether5,ether1,ether2,ether3,switch1-cpu switch=switch1 vlan-id=200
- /interface vlan
- add name=lan vlan-id=200 interface=bridge
- /ip address
- add address=192.168.88.2/24 interface=lan network=192.168.88.0
複製代碼 |
附件:
您需要登錄才可以下載或查看附件。沒有帳號?註冊