ROS批量新建多SSID

新建地址池POOL,新建DHCP服务器,每个WLAN对应一个

  1. :for i from 1 to 20 do={
  2. /ip address add address=("172.16.".$i."254/24") interface=("wlan_".$i) network=("172.16.".$i.".0")
  3. /ip pool add name={"pool".$i} range=("172.16.".$i.".1-172.16.".$i.".99"
  4. /ip dhcp-server add address-pool=("pool".$i) disabled=no interface=("wlan_".$i) lease-time=1h name=("server".$i)
  5. /ip dhcp-server network add address=("172.16.".$i.".0/24") dns-server=114.114.114.114,223.5.5.5 gateway=("172.16.".$i.".254") netmask=24
  6. }

如果需要VPN功能,需加上

  1. /ip firewall mangle add action=mark-routing chain=prerouting new-routing-mark=("to_Vpn_".$i) passthrough=no src-address=("172.16.".(.$i).".0.24")

下面是转载得多SSID脚本

下面的脚本,要先手动启用无线wlan1,创建无线属性文件p1,并把WPS Mode=disable(如果你的P1属性文件不设置密码的话)

:for i from=1 to=10 do={
:global mac1 [/certificate scep-server otp generate minutes-valid=1 as-value] ;
:global mac2 ($mac1->”password”);
:global mac [:pick $mac2 0 12];
:global ssid (“A”. [:pick $mac2 13 18]);
:global wlname (“A”. [:pick $mac2 13 18]);
:log warning $ssid;

/interface wireless add master-interface=wlan1 ssid=$ssid mac-address=$mac name=$wlname security-profile=”p1″ default-forwarding=no disabled=no wps-mode=disabled ;

/interface bridge add name=(“B_”.$wlname);

/interface bridge port add bridge=(“B_”.$wlname) interface=$wlname;

/ip address add address=(“192.168.” . $i . “.254/24” ) interface=(“B_”.$wlname);

/ip pool add ranges=(“192.168.” .$i .”.100-192.168.”. $i.”.200″) name=$wlname

/ip dhcp-server add name=$wlname address-pool=$wlname interface=(“B_”.$wlname) disa=no;

/ip dhcp-server network add address=(“192.168.”. $i .”.0/24″) dns-server=114.114.114.114 gateway=(“192.168.” .$i. “.254”) netmask=24

}

  1. 小小白说道:

    博主,请问有没有稍微详细一点的说明啊,最好有配操作的图示,现在这样新手小白看起来很难操作啊

发表评论

邮箱地址不会被公开。 必填项已用*标注