在
莫斯科举行的
最后一次MUM比赛
中 ,我和其他所有人一样被交给了MikroTik hAP mini路由器。
我决定用我的父母替换旧的,经常挂着的路由器。
为了获得最佳性能,我决定使用交换芯片。 我在Internet上找不到合适的说明,那里没有设置的说明以及有线和无线部分,因此我决定分享自己的经验。
展望未来,我会说hAP mini表现出色。
该方案如下:

Internet和来自Beeline的IPTV,IPOE连接。 互联网通过第一个端口,第二个IPTV端口上的前缀以及通过wifi 3的局域网连接。
因此,让我们开始吧:
1.在不将路由器连接到Internet的情况下,将其打开,使用电缆将其连接到第三个端口,启动WinBox,转到路由器并重置设置,记住要取消创建备份副本并使用默认配置。

2.重新启动路由器后,通过Winbox在MAC地址上重新连接到它
3.运行“新建”终端并输入以下命令:
我们要做的第一件事是更改管理员用户的密码。理想情况下,创建另一个用户,然后删除管理员。
/user set admin password=qwFnnNn
创建桥:
/interface bridge add name=bridge1 protocol-mode=none
将接口添加到网桥:
/interface bridge port add bridge=bridge1 interface=ether1 add bridge=bridge1 interface=ether2 add bridge=bridge1 interface=ether3 add bridge=bridge1 interface=wlan1
我们在网桥上创建两个附加的VLAN接口:
/interface vlan add interface=bridge1 name=VLAN10 vlan-id=10 add interface=bridge1 name=VLAN20 vlan-id=20
在VLAN接口上配置:
/interface ethernet switch vlan add independent-learning=yes ports=ether1,ether2,switch1-cpu switch=switch1 vlan-id=10 add independent-learning=yes ports=ether3,switch1-cpu switch=switch1 vlan-id=20 /interface ethernet switch port set 0 default-vlan-id=10 vlan-header=always-strip vlan-mode=secure set 1 default-vlan-id=10 vlan-header=always-strip vlan-mode=secure set 2 default-vlan-id=20 vlan-header=always-strip vlan-mode=secure set 3 vlan-mode=secure
配置WiFi(不要忘记用您自己的SSID和密码替换):
/interface wireless security-profiles set [ find default=yes ] authentication-types=wpa2-psk eap-methods="" mode=dynamic-keys wpa2-pre-shared-key=MyWifiPassword /interface wireless set [ find default-name=wlan1 ] band=2ghz-onlyn disabled=no mode=ap-bridge ssid=MyWifiName vlan-id=20 vlan-mode=use-tag wireless-protocol=802.11 wps-mode=disabled
通过IPOE进行互联网连接,即 我们通过DHCP获取地址。 请注意,dhcp-client在VLAN上配置:
/ip dhcp-client add dhcp-options=hostname,clientid disabled=no interface=VLAN10
配置本地网络:
/ip address add address=192.168.11.1/24 interface=VLAN20 network=192.168.11.0 /ip pool add name=pool-lan ranges=192.168.11.2-192.168.11.99 /ip dhcp-server add address-pool=pool-lan disabled=no interface=VLAN20 lease-time=1h name=dhcp-server /ip dhcp-server network add address=192.168.11.0/24 dns-server=192.168.11.1 gateway=192.168.11.1 /ip dns set allow-remote-requests=yes
为了方便起见,我们将接口分为几组:
/interface list add name=WAN add name=LAN /interface list member add interface=VLAN10 list=WAN add interface=VLAN20 list=LAN
为防火墙创建最低规则:
/ip firewall filter add action=accept chain=input comment="Allow icmp" protocol=icmp add action=accept chain=input comment="Allow established & related" connection-state=established,related add action=accept chain=input comment="Allow access for ManageIP group" src-address-list=ManageIP add action=drop chain=input comment="All other drop" add action=fasttrack-connection chain=forward comment=Fasttrack connection-state=established,related add action=accept chain=forward comment="Allow established & related" connection-state=established,related,untracked add action=drop chain=forward comment="Drop invalid connection packets" connection-state=invalid add action=accept chain=forward comment="Allow Internet" in-interface-list=LAN out-interface-list=WAN add action=drop chain=forward comment="All other drop"
在ManageIP组中,添加访问路由器的地址:
/ip firewall address-list add address=192.168.11.0/24 list=ManageIP
配置NAT以从LAN访问Internet:
/ip firewall nat add action=masquerade chain=srcnat out-interface-list=WAN
好吧,总之,不是强制性的,而是有用的命令:
/ip cloud set ddns-enabled=yes update-time=no /system clock set time-zone-autodetect=no /system clock manual set time-zone=+03:00 /system identity set name=MyHome /system ntp client set enabled=yes primary-ntp=95.165.138.248 secondary-ntp=89.175.20.7
仅允许从本地网络发现邻居。
如果您尚未更新ROS,而您拥有6.40.4:
/ip neighbor discovery set ether1 discover=no set ether2 discover=no set ether3 discover=no set wlan1 discover=no set bridge1 discover=no
如果更新为最新版本,则:
/ip neighbor discovery-settings set discover-interface-list=LAN
但是在这种情况下,无法从wifi网络进行MAC连接。 有什么想法吗?
仅此而已。
您可以将提供商电缆连接到第一个端口并进行测试。
一项小型测试的结果表明,电缆几乎接收了提供商提供的所有100Mbps(发射的洪流),IPTV机顶盒可以工作,而路由器上的处理器负载仅为20%。 通过WiFi,可能只能获得25 Mbps,空气被严重污染,但是这种速度就足够了。
