|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
前提条件:router OS 2.9.27版本以上
1、设置wireless网卡
- /interface wireless
- 0 name="WLan" mtu=1500 mac-address=00:17:9A:02:A8:DE arp=enabled
- disable-running-check=no interface-type=Atheros AR5213
- radio-name="00179A02A8DE" mode=ap-bridge ssid="" area=""
- frequency-mode=superchannel country=china antenna-gain=0 frequency=2462
- band=2.4ghz-b/g scan-list=default rate-set=default
- supported-rates-b=1Mbps,2Mbps,5.5Mbps,11Mbps
- supported-rates-a/g=6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,
- 54Mbps
- basic-rates-b=1Mbps basic-rates-a/g=6Mbps max-station-count=2007
- ack-timeout=dynamic tx-power-mode=default noise-floor-threshold=default
- periodic-calibration=default periodic-calibration-interval=60
- burst-time=disabled dfs-mode=none antenna-mode=ant-a wds-mode=disabled
- wds-default-bridge=none wds-default-cost=100 wds-cost-range=50-150
- wds-ignore-ssid=no update-stats-interval=disabled
- default-authentication=yes default-forwarding=yes default-ap-tx-limit=0
- default-client-tx-limit=0 proprietary-extensions=post-2.9.25
- hide-ssid=yes security-profile=sigma disconnect-timeout=3s
- on-fail-retry-time=100ms preamble-mode=both compression=no
- allow-sharedkey=no
复制代码
其中security-profile=sigma自定义的安全认证参数,设置方法如下:
- /interface wireless security-profiles
- 1 name="sigma" mode=dynamic-keys authentication-types=wpa-psk,wpa2-psk
- unicast-ciphers=tkip group-ciphers=tkip wpa-pre-shared-key="11111111"
- wpa2-pre-shared-key="11111111" tls-mode=no-certificates
- tls-certificate=none static-algo-0=none static-key-0="" static-algo-1=none
- static-key-1="" static-algo-2=none static-key-2="" static-algo-3=none
- static-key-3="" static-transmit-key=key-0 static-sta-private-algo=none
- static-sta-private-key="" radius-mac-authentication=no group-key-update=5m
复制代码
2、设置虚拟AP:
- /interface wireless
- 1 R name="wlan1" mtu=1500 mac-address=02:17:9A:02:A8:DE arp=enabled
- disable-running-check=no interface-type=virtual-AP
- master-interface=WLan ssid="sigma-412" area="" max-station-count=2007
- wds-mode=disabled wds-default-bridge=none wds-default-cost=0
- wds-cost-range=0 wds-ignore-ssid=no default-authentication=yes
- default-forwarding=yes default-ap-tx-limit=0 default-client-tx-limit=0
- proprietary-extensions=post-2.9.25 hide-ssid=no security-profile=sigma
复制代码
master-interface=WLan
映射物理的无线网卡。
ssid="sigma-412"
无线网络AP的识别号,客户端检测无线网络信号的时候就是看到这个编号,由此识别需要连接的网络信号。
3、设置接受无线接入的客户端
- /interface wireless access-list
- 1 mac-address=00:00:00:00:00:00 interface=wlan1 authentication=yes
- forwarding=yes ap-tx-limit=0 client-tx-limit=0 private-algo=none
- private-key=""
复制代码
其中mac地址如果填写客户端网卡的地址,则表示指定客户端接入,如果填写00:00:00:00:00:00,则表示接受所有客户端接入。
========================
以下步骤实现客户端动态获取IP功能:
4、给虚拟AP分配IP地址:
- /ip address
- 2 192.168.1.5/24 192.168.1.0 192.168.1.255 wlan1
复制代码
注:interface选择的是虚拟AP。
5、为无线虚拟AP分配一个地址池:
- /ip pool
- 1 pool for wlan 192.168.1.6-192.168.1.254
复制代码
6、为无线网络设置DHCP服务器:
- /ip dhcp-server
- 0 sg-wireless wlan1 pool for wlan 3d
复制代码
7、设置本地网段信息
- /ip dhcp-server network
- # ADDRESS GATEWAY DNS-SERVER WINS-SERVER DOMAIN
- 0 192.168.1.0/24 192.168.1.5 202.96.128.68
复制代码
按以上步骤设置完成后,客户端即可检测并登陆无线网络了。 |
|