Skip to content

Commit

Permalink
Merge pull request #19 from danielhmetro/master
Browse files Browse the repository at this point in the history
Create two OmniTik configs based on PoE Out Status
  • Loading branch information
zgiles authored Jan 20, 2022
2 parents beb9e2f + 0cde547 commit f667586
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ 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
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# NYC Mesh Mikrotik Omnitik config
# Omnitik 5ac
:global nodenumber {{nodenumber}}
:global bgpasn {{bgpasn}}
:global nodenumber {{network_number}}

: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 )
Expand Down Expand Up @@ -34,6 +33,13 @@ set use-ip-firewall=yes

:beep frequency=700 length=100ms

/interface ethernet
set [ find default-name=ether1 ] comment="NN:$nodenumber"
set [ find default-name=ether2 ] poe-out=off
set [ find default-name=ether3 ] poe-out=off
set [ find default-name=ether4 ] poe-out=off
set [ find default-name=ether5 ] poe-out=forced-on comment="device to hub"

/interface wireless security-profiles
add authentication-types=wpa-psk,wpa2-psk management-protection=allowed mode=\
dynamic-keys name=nycmeshnet supplicant-identity=nycmesh \
Expand All @@ -42,9 +48,10 @@ add authentication-types=wpa-psk,wpa2-psk management-protection=allowed mode=\
:beep frequency=800 length=100ms

/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 frequency=5180 mode=ap-bridge security-profile=nycmeshnet ssid=("nycmesh-" . $nodenumber . "-omni") radio-name=("nycmesh-" . $nodenumber . "-omni") wireless-protocol=802.11 wps-mode=disabled
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=ap-bridge security-profile=nycmeshnet ssid=("nycmesh-" . $nodenumber . "-omni") radio-name=("nycmesh-" . $nodenumber . "-omni") wireless-protocol=802.11 wps-mode=disabled rx-chains=0,1 tx-chains=0,1 default-forwarding=no
add disabled=no master-interface=wlan1 name=wlan2 ssid="-NYC Mesh Community WiFi-" wps-mode=disabled
add disabled=no master-interface=wlan1 name=wlan3 ssid="nycmesh-wds" wds-default-bridge=wds wds-mode=dynamic-mesh wps-mode=disabled security-profile=nycmeshnet
add comment="uses nycmesh-xxxx-omni via mesh bridge" disabled=yes master-interface=wlan1 mode=station-bridge name=wlan4 security-profile=nycmeshnet ssid=nycmesh-xxxx-omni wds-default-bridge=mesh

/interface wireless connect-list
add allow-signal-out-of-range=3s interface=wlan3 security-profile=nycmeshnet signal-range=-65..120
Expand All @@ -65,13 +72,14 @@ add add-default-route=no disabled=yes interface=ether5 use-peer-dns=no use-peer-
:beep frequency=1100 length=100ms

/interface bridge port
add bridge=mesh interface=ether1
add bridge=mesh interface=ether2
add bridge=mesh interface=ether3
add bridge=mesh interface=ether4
add bridge=mesh interface=ether5
add bridge=mesh hw=no interface=ether1
add bridge=mesh hw=no interface=ether2
add bridge=mesh hw=no interface=ether3
add bridge=mesh hw=no interface=ether4
add bridge=mesh hw=no interface=ether5
add bridge=mesh interface=wlan1
add bridge=mesh interface=wlan2
add bridge=mesh interface=wlan4
add bridge=wds interface=wlan3
add bridge=wds interface=dynamic internal-path-cost=100 path-cost=100

Expand Down Expand Up @@ -111,14 +119,6 @@ set allow-remote-requests=yes servers=10.10.10.10,1.1.1.1

:beep frequency=1600 length=100ms

/routing bgp instance
set default as=$bgpasn disabled=no

/routing bgp network
add network=$cidr synchronize=no

:beep frequency=1650 length=100ms

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

0 comments on commit f667586

Please sign in to comment.