I am trying to make my RB411 act as a wireless access point. The RouterOS is level 4. The following script configures the RB411 as a router and starts with the router in the reset mode with the default settings removed:
I would like to know how to modify this script to make the RB411 a wireless access point. It will be connected to my local area network: 192.168.1.0/24. I would like for wireless clients to be able to connect to the RB411 with an address of 192.168.1.x. The RB411 would have only one IP address on the local area network. It would be just a simple wireless access point.
I have searched on wiki.mikrotik.com, but have been unable to find complete examples that tell how to do this.
# jun/26/2014 23:47:50 by RouterOS 6.13
# This script configures an RB411AR to be a wireless access point.
# My local area network is 192.168.1.0/24.
# Change this to be compatible with your local area network.
# After running this script, access the router with Winbox and
# be sure that the wireless is on. Set the ssid.
# The admin password is blank. Be sure to set your admin password.
# This configuration enables NTP. The script will set the time if internet
# access is available.
# Let me know if this works.
#
/interface bridge
add l2mtu=1526 name=bridge1
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g disabled=no l2mtu=2290 mode=\
ap-bridge ssid=rb411ar-wap
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk eap-methods="" \
mode=dynamic-keys wpa-pre-shared-key=1234567890 wpa2-pre-shared-key=\
1234567890
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
mac-cookie-timeout=3d
/port
set 0 name=serial0
/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=wlan1
/ip address
add address=192.168.1.225/24 comment="default configuration" interface=\
bridge1 network=192.168.1.0
/ip dhcp-relay
add dhcp-server=192.168.1.1 disabled=no interface=bridge1 name=relay1
/ip dhcp-server network
add address=192.168.1.0/24 dns-server=192.168.1.1,8.8.8.8,8.8.4.4 gateway=\
192.168.1.1 netmask=24
/ip dns
set servers=192.168.1.1
/ip route
add distance=1 gateway=192.168.1.1 pref-src=192.168.1.225
/ip upnp
set allow-disable-external-interface=no
/system clock
set time-zone-name=America/Chicago
/system lcd
set contrast=0 enabled=no port=parallel type=24x4
/system lcd page
set time disabled=yes display-time=5s
set resources disabled=yes display-time=5s
set uptime disabled=yes display-time=5s
set packets disabled=yes display-time=5s
set bits disabled=yes display-time=5s
set version disabled=yes display-time=5s
set identity disabled=yes display-time=5s
set bridge1 disabled=yes display-time=5s
set wlan1 disabled=yes display-time=5s
set ether1 disabled=yes display-time=5s
/system ntp client
set enabled=yes primary-ntp=174.36.71.205 secondary-ntp=129.250.35.251
/system ntp server
set enabled=yes
/system scheduler
add interval=1h name=SetNtpServers on-event=SetNtpServers policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jun/01/2014 start-time=00:00:00
/system script
add name=SetNtpServers policy=\
ftp,reboot,read,write,policy,winbox,password,sniff,sensitive,api source="#\
\_http://forum.mikrotik.com/viewtopic.php\?f=9&t=56225&hilit=ntp\r\
\n# SetNtpServers - Check and set NTP servers from NTP pool\r\
\n# v1.2 Tested and Developed on ROS v5.7\r\
\n#\r\
\n# Change the following line as needed as progName should match script na\
me \r\
\n:local progName \"SetNtpServers\";\r\
\n\r\
\n# Array of NTP pools to use (check www.pool.ntp.org) one or a maximum of\
\_two, a primary & secondary\r\
\n# Modify the following line and array variable based on your locale (def\
ault is north america).\r\
\n:local arrNtpSystems (\"0.north-america.pool.ntp.org\", \"1.north-americ\
a.pool.ntp.org\");\r\
\n# Alternatively the US related pool below can be used. \r\
\n#:local arrNtpSystems (\"0.us.pool.ntp.org\", \"1.us.pool.ntp.org\");\r\
\n#\r\
\n# No modification is necessary beyond this line.\r\
\n:put \"\$progName: Running...\";\r\
\n:log info \"\$progName: Running...\";\r\
\n:set arrNtpSystems [ :toarray \$arrNtpSystems ];\r\
\n:if (( [ :len \$arrNtpSystems ] < 1 ) or ( [ :len \$arrNtpSystems ] > 2 \
)) do={ \r\
\n :put \"\$progName: ERROR NTP Systems array (\\\$arrNtpSystems) must \
be either one or two DNS names.\";\r\
\n :log info \"\$progName: ERROR NTP Systems array (\\\$arrNtpSystems) \
must be either one or two DNS names.\";\r\
\n} else={\r\
\n :local arrRosNtpSetting (\"primary-ntp\", \"secondary-ntp\");\r\
\n :local i 0;\r\
\n :foreach strNtpSystem in (\$arrNtpSystems) do={\r\
\n :local ipAddrNtpSystem [ :resolve \$strNtpSystem ];\r\
\n :local strRosNtpSetting [ :pick \$arrRosNtpSetting \$i ];\r\
\n :local strCurrentNtpIp [ /system ntp client get \$strRosNtpSetti\
ng ];\r\
\n :put \"\$progName: NTP server DNS name \$strNtpSystem resolves t\
o \$ipAddrNtpSystem.\";\r\
\n :log info \"\$progName: NTP server DNS name \$strNtpSystem resol\
ves to \$ipAddrNtpSystem.\";\r\
\n :put \"\$progName: Current \$strRosNtpSetting setting is \$strCu\
rrentNtpIp.\";\r\
\n :log info \"\$progName: Current \$strRosNtpSetting setting is \$\
strCurrentNtpIp.\";\r\
\n :if ( [ :toip \$ipAddrNtpSystem ] != [ :toip \$strCurrentNtpIp ]\
\_) do={\r\
\n :put \"\$progName: Changing \$strRosNtpSetting setting to \$\
ipAddrNtpSystem.\";\r\
\n :log info \"\$progName: Changing \$strRosNtpSetting setting \
to \$ipAddrNtpSystem.\";\r\
\n :local strCommand [ :parse \"/system ntp client set \$strRos\
NtpSetting=\\\"\$ipAddrNtpSystem\\\"\" ];\r\
\n \$strCommand;\r\
\n } else={\r\
\n :put \"\$progName: No changes were made for the \$strRosNtpS\
etting NTP setting.\";\r\
\n :log info \"\$progName: No changes were made for the \$strRo\
sNtpSetting NTP setting.\";\r\
\n }\r\
\n :set i (\$i + 1);\r\
\n }\r\
\n}\r\
\n:put \"\$progName: Done.\";\r\
\n:log info \"\$progName: Done.\";\r\
\n\r\
\n"
################## end of configuration ###################
Thanks for the help.