• 860

[研究所] MikroTik RouterOS 學習 (持續更新)




有小更新
pomolio wrote:
請教各位最近ROS做(恕刪)


如果內網網段換了,您firewall nat的 dst-nat to-address就要改成目前使用網段的ip
目前大致搞定了,今天花了幾小時反覆測試..
不知道為何,把路由器重啟,就能連上...

不過把ether5獨立出來,單獨加入一個bridge,硬件加速好像會關閉,
現在來研究試試VLAN方式
pomolio wrote:
目前大致搞定了,今天(恕刪)
嗯...ether5就只是接監視器,為何要新增bridge與vlan?

1.將ether5從原本的bridge1 port移除後,
在/ip address新增,將ether5設定為192.168.50.1/24

2.進入監視器後台,將監視器的ip設為192.168.50.2 / 255.255.255.0
gateway:192.168.50.1

3.設定路由標記/ip firewall mangle
add action=add-dst-to-address-list chain=prerouting in-interface=pppoe-out2 \
dst-address-type=local address-list=pppoe2 address-list-timeout=1w

add action=mark-connection chain=prerouting in-interface=pppoe-out2 \
new-connection-mark=pppoe2_conn src-address-type=!local

add action=mark-routing chain=prerouting connection-mark=pppoe2_conn \
in-interface=ether5 new-routing-mark=to_pppoe2

4.設定路由策略/ip route
add distance=1 gateway=pppoe-out2 routing-mark=to_pppoe2

5.設定nat映射和偽裝/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether5 \
src-address=192.168.88.0/24 (假設bridge1=192.168.88.0/24)

add action=dst-nat chain=dstnat dst-address-list=pppoe2 \
to-addresses=192.168.50.2 src-address-type=!local

add action=masquerade chain=srcnat out-interface=pppoe-out2

新手查詢,  如果我想要弄一個這樣的架構,
應該要怎設定,網上爬文大部份都只有ROUTER 跟 SWITCH 互連的trunk設定教學及SWITCH 那部份的設定,
但假如我有一部MAIN PC 是直接接在ROUTER 上面,這部主機應該如何拼入VLAN內?
還望指教,謝謝.
大家好:想請教一下兩個問題。
1.如果想要對某些裝置設定可上網的時間,該如何設定呢?
2.如果想針對某些裝置設定禁止瀏覽的網站或關鍵字,該如何設定呢?
irsjx2vxo3ne3k84dr1dz4,r4pe8bez3/4ne3bq4bew2j92gea jx4hq me-2d8 e3hy4hi2ty k84!
yjohnny811 wrote:
新手查詢,  如果我(恕刪)

RB850G:
/interface bridge add name=bridge

/interface bridge port
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 switch1-cpu vlan-header=add-if-missing vlan-mode=fallback
set ether3 vlan-header=add-if-missing vlan-mode=fallback
set ether2 default-vlan-id=10 vlan-header=always-strip vlan-mode=fallback
set ether4 default-vlan-id=20 vlan-header=always-strip vlan-mode=fallback
set ether5 default-vlan-id=20 vlan-header=always-strip vlan-mode=fallback

/interface ethernet switch vlan
add ports=switch1-cpu,ether3,ether2 switch=switch1 vlan-id=10
add ports=switch1-cpu,ether3,ether4,ether5 switch=switch1 vlan-id=20

/interface vlan
add name=vlan10 vlan-id=10 interface=bridge
add name=vlan20 vlan-id=20 interface=bridge


hap:
/interface bridge add name=bridge

/interface bridge port
add bridge=bridge interface=wlan pvid=10
add bridge=bridge interface=ether1 hw=no pvid=10
add bridge=bridge interface=ether2 hw=no pvid=20
add bridge=bridge interface=ether3 hw=no pvid=20
add bridge=bridge interface=ether4 hw=no pvid=20
add bridge=bridge interface=ether5 hw=no

/interface bridge vlan
add bridge=bridge tagged=bridge,ether5 untagged=ether1,wlan vlan-ids=10
add bridge=bridge tagged=bridge,ether5 untagged=ether2,ether3,ether4 vlan-ids=20

/interface vlan
add name=vlan10 vlan-id=10 interface=bridge
add name=vlan20 vlan-id=20 interface=bridge

/interface bridge
set bridge vlan-filtering=yes
derliang wrote:
1.如果想要對某些裝置設定可上網的時間,該如何設定呢?
用禁止裝置上網的時間思考會比較有助理解:



讓這段時間上網的封包都進行丟棄,就達成您的目的了。

derliang wrote:
2.如果想針對某些裝置設定禁止瀏覽的網站或關鍵字,該如何設定呢?
這有難度...只能針對http的網頁達成,https的關鍵字阻擋辦不到




若是有明確網址的就較容易,把想防礙的網址置入address list

再把address list置入dst-address-list進行阻擋。
請問一下

中華電信數據機之後,原本預計接ASUS RT-AC86U
PPPoE撥號跟分配DHCP,之後會再接無線AP或電腦
但因為用不到WIFI的功能感覺很浪費
而且AC86U也不便宜

於是上網找有線的IP分享器
但很少,常見只有TP-LINK跟MikroTik

請問如果中華電信數據機之後接RB750Gr3
但只會這種極簡設定
會撥號跟分配DHCP已達到我的需求
其他功能有需要再爬文研究
這樣是ok的嗎?

雖然有點浪費這台機器
但比較便宜
而且,穩定度跟效能,應該比AC86U好吧?
  • 860
內文搜尋
X
評分
評分
複製連結
請輸入您要前往的頁數(1 ~ 860)
Mobile01提醒您
您目前瀏覽的是行動版網頁
是否切換到電腦版網頁呢?