Hello,
I merged 2 connections (nth) in RB951Ui,
how can I get wifi work correctly, ( I tried enable it but receive not valid IP address in connected PC)
thanks,
# jan/02/1970 04:20:25 by RouterOS 6.10
# software id = C4P7-U37W
#
/interface ethernet
set [ find default-name=ether1 ] name=in1
set [ find default-name=ether2 ] disabled=yes name=in2
set [ find default-name=ether3 ] name=in3
set [ find default-name=ether4 ] name=in4
set [ find default-name=ether5 ] name=out
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n l2mtu=2290 wireless-protocol=\
nv2-nstreme-802.11
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=\
dynamic-keys wpa-pre-shared-key=43CE02EED2CD wpa2-pre-shared-key=\
43CE02EED2CD
/ip hotspot profile
add dns-name=mazen.com hotspot-address=192.10.10.1 name=hsprof1
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
mac-cookie-timeout=3d
add idle-timeout=none keepalive-timeout=2m mac-cookie-timeout=3d name=monthly \
on-login="{\r\
\n :local date [ /system clock get date ]\r\
\n :if ( [ /ip hotspot user get \$user comment ] = \"\" ) do={\r\
\n [ /ip hotspot user set \$user comment=\$date ]\r\
\n }\r\
\n}"
/ip pool
add name=dhcp_pool1 ranges=192.10.10.2-192.10.10.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=out name=dhcp1
/ip hotspot
add address-pool=dhcp_pool1 addresses-per-mac=10 disabled=no interface=out \
name=hotspot1 profile=hsprof1
/ip address
add address=192.10.10.1/24 interface=out network=192.10.10.0
add address=192.168.1.10/24 interface=wlan1 network=192.168.1.0
/ip dhcp-client
add add-default-route=no dhcp-options=hostname,clientid disabled=no \
interface=in1 use-peer-dns=no use-peer-ntp=no
add add-default-route=no dhcp-options=hostname,clientid disabled=no \
interface=in2 use-peer-dns=no use-peer-ntp=no
/ip dhcp-server lease
add address=192.10.10.177 client-id=1:cc:52:af:5f:e9:70 mac-address=\
CC:52:AF:5F:E9:70 server=dhcp1
/ip dhcp-server network
add address=192.10.10.0/24 gateway=192.10.10.1
/ip dns
set servers=8.8.8.8
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes
/ip firewall mangle
add action=mark-connection chain=prerouting connection-state=new \
new-connection-mark=line1 nth=1,1 src-address=192.10.10.0/24
add action=mark-routing chain=prerouting connection-mark=line1 \
new-routing-mark=line1 src-address=192.10.10.0/24
add action=mark-connection chain=prerouting connection-state=new \
new-connection-mark=line2 nth=2,2 src-address=192.10.10.0/24
add action=mark-routing chain=prerouting connection-mark=line2 \
new-routing-mark=line2 src-address=192.10.10.0/24
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes to-addresses=0.0.0.0
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
src-address=192.10.10.0/24 to-addresses=0.0.0.0
/ip hotspot ip-binding
add address=192.10.10.177 comment="admin (PC home)" mac-address=\
CC:52:AF:5F:E9:70 type=bypassed
add address=192.10.10.29 comment="unc. noor (receiver)" mac-address=\
D2:4A:00:3D:64:7E server=hotspot1 type=bypassed
add address=192.168.88.35 comment=mobile disabled=yes mac-address=\
38:AA:3C:E2:C1:67 type=bypassed
/ip hotspot user
add name=admin
add name=mobi password=0911
add address=192.168.88.177 mac-address=CC:52:AF:5F:E9:70 name="admin home" \
password=0100911
add limit-bytes-total=602931200 limit-uptime=2h36m name=karim password=\
12345678 server=hotspot1
add limit-bytes-total=239097856 limit-uptime=4h22m name=adel password=888 \
server=hotspot1
add comment=jan/02/1970 limit-bytes-total=2147483648 name=dawod600 password=\
666 profile=monthly server=hotspot1
add limit-bytes-total=1258291200 limit-uptime=20h name=mazen password=99999 \
server=hotspot1
add limit-bytes-total=313605120 limit-uptime=4h9m name=tt password=tt server=\
hotspot1
add limit-bytes-total=236978176 limit-uptime=5h name=abosalma password=1183 \
server=hotspot1
add limit-bytes-total=122683392 limit-uptime=1h34m name=salma password=333 \
server=hotspot1
add limit-bytes-total=220200960 limit-uptime=9m name=reda password=999 \
server=hotspot1
add limit-bytes-total=180462336 limit-uptime=8h39m name=menna password=123 \
server=hotspot1
add name=user password=111
add limit-bytes-total=1048576 limit-uptime=6h16m name=remas password=1234 \
server=hotspot1
add limit-uptime=1s name=mariam password=97331 server=hotspot1
add limit-bytes-total=145752064 limit-uptime=3h16m name=sameh77 password=\
51394 server=hotspot1
add limit-bytes-total=1048576 limit-uptime=25m name=mahmoudelfeky password=\
mahmoud server=hotspot1
add limit-bytes-total=1202716672 limit-uptime=18h57m name=hamada password=\
9944 server=hotspot1
add limit-bytes-total=497025024 limit-uptime=7h23m name=elshafey password=\
11223344 server=hotspot1
add name=cell1 password=888
add limit-bytes-total=48234496 limit-uptime=48m name=mohd password=7334 \
server=hotspot1
add limit-bytes-total=314572800 limit-uptime=5h name=rana password=22401 \
server=hotspot1
/ip route
add distance=1 gateway=192.168.2.1 routing-mark=line1
add distance=1 gateway=192.168.1.1 routing-mark=line2
add distance=1 gateway=192.168.1.1
/ip upnp
set allow-disable-external-interface=no
/system clock
set time-zone-name=Africa/Cairo
/system leds
set 0 interface=wlan1
/system scheduler
add interval=1d name="check monthly users" on-event=manage_monthly policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=mar/27/2014 start-time=00:00:00
add interval=12h name="Reboot Router Daily" on-event="/system reboot" policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=mar/27/2014 start-time=00:00:00
/system script
add name=manage_monthly policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source="{\r\
\n :local offset 30\r\
\n :global today\r\
\n \r\
\n {\r\
\n :local date [ /system clock get date ]\r\
\n :local montharray ( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\"\
jul\",\"aug\",\"sep\",\"oct\",\"nov\",\"dec\" )\r\
\n :local monthdays ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )\r\
\n :local days [ :pick \$date 4 6 ]\r\
\n :local monthtxt [ :pick \$date 0 3 ]\r\
\n :local year [ :pick \$date 7 11 ]\r\
\n :local months ([ :find \$montharray \$monthtxt] )\r\
\n :for nodays from=0 to=\$months do={\r\
\n :set days ( \$days + [ :pick \$monthdays \$nodays ] )\r\
\n }\r\
\n :set days (\$days + \$year * 365) \r\
\n :set today \$days\r\
\n }\r\
\n \r\
\n :foreach i in [ /ip hotspot user find where disabled=no ] do={\r\
\n :if ([ :find [ /ip hotspot user get \$i comment ] ] = 0 ) do={\r\
\n :local date [ /ip hotspot user get \$i comment ]\r\
\n :local montharray ( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\
\"jul\",\"aug\",\"sep\",\"oct\",\"nov\",\"dec\" )\r\
\n :local monthdays ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )\r\
\n :local days [ :pick \$date 4 6 ]\r\
\n :local monthtxt [ :pick \$date 0 3 ]\r\
\n :local year [ :pick \$date 7 11 ]\r\
\n :local months ( [ :find \$montharray \$monthtxt ] )\r\
\n :for nodays from=0 to=\$months do={\r\
\n :set days ( \$days + [ :pick \$monthdays \$nodays ] )\r\
\n }\r\
\n :set days (\$days + \$year * 365)\r\
\n :if ( (\$days + \$offset) < \$today ) do={ \r\
\n :local name [/ip hotspot user get \$i name]\r\
\n :log info \"HOTSPOT EXPIRE SCRIPT: Disabling Hotspot user \$name fir\
st logged in \$date\"\r\
\n [ /ip hotspot user disable \$i ]\r\
\n [ /ip hotspot active remove [find where user=\$user] ]\r\
\n }\r\
\n }\r\
\n }\r\
\n}"
/interface wireless
reset-configuration [ find default-name=wlan1 ]
set [ find default-name=wlan1 ] band=2ghz-b/g/n bridge-mode=disabled country=egypt disabled=no frequency=2437 ht-rxchains=0,1 ht-txchains=0,1 max-station-count=30 mode=ap-bridge radio-name=MATRIX security-profile=default wireless-protocol=802.11
/ip pool
add name=pool-dhcp ranges=192.168.120.101-192.168.120.199
/ip dhcp-server
add address-pool=pool-dhcp disabled=no interface=wlan1 lease-time=1w name=server-dhcp
/ip address
remove [find where interface=wlan1]
add address=192.168.120.1/24 interface=wlan1 network=192.168.120.0 disabled=no
/ip dhcp-server network
add address=192.168.120.0/24 dns-server=192.168.120.1 gateway=192.168.120.1 netmask=24 ntp-server=41.73.42.10,146.231.129.86
/ip dns
set allow-remote-requests=yes cache-max-ttl=1d servers=8.8.8.8,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat out-interface=in1 src-address=192.168.120.0/24 disabled=no
add action=masquerade chain=srcnat out-interface=in2 src-address=192.168.120.0/24 disabled=no
/system ntp client
set enabled=yes primary-ntp=41.73.42.10 secondary-ntp=146.231.129.86
:if ( [ /system routerboard get upgrade-firmware ] > [ /system routerboard get current-firmware ] ) do={ /system routerboard upgrade; /delay delay-time=10; /system reboot }
HotSpot and all other setting remain untouched,I have internet connections in both ether1 (in1) and ether2 (in2) (just disable in2 for temp time)
are you sure this will not reduce any problems? (when use both in1 and in2)
# jan/02/1970 05:33:08 by RouterOS 6.10
# software id = C4P7-U37W
#
/interface ethernet
set [ find default-name=ether1 ] name=in1
set [ find default-name=ether2 ] disabled=yes name=in2
set [ find default-name=ether3 ] name=in3
set [ find default-name=ether4 ] name=in4
set [ find default-name=ether5 ] name=out
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n l2mtu=2290 wireless-protocol=\
nv2-nstreme-802.11
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=\
dynamic-keys wpa-pre-shared-key=43CE02EED2CD wpa2-pre-shared-key=\
43CE02EED2CD
/ip hotspot profile
add dns-name=mazen.com hotspot-address=192.10.10.1 name=hsprof1
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
mac-cookie-timeout=3d
add idle-timeout=none keepalive-timeout=2m mac-cookie-timeout=3d name=monthly \
on-login="{\r\
\n :local date [ /system clock get date ]\r\
\n :if ( [ /ip hotspot user get \$user comment ] = \"\" ) do={\r\
\n [ /ip hotspot user set \$user comment=\$date ]\r\
\n }\r\
\n}"
/ip pool
add name=dhcp_pool1 ranges=192.10.10.2-192.10.10.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=out name=dhcp1
/ip hotspot
add address-pool=dhcp_pool1 addresses-per-mac=10 disabled=no interface=out \
name=hotspot1 profile=hsprof1
/queue simple
add max-limit=50k/1M name=client249 target=192.10.10.249/32
add max-limit=50k/1M name=client250 target=192.10.10.250/32
add max-limit=50k/1M name=client251 target=192.10.10.251/32
add max-limit=50k/1M name=client252 target=192.10.10.252/32
add max-limit=50k/1M name=client253 target=192.10.10.253/32
add max-limit=50k/1M name=client254 target=192.10.10.254/32
add max-limit=50k/1M name=client255 target=192.10.10.255/32
add name=in1 priority=1/1 target=in1
add name=in2 priority=1/1 target=in2
add name=out priority=2/2 target=out
/ip address
add address=192.10.10.1/24 interface=out network=192.10.10.0
add address=192.168.1.10/24 interface=wlan1 network=192.168.1.0
/ip dhcp-client
add add-default-route=no dhcp-options=hostname,clientid disabled=no \
interface=in1 use-peer-dns=no use-peer-ntp=no
add add-default-route=no dhcp-options=hostname,clientid disabled=no \
interface=in2 use-peer-dns=no use-peer-ntp=no
/ip dhcp-server lease
add address=192.10.10.177 client-id=1:cc:52:af:5f:e9:70 mac-address=\
CC:52:AF:5F:E9:70 server=dhcp1
/ip dhcp-server network
add address=192.10.10.0/24 gateway=192.10.10.1
/ip dns
set servers=8.8.8.8
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes
/ip firewall mangle
add action=mark-connection chain=prerouting connection-state=new \
new-connection-mark=line1 nth=1,1 src-address=192.10.10.0/24
add action=mark-routing chain=prerouting connection-mark=line1 \
new-routing-mark=line1 src-address=192.10.10.0/24
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
new-connection-mark=line2 nth=2,2 src-address=192.10.10.0/24
add action=mark-routing chain=prerouting connection-mark=line2 disabled=yes \
new-routing-mark=line2 src-address=192.10.10.0/24
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes to-addresses=0.0.0.0
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
src-address=192.10.10.0/24 to-addresses=0.0.0.0
/ip hotspot ip-binding
add address=192.10.10.177 comment="admin (PC home)" mac-address=\
CC:52:AF:5F:E9:70 type=bypassed
add address=192.10.10.29 comment="unc. noor (receiver)" mac-address=\
D2:4A:00:3D:64:7E server=hotspot1 type=bypassed
add address=192.168.88.35 comment=mobile disabled=yes mac-address=\
38:AA:3C:E2:C1:67 type=bypassed
/ip hotspot user
add name=admin
add name=mobi password=0911
add address=192.168.88.177 mac-address=CC:52:AF:5F:E9:70 name="admin home" \
password=0100911
add limit-bytes-total=602931200 limit-uptime=2h36m name=karim password=\
12345678 server=hotspot1
add limit-bytes-total=239097856 limit-uptime=4h22m name=adel password=888 \
server=hotspot1
add comment=jan/02/1970 limit-bytes-total=2147483648 name=dawod600 password=\
666 profile=monthly server=hotspot1
add limit-bytes-total=1258291200 limit-uptime=20h name=mazen password=99999 \
server=hotspot1
add limit-bytes-total=313605120 limit-uptime=4h9m name=tt password=tt server=\
hotspot1
add limit-bytes-total=236978176 limit-uptime=5h name=abosalma password=1183 \
server=hotspot1
add limit-bytes-total=122683392 limit-uptime=1h34m name=salma password=333 \
server=hotspot1
add limit-bytes-total=220200960 limit-uptime=9m name=reda password=999 \
server=hotspot1
add limit-bytes-total=180462336 limit-uptime=8h39m name=menna password=123 \
server=hotspot1
add name=user password=111
add limit-bytes-total=1048576 limit-uptime=6h16m name=remas password=1234 \
server=hotspot1
add limit-uptime=1s name=mariam password=97331 server=hotspot1
add limit-bytes-total=145752064 limit-uptime=3h16m name=sameh77 password=\
51394 server=hotspot1
add limit-bytes-total=1048576 limit-uptime=25m name=mahmoudelfeky password=\
mahmoud server=hotspot1
add limit-bytes-total=1202716672 limit-uptime=18h57m name=hamada password=\
9944 server=hotspot1
add limit-bytes-total=497025024 limit-uptime=7h23m name=elshafey password=\
11223344 server=hotspot1
add name=cell1 password=888
add limit-bytes-total=48234496 limit-uptime=48m name=mohd password=7334 \
server=hotspot1
add limit-bytes-total=314572800 limit-uptime=5h name=rana password=22401 \
server=hotspot1
/ip route
add distance=1 gateway=192.168.2.1 routing-mark=line1
add distance=1 gateway=192.168.1.1 routing-mark=line2
add distance=1 gateway=192.168.1.1
/ip upnp
set allow-disable-external-interface=no
/system clock
set time-zone-name=Africa/Cairo
/system leds
set 0 interface=wlan1
/system scheduler
add interval=1d name="check monthly users" on-event=manage_monthly policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=mar/27/2014 start-time=00:00:00
add interval=12h name="Reboot Router Daily" on-event="/system reboot" policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=mar/27/2014 start-time=00:00:00
/system script
add name=manage_monthly policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source="{\r\
\n :local offset 30\r\
\n :global today\r\
\n \r\
\n {\r\
\n :local date [ /system clock get date ]\r\
\n :local montharray ( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\"\
jul\",\"aug\",\"sep\",\"oct\",\"nov\",\"dec\" )\r\
\n :local monthdays ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )\r\
\n :local days [ :pick \$date 4 6 ]\r\
\n :local monthtxt [ :pick \$date 0 3 ]\r\
\n :local year [ :pick \$date 7 11 ]\r\
\n :local months ([ :find \$montharray \$monthtxt] )\r\
\n :for nodays from=0 to=\$months do={\r\
\n :set days ( \$days + [ :pick \$monthdays \$nodays ] )\r\
\n }\r\
\n :set days (\$days + \$year * 365) \r\
\n :set today \$days\r\
\n }\r\
\n \r\
\n :foreach i in [ /ip hotspot user find where disabled=no ] do={\r\
\n :if ([ :find [ /ip hotspot user get \$i comment ] ] = 0 ) do={\r\
\n :local date [ /ip hotspot user get \$i comment ]\r\
\n :local montharray ( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\
\"jul\",\"aug\",\"sep\",\"oct\",\"nov\",\"dec\" )\r\
\n :local monthdays ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )\r\
\n :local days [ :pick \$date 4 6 ]\r\
\n :local monthtxt [ :pick \$date 0 3 ]\r\
\n :local year [ :pick \$date 7 11 ]\r\
\n :local months ( [ :find \$montharray \$monthtxt ] )\r\
\n :for nodays from=0 to=\$months do={\r\
\n :set days ( \$days + [ :pick \$monthdays \$nodays ] )\r\
\n }\r\
\n :set days (\$days + \$year * 365)\r\
\n :if ( (\$days + \$offset) < \$today ) do={ \r\
\n :local name [/ip hotspot user get \$i name]\r\
\n :log info \"HOTSPOT EXPIRE SCRIPT: Disabling Hotspot user \$name fir\
st logged in \$date\"\r\
\n [ /ip hotspot user disable \$i ]\r\
\n [ /ip hotspot active remove [find where user=\$user] ]\r\
\n }\r\
\n }\r\
\n }\r\
\n}"
/interface wireless
reset-configuration [ find default-name=wlan1 ]
set [ find default-name=wlan1 ] band=2ghz-b/g/n bridge-mode=disabled country=egypt disabled=no frequency=2437 ht-rxchains=0,1 ht-txchains=0,1 max-station-count=30 mode=ap-bridge radio-name=MATRIX security-profile=default wireless-protocol=802.11
/ip pool
add name=pool-dhcp ranges=192.168.120.101-192.168.120.199
/ip dhcp-server
add address-pool=pool-dhcp disabled=no interface=wlan1 lease-time=1w name=server-dhcp
/ip address
remove [find where interface=wlan1]
add address=192.168.120.1/24 interface=wlan1 network=192.168.120.0 disabled=no
/ip dhcp-server network
add address=192.168.120.0/24 dns-server=192.168.120.1 gateway=192.168.120.1 netmask=24 ntp-server=41.73.42.10,146.231.129.86
/ip dns
set allow-remote-requests=yes cache-max-ttl=1d servers=8.8.8.8,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat out-interface=in1 src-address=192.168.120.0/24 disabled=no
add action=masquerade chain=srcnat out-interface=in2 src-address=192.168.120.0/24 disabled=no
/system ntp client
set enabled=yes primary-ntp=41.73.42.10 secondary-ntp=146.231.129.86
sorry rextended,
just one more request,
how to get Hotspot work on both out(ether5) and wifi
/interface wireless
reset-configuration [ find default-name=wlan1 ]
set [ find default-name=wlan1 ] band=2ghz-b/g/n bridge-mode=disabled country=egypt disabled=no frequency=2437 ht-rxchains=0,1 ht-txchains=0,1 max-station-count=30 mode=ap-bridge radio-name=HOTSPOT security-profile=default wireless-protocol=802.11
/ip address
remove [find where interface=wlan1]
/ip dns
set allow-remote-requests=yes cache-max-ttl=1d servers=8.8.8.8,8.8.4.4
/system ntp client
set enabled=yes primary-ntp=41.73.42.10 secondary-ntp=146.231.129.86
/interface bridge settings
set use-ip-firewall=yes
/interface bridge
add name=bri-hs
/queue simple
set target=bri-hs name=bri-hs [find where name=out]
/ip dhcp-server set interface=bri-hs [find where name=dhcp1]
/interface bridge port
add bridge=bri-hs interface=wlan1
add bridge=bri-hs interface=out; /ip hotspot set interface=bri-hs [find where interface=out]; /ip address set interface=bri-hs [find where interface=out]
/interface bridge ports
bad command name ports (line 1 column 19)
[admin@MikroTik] /queue simple> add bridge=bri-hs interface=wlan1
expected end of command (line 1 column 5)
[admin@MikroTik] /queue simple> add bridge=bri-hs interface=out; /ip hotspot set interface=bri-hs [find where interface=out]; /ip address set interface=bri-hs [find where in
terface=out]
expected end of command (line 1 column 5)
/interface bridge ports --> /interface bridge portjust receive error in last 3 lines:
Code: Select all/interface bridge ports bad command name ports (line 1 column 19) [admin@MikroTik] /queue simple> add bridge=bri-hs interface=wlan1 expected end of command (line 1 column 5) [admin@MikroTik] /queue simple> add bridge=bri-hs interface=out; /ip hotspot set interface=bri-hs [find where interface=out]; /ip address set interface=bri-hs [find where in terface=out] expected end of command (line 1 column 5)
/interface bridge port
add bridge=bri-hs interface=wlan1
add bridge=bri-hs interface=out; /ip hotspot set interface=bri-hs [find where interface=out]; /ip address set interface=bri-hs [find where interface=out]
شكرا للمجاملة!thanks rextended, You are very helpful
شكرا