Mikrotik RouterBoard 433

De Guifi.net - Wiki Català

Fitxer:Routerboard433AH.png
Placa Routerboard RB433AH

Introducció

Les característiques es poden trobar a la web de microtik:

http://www.routerboard.com/comparison.html

Feu clic a la fletxa cap avall on posa More

  • CPU: Atheros AR7161 680MHz
  • Memory: 128Mb
  • Ports Ethernet': 3 de 10/100mbps
  • Expansió: 3 ràdios miniPCI
  • Alimentació per Power Jack: De 10 a 28V DC; Té una protecció contra excés de voltatge
  • Alimentació per PoE: De 10 a 28V DC;
  • Firmware: RouterOS Level5

Al mateix web podeu accedir als següents documents:

Encendre la Routerboard (Boot)

Hi han 2 formes de fer arribar la alimentació a la placa:

  • Mitjançant l'alimentador
  • Mitjançant PoE
  • Abans de fer un primer bip, parpellegin les llums de link i d'activitat de les connexions Ethernet RJ-45 de la placa.
  • Fa un primer bip (o pip), i al cap d'una estona, per indicar que ja està iniciat el firmware, farà dos bips alhora que parpellegen les senyals de link.

Quan la placa rep alimentació s'encén el LED blau. Per apagar, hem de desconnectar el cable d'alimentació o el cable POE.

Winbox

Consulteu l'article Winbox.

Con connectar-se al dispositiu

Consulteu la secció Connexió a un dispositiu de l'article Winbox.

Configuració per a guifi.net

Primer cal afegir un node a la web de guifi.net. Consulteu l'article Exemple_pas_a_pas_de_muntatge_d'un_node_a_l'IES_Nicolau_Copèrnic per conèixer els detalls.

Configuració de la routerboard amb unsolclic

Un cop tenim el node, els trastos i la radio i els enllaços creats, podem obtenir la configuració d'unsolclic. Trobareu una opció de menú al vostre node. Aneu a l'apartat Trastos. Trobareu un enllaç al unsolclic de cada trasto a la columna unsolclic.

Per exemple:

http://guifi.net/node/13502

Ha de ser quelcom similar al que trobareu a:

http://guifi.net/guifi/device/13371/view/unsolclic
# Generat per a: 
# RouterOSv3.x
:log info "Unsolclic for 13371-TRSIESCopernicRd1 going to be executed."
#
# Configuration for RouterOS > 2.9.51 or 3.x
# Trasto: 13371-TRSIESCopernicRd1
#
# ATENCIÓ: Versió Beta
#
# Methods to upload/execute this script:
# 1.-As a script. Upload this output as a script either with:
#     a.Winbox (with Linux, wine required)
#     b.Terminal (telnet, ssh...)
#    Then execute the script with:
#      > /system script run script_name
# 2.-Fitxer importat:
#     Desa aquesta "sortida" a un fitxer, després puja'l al router
#     fent servir FTP amb un nom de l'estil "script_name.rsc".
#     (note, l'extensió ".rsc" es un requisit)
#     Executa el fitxer importat amb la comanda:
#      > /import script_name
# 3.-Telnet copia i enganxar:
#     Open a terminal session, and cut&paste this output
#     directly on the terminal input.
#
# Notes:
# -routing-test package is required, be sure you have it enabled at system packages
# -wlans should be enabled manually, be sure to set the correct antenna (a or b)
#   according in how did you connect the cable to the miniPCI. Keep the
#   power at the minimum possible and check the channel.
# -The script doesn't reset the router, you might have to do it manually
# -You must have write access to the router
# -MAC access (winbox, MAC telnet...) method is recommended
#   (the script reconfigures some IP addresses, so communication can be lost)
# -No changes are done in user passwords on the device
# -A Read Only guest account with no password will be created to allow guest access
#   to the router with no danger of damage but able to see the config.
# -Be sure that all packages are activated.
# -Don't run the script from telnet and being connected through an IP connection at
#   the wLan/Lan interface: This interface will be destroyed during the script.
#
/ system identity set name=TRSIESCopernicRd1
#
# DNS (client & server cache) zone: 8802
/ip dns set primary-dns=10.139.7.162 allow-remote-requests=yes
:delay 1
#
# NTP (client & server cache) zone: 8802
/system ntp client set enabled=yes mode=unicast primary-ntp=10.139.7.162
:delay 1
#
# Bandwidth-server
/ tool bandwidth-server set enabled=yes authenticate=no allocate-udp-ports-from=2000
#
# SNMP
/snmp set contact="guifi@guifi.net" enabled=yes location="TRSIESCopernic"
#
# Guest user
/user
:foreach i in [find group=read] do={/user remove $i;}
add name="guest" group=read address=0.0.0.0/0 comment="" disabled=no
#
# Graphing
/tool graphing interface add
# Remove current wLan/Lan bridge if exists
:foreach i in [/interface bridge find name=wLan/Lan] \
do={:foreach i in [/interface bridge port find bridge=wLan/Lan] \
do={/interface bridge port remove $i; \
:foreach i in [/ip address find interface=wLan/Lan] \
do={/ip address remove $i;};};
/interface bridge remove $i;}
# Construct main bridge on wlan1 & ether1
/ interface bridge
add name="wLan/Lan"
/ interface bridge port
add interface=ether1 bridge=wLan/Lan
add interface=wlan1 bridge=wLan/Lan
:delay 1
#
# Radio#: 0 TRSACprncRd1AP0
/interface wireless set wlan1 name="wlan1" \
radio-name="TRSACprncRd1AP0" mode=ap-bridge ssid="guifi.net-TRSACprncRd1AP0" \
band="2.4ghz-b" \
frequency-mode=manual-txpower country=spain antenna-gain=0 \
dfs-mode=radar-detect \
antenna-mode=ant-a wds-mode=static wds-default-bridge=none wds-default-cost=100 \
wds-cost-range=50-150 wds-ignore-ssid=yes hide-ssid=no
:delay 1
# Type: wLan/Lan
/ip address
:foreach i in [find address="10.139.60.33/27"] do={remove $i}
/ ip address add address=10.139.60.33/27 network=10.139.60.32 broadcast=10.139.60.63 interface=wLan/Lan disabled=no
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wLan/Lan] do={/routing ospf interface remove $i;}
add interface=wLan/Lan
/ routing ospf network
:foreach i in [/routing ospf network find network=10.139.60.32/27] do={/routing ospf network remove $i;}
add network=10.139.60.32/27 area=backbone disabled=no
  :delay 1
 #
# DHCP
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.139.60.34 mac-address=00:15:6D:AD:70:EF client-id=TRSCEIPMariaGaliRd1 server=dhcp-wLan/Lan
:foreach i in [/ip dhcp-server network find address="10.139.60.32/27"] do={/ip dhcp-server network remove $i;}
:foreach i in [/ip pool find name=dhcp-wLan/Lan] do={/ip pool remove $i;}
/ip pool add name=dhcp-wLan/Lan ranges=10.139.60.40-10.139.60.62
/ip dhcp-server network add address=10.139.60.32/27 gateway=10.139.60.33 domain=guifi.net comment=dhcp-wLan/Lan
:foreach i in [/ip dhcp-server find name=dhcp-wLan/Lan] do={/ip dhcp-server remove $i;}
/ip dhcp-server add name=dhcp-wLan/Lan interface=wLan/Lan address-pool=dhcp-wLan/Lan disabled=no
#
:delay 1
# Type: wds/p2p
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan1] \
do={:foreach n in [/interface wireless wds get $i name] \
do={:foreach inum in [/ip address find interface=$n] \
do={/ip address remove $inum;};}; \
/interface wireless wds remove $i;}
#
:delay 1
#
# Routed device
#
# Altres connexions de cable
#
# Internal addresses NAT
:foreach i in [/ip firewall nat find src-address="172.25.0.0/16"] do={/ip firewall nat remove $i;}
:foreach i in [/ip firewall nat find src-address="192.168.0.0/16"] do={/ip firewall nat remove $i;}
/ip firewall nat
add chain=srcnat src-address="192.168.0.0/16" dst-address=!192.168.0.0/16 action=src-nat to-addresses=10.139.60.33 comment="" disabled=no
add chain=srcnat src-address="172.25.0.0/16" dst-address=!172.25.0.0/16 protocol=!ospf action=src-nat to-addresses=10.139.60.33 comment="" disabled=no
#
# Enrutament BGP
# Filtres BGP i OSPF
:foreach i in [/routing filter find chain=ospf-in] do={/routing filter remove $i;}
:foreach i in [/routing filter find chain=ospf-out] do={/routing filter remove $i;}
/ routing filter
add chain=ospf-out prefix=10.0.0.0/8 prefix-length=8-32 invert-match=no action=accept comment="" disabled=no
add chain=ospf-out invert-match=no action=discard comment="" disabled=no
add chain=ospf-in prefix=10.0.0.0/8 prefix-length=8-32 invert-match=no action=accept comment="" disabled=no
add chain=ospf-in invert-match=no action=reject comment="" disabled=no
#
# Instància BGP
/ routing bgp instance
set default name="default" as=13371 router-id=10.139.60.33 redistribute-static=yes \
redistribute-connected=yes redistribute-rip=yes redistribute-ospf=yes \
redistribute-other-bgp=yes out-filter=ospf-out \
client-to-client-reflection=yes comment="" disabled=no
#
# Enrutament OSPF
/routing ospf set router-id=10.139.60.33 distribute-default=never redistribute-connected=no redistribute-static=no redistribute-rip=no redistribute- bgp=as-type-1 
#
:log info "Unsolclic for 13371-TRSIESCopernicRd1 executed."
/ 

Per aplicar els canvis heu d'utilitzar Winbox per connectar-vos al dispositiu. Si és el primer cop haureu instal·lar Winbox. Un cop connectats aneu a l'apartat New Terminal:

Fitxer:RouterBoardGuifi.png

Aquí heu d'enganxar directament (amb les opcions copiar i enganxar del menú contextual del botó dret) la configuració d'unsolclic.

Upgrade del routerOS

Resolució de problemes. Preguntes més freqüents. Troubleshooting

Com saber la MAC d'una microtik?

Cal consultar-la des de winbox a l'apartat interfaces.

Targetes WIFI miniPCI

Es pot consultar la MAC a la pròpia placa en una enganxina que porta.

Recursos

Eines de l'usuari