Skip to content

Commit

Permalink
Merge pull request #22 from danielhmetro/master
Browse files Browse the repository at this point in the history
Added faster LiteBeam scanning and New MikroTik configs
  • Loading branch information
zgiles authored Jun 7, 2022
2 parents 1dc2911 + a77241c commit 029336d
Show file tree
Hide file tree
Showing 6 changed files with 270 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ snmp.status=disabled
snmp.community=public
radio.1.txpower=22
radio.1.status=enabled
radio.1.scanbw.status=enabled
radio.1.scan_list.status=disabled
radio.1.scanbw.status=disabled
radio.1.scan_list.channels=5220,5225,5230,5235,5240,5260,5265,5270,5275,5280,5285,5290,5295,5300,5305,5310,5315,5320,5325,5330,5485,5490,5495,5500,5505,5510,5515,5520,5525,5530,5535,5540,5545,5550,5555,5560,5710,5740,5745,5750,5755,5760,5765,5770,5775,5780,5785,5790,5795,5800,5805,5810,5815,5820,5825,5830,5835
radio.1.scan_list.status=enabled
radio.1.rx_sensitivity=-96
radio.1.reg_obey=enabled
radio.1.rc_mode=0
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion Omnitik5AC/omni-only.rsc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ set use-ip-firewall=yes

/interface ethernet
set [ find default-name=ether1 ] comment="NN:$nodenumber"
set [ find ] poe-out=off

/interface wireless security-profiles
add authentication-types=wpa-psk,wpa2-psk management-protection=allowed mode=\
Expand Down
66 changes: 66 additions & 0 deletions SXTsq5AC/sxtsq5ac-mesh-bridge.rsc.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# NYC Mesh Mikrotik SXTsq 5ac OSPF config
# OSPF mesh node
:global nodenumber {{nodenumber}}

/delay 15

:foreach x in=[/interface wireless find] do={ /interface wireless reset-configuration $x }

/interface bridge
add auto-mac=yes name=bridge fast-forward=no

/interface bridge settings
set use-ip-firewall=yes

/interface wireless security-profiles
add authentication-types=wpa-psk,wpa2-psk management-protection=allowed mode=\
dynamic-keys name=nycmeshnet supplicant-identity=nycmesh \
wpa-pre-shared-key=nycmeshnet wpa2-pre-shared-key=nycmeshnet

/interface wireless
set [ find default-name=wlan1 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-Ceee country="united states3" disabled=no distance=dynamic antenna-gain=0 installation=any frequency=5180 mode=station-bridge security-profile=nycmeshnet wireless-protocol=802.11 wps-mode=disabled ssid="nycmesh-xxxx-omni" radio-name=("nycmesh-" . $nodenumber . "-sxt") comment="uses nycmesh-xxxx-omni via bridge"

/interface wireless connect-list
add allow-signal-out-of-range=3s disabled=yes interface=wlan1 security-profile=nycmeshnet signal-range=-75..120
add connect=no disabled=yes interface=wlan1 security-profile=nycmeshnet signal-range=-120..-75

/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=bridge

/interface bridge port
add bridge=bridge interface=ether1
add bridge=bridge interface=wlan1

/ip dns
set allow-remote-requests=yes servers=10.10.10.10,1.1.1.1

/ip firewall address-list
add address=10.0.0.0/8 list=meshaddr
add address=199.167.59.0/24 list=meshaddr
add address=199.170.132.0/24 list=meshaddr

/ip firewall filter
add action=accept chain=input protocol=icmp
add action=accept chain=input dst-port=53 protocol=udp
add action=accept chain=input connection-state=established,related
add action=drop chain=input src-address-list=!meshaddr

/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
set pptp disabled=yes
set udplite disabled=yes
set dccp disabled=yes
set sctp disabled=yes

/snmp set enabled=yes

/system identity set name=("nycmesh-" . $nodenumber . "-sxt")

/system clock set time-zone-name=America/New_York
/system ntp client
set enabled=yes primary-ntp=10.10.10.123 server-dns-names=0.pool.ntp.org

106 changes: 106 additions & 0 deletions SXTsq5AC/sxtsq5ac-mesh-ospf-solo.rsc.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# NYC Mesh Mikrotik SXTsq 5ac OSPF config
# OSPF mesh node
:global nodenumber {{nodenumber}}

:global cidr ("10." . ((96+(nodenumber>>10))+0) . "." . (((nodenumber>>2)&255)+0) . "." . (((nodenumber&3)<<6)+0) . "/26")
:global ipthirdoctet ( [ :pick $nodenumber ([:len $nodenumber] - 5) ([:len $nodenumber] - 2) ] + 0 )
:global ipfourthoctet ( [ :pick $nodenumber ([:len $nodenumber] - 2) ([:len $nodenumber]) ] + 0 )

:global cidrleft [ :pick $cidr 0 ( [ :find $cidr "/" ] ) ]
:global cidrright [ :pick $cidr (( [ :find $cidr "/" ] )+1) 100 ]
:global netmask (255.255.255.255<<(32-$cidrright))
:global subnet ($cidrleft&$netmask)
:global firstip ($subnet+1)
:global lastip ($subnet + (~($subnet|$netmask)) - 1)
:global dhcprange (($firstip+5) . "-" . ($lastip-5))
:global meship ("10.69." . $ipthirdoctet . "." . (100 + $ipfourthoctet))
:global wdsip ("10.68." . $ipthirdoctet . "." . (100 + $ipfourthoctet))

/delay 15


:foreach x in=[/interface wireless find] do={ /interface wireless reset-configuration $x }

/interface bridge
add auto-mac=yes name=local fast-forward=no
add auto-mac=yes name=mesh fast-forward=no protocol-mode=none
add auto-mac=yes name=wds fast-forward=no protocol-mode=none

/interface bridge settings
set use-ip-firewall=yes

/interface wireless security-profiles
add authentication-types=wpa-psk,wpa2-psk management-protection=allowed mode=\
dynamic-keys name=nycmeshnet supplicant-identity=nycmesh \
wpa-pre-shared-key=nycmeshnet wpa2-pre-shared-key=nycmeshnet

/interface wireless
set [ find default-name=wlan1 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-Ceee country="united states3" disabled=no distance=dynamic antenna-gain=0 installation=any frequency=5180 mode=station-bridge security-profile=nycmeshnet wireless-protocol=802.11 wps-mode=disabled ssid="nycmesh-xxxx-omni" radio-name=("nycmesh-" . $nodenumber . "-sxt") comment="uses nycmesh-xxxx-omni via mesh bridge"

/interface wireless connect-list
add allow-signal-out-of-range=3s disabled=yes interface=wlan1 security-profile=nycmeshnet signal-range=-75..120
add connect=no disabled=yes interface=wlan1 security-profile=nycmeshnet signal-range=-120..-75

/ip address
add address=($firstip . "/" . $cidrright) interface=local
add address=($meship . "/16") interface=mesh
add address=($wdsip . "/16") interface=wds

/interface bridge port
add bridge=local interface=ether1
add bridge=mesh interface=wlan1
add bridge=wds interface=dynamic internal-path-cost=100 path-cost=100

/interface bridge filter
add action=drop chain=forward in-bridge=mesh
add action=drop chain=forward in-bridge=wds

/ip pool
add name=local ranges=$dhcprange

/ip dhcp-server
add address-pool=local disabled=no interface=local name=localdhcp

/ip dhcp-server network
add address=$cidr dns-server=( "10.10.10.10," . $firstip) gateway=$firstip netmask=$cidrright

/ip dns
set allow-remote-requests=yes servers=10.10.10.10,1.1.1.1

/routing ospf instance set [ find default=yes ] router-id=$meship redistribute-connected=as-type-1
/routing filter add chain="ospf-in" set-bgp-communities=65000:110 set-distance=205
/routing ospf interface add interface=mesh network-type=ptmp
/routing ospf interface add interface=wds network-type=ptmp cost=30
/routing ospf network add area=backbone network=10.69.0.0/16
/routing ospf network add area=backbone network=10.68.0.0/16

/ip firewall address-list
add address=10.0.0.0/8 list=meshaddr
add address=199.167.59.0/24 list=meshaddr
add address=199.170.132.0/24 list=meshaddr

/ip firewall filter
add action=accept chain=input protocol=icmp
add action=accept chain=input dst-port=53 protocol=udp
add action=accept chain=input connection-state=established,related
add action=drop chain=input src-address-list=!meshaddr

/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
set pptp disabled=yes
set udplite disabled=yes
set dccp disabled=yes
set sctp disabled=yes

/snmp set enabled=yes

/system identity set name=("nycmesh-" . $nodenumber . "-sxt")

/system clock set time-zone-name=America/New_York
/system ntp client
set enabled=yes primary-ntp=10.10.10.123 server-dns-names=0.pool.ntp.org

95 changes: 95 additions & 0 deletions SXTsq5AC/sxtsq5ac-mesh-ospf.rsc.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# NYC Mesh Mikrotik SXTsq 5ac OSPF config
# OSPF mesh node
:global nodenumber {{nodenumber}}

:global cidr ("10." . ((96+(nodenumber>>10))+0) . "." . (((nodenumber>>2)&255)+0) . "." . (((nodenumber&3)<<6)+0) . "/26")
:global ipthirdoctet ( [ :pick $nodenumber ([:len $nodenumber] - 5) ([:len $nodenumber] - 2) ] + 0 )
:global ipfourthoctet ( [ :pick $nodenumber ([:len $nodenumber] - 2) ([:len $nodenumber]) ] + 0 )

:global cidrleft [ :pick $cidr 0 ( [ :find $cidr "/" ] ) ]
:global cidrright [ :pick $cidr (( [ :find $cidr "/" ] )+1) 100 ]
:global netmask (255.255.255.255<<(32-$cidrright))
:global subnet ($cidrleft&$netmask)
:global firstip ($subnet+1)
:global lastip ($subnet + (~($subnet|$netmask)) - 1)
:global meship ("10.69." . $ipthirdoctet . "." . (100 + $ipfourthoctet))
:global wdsip ("10.68." . $ipthirdoctet . "." . (100 + $ipfourthoctet))

/delay 15


:foreach x in=[/interface wireless find] do={ /interface wireless reset-configuration $x }

/interface bridge
add auto-mac=yes name=local fast-forward=no
add auto-mac=yes name=mesh fast-forward=no protocol-mode=none
add auto-mac=yes name=wds fast-forward=no protocol-mode=none

/interface bridge settings
set use-ip-firewall=yes

/interface wireless security-profiles
add authentication-types=wpa-psk,wpa2-psk management-protection=allowed mode=\
dynamic-keys name=nycmeshnet supplicant-identity=nycmesh \
wpa-pre-shared-key=nycmeshnet wpa2-pre-shared-key=nycmeshnet

/interface wireless
set [ find default-name=wlan1 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-Ceee country="united states3" disabled=no distance=dynamic antenna-gain=0 installation=any frequency=5180 mode=station-bridge security-profile=nycmeshnet wireless-protocol=802.11 wps-mode=disabled ssid="nycmesh-xxxx-omni" radio-name=("nycmesh-" . $nodenumber . "-sxt") comment="uses nycmesh-xxxx-omni via mesh bridge"

/interface wireless connect-list
add allow-signal-out-of-range=3s disabled=yes interface=wlan1 security-profile=nycmeshnet signal-range=-75..120
add connect=no disabled=yes interface=wlan1 security-profile=nycmeshnet signal-range=-120..-75

/ip address
add address=($meship . "/16") interface=mesh
add address=($wdsip . "/16") interface=wds

/interface bridge port
add bridge=mesh interface=ether1
add bridge=mesh interface=wlan1
add bridge=wds interface=dynamic internal-path-cost=100 path-cost=100

/interface bridge filter
add action=drop chain=forward in-bridge=mesh
add action=drop chain=forward in-bridge=wds

/ip dns
set allow-remote-requests=yes servers=10.10.10.10,1.1.1.1

/routing ospf instance set [ find default=yes ] router-id=$meship redistribute-connected=as-type-1
/routing filter add chain="ospf-in" set-bgp-communities=65000:110 set-distance=205
/routing ospf interface add interface=mesh network-type=ptmp
/routing ospf interface add interface=wds network-type=ptmp cost=30
/routing ospf network add area=backbone network=10.69.0.0/16
/routing ospf network add area=backbone network=10.68.0.0/16

/ip firewall address-list
add address=10.0.0.0/8 list=meshaddr
add address=199.167.59.0/24 list=meshaddr
add address=199.170.132.0/24 list=meshaddr

/ip firewall filter
add action=accept chain=input protocol=icmp
add action=accept chain=input dst-port=53 protocol=udp
add action=accept chain=input connection-state=established,related
add action=drop chain=input src-address-list=!meshaddr

/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
set pptp disabled=yes
set udplite disabled=yes
set dccp disabled=yes
set sctp disabled=yes

/snmp set enabled=yes

/system identity set name=("nycmesh-" . $nodenumber . "-sxt")

/system clock set time-zone-name=America/New_York
/system ntp client
set enabled=yes primary-ntp=10.10.10.123 server-dns-names=0.pool.ntp.org

0 comments on commit 029336d

Please sign in to comment.