Mikrotik – QoS (Quality of Service) para VoIP (Orange FTTH)

noviembre 6, 2017

Mikrotik – QoS (Quality of Service) para VoIP

Howto anterior

Este howto puede considerarse una segunda parte de Livebox Orange detrás de router neutro Mikrotik con VoIP funcionando

Objetivos

  • Garantizar un mínimo de ancho de banda de conexión a Internet para VoIP

Diferencias con otros howtos

  • Basada en red 192.168.1.1/24 (se conserva esta porque se heredó de una red de Teléfonica / Movistar ADSL)
  • En la medida de lo posible se explican los diferentes pasos realizados y no es un simple “Copiar y pegar todos los comandos”
  • Se conecta al Microtik mediante ssh en lugar de con winbox o utilidades similares
  • No se sacaran passwords de SIP del Livebox para sustituir por un dispositivo VoIP

Materiales

  • Mikrotik CRS125-24G-1S-RM (También aplicable a Mikrotik 750 y otros modelos)
  • Dispositivo VoIP (Opcional si podemos usar el PC)

Cómo conectarse al Microtik

  • Sólo podemos conectarnos por cable (este modelo no tiene Wifi). Aún así, aunque tuviera wifi lo recomendable es conectarse por cable.
  • El PC lo tendremos que configurar, para mayor comodidad, para trabajar con ip estática y en el mismo rango que el de Microtik.
  • Abrimos un cliente SSH (putty en Windows) y lo apuntamos a la ip (que tenga en ese momento el Microtik) con el usuario: admin . Por ejemplo:  admin@192.168.88.1 .
  • Nos conectamos al puerto 2

Describiremos cómo configuramos el Mikrotik.

Configuración de red del PC

Para conectarse al router tenemos que configurar la red de nuestro PC para interactuar con él. En nuestro caso la ip del Mikrotik es: 192.168.1.1 .

IP: 192.168.1.10
Mascara de red: 255.255.255.0

service network-manager stop
ifconfig eth0 192.168.1.10 netmask 255.255.255.0

Conexión inicial a Mikrotik

Nos conectamos al router por ssh en el puerto 3.

ssh -p 22 admin@192.168.1.1

Aceptamos la key.

Nos aparece algo parecido a:

  MMM      MMM       KKK                          TTTTTTTTTTT      KKK
  MMMM    MMMM       KKK                          TTTTTTTTTTT      KKK
  MMM MMMM MMM  III  KKK  KKK  RRRRRR     OOOOOO      TTT     III  KKK  KKK
  MMM  MM  MMM  III  KKKKK     RRR  RRR  OOO  OOO     TTT     III  KKKKK
  MMM      MMM  III  KKK KKK   RRRRRR    OOO  OOO     TTT     III  KKK KKK
  MMM      MMM  III  KKK  KKK  RRR  RRR   OOOOOO      TTT     III  KKK  KKK

  MikroTik RouterOS X.YY.Z (c) 1999-2016       http://www.mikrotik.com/

[?]             Gives the list of available commands
command [?]     Gives help on the command and list of arguments

[Tab]           Completes the command/word. If the input is ambiguous,
                a second [Tab] gives possible options

/               Move up to base level
..              Move up one level
/command        Use command at the base level

[admin@MikroTik] >

Pulsamos cualquier tecla para continuar.

Ahora por comodidad vamos a hacer un dump de la configuración actual.

/export file=dump_prevoip_20171030

Con scp (desde el PC) podemos obtener este dump.

scp -P 22 admin@192.168.1.1:dump_prevoip_20171030.rsc .

Mangle del tráfico hacia centralita IP

Marcaremos los diferentes tráficos VoIP para que luego puedan ser priorizados.
La direcci\’on de la centralita en este ejemplo va a ser: 192.168.1.246 . La centralita está dentro de nuestra red local y conecta a un trunk sip externo.
Así pues hemos de priorizar tanto el tráfico que va hacía ella como el que sale de ella.

Mangle de la conexi\’on SIP

Los paquetes SIP permiten conectar desde los clientes SIP (teléfonos) a la centralita.
Aquí marcamos la conexión porque es más eficiente para marcar después los paquetes.
Para identificar el tráfico SIP buscamos los paquetes que van a la centralita así como los que vuelven desde ella usando el puerto 5060 (el puerto SIP por defecto).

/ip firewall mangle
add chain=forward dst-address=192.168.1.246 protocol=tcp dst-port=5060\
 action=mark-connection new-connection-mark=sip-connection
/ip firewall mangle
add chain=forward src-address=192.168.1.246 protocol=tcp src-port=5060\
 action=mark-connection new-connection-mark=sip-connection-out

Mangle de los paquetes SIP

Ahora ya podemos, a partir de las conexiones marcar cada uno de los paquetes.

/ip firewall mangle
add action=mark-packet chain=forward connection-mark=sip-connection new-packet-mark=SIP
/ip firewall mangle
add action=mark-packet chain=forward connection-mark=sip-connection-out new-packet-mark=SIP

Mangle de la conexion RTP

Los paquetes RTP permiten conectar la centralita al exterior (trunk).
Aquí marcamos la conexión porque es más eficiente para marcar después los paquetes.
Para identificar el tráfico RTP buscamos los paquetes que van a la centralita así como los que vuelven desde ella usando los puertos desde 10000 hasta 20000 (puertos RTP que se emplean por defecto) en UDP.

/ip firewall mangle
add action=mark-connection chain=forward dst-address=192.168.1.246\
 new-connection-mark=rtp-connection port=10000-20000 protocol=udp
/ip firewall mangle
add action=mark-connection chain=forward src-address=192.168.1.246\
 new-connection-mark=rtp-connection-out port=10000-20000 protocol=udp

Mangle de los paquetes RTP

Ahora ya podemos, a partir de las conexiones marcar cada uno de los paquetes.

add action=mark-packet chain=forward connection-mark=rtp-connection new-packet-mark=RTP
add action=mark-packet chain=forward connection-mark=rtp-connection-out new-packet-mark=RTP

Cambio del DSCP

En teorí el dscp dentro de una red interna dará más prioridad a nuestro tráfico (útil si este tuviera que viajar por varios switches locales).

/ip firewall mangle
add action=change-dscp chain=postrouting disabled=no packet-mark=SIP new-dscp=46


/ip firewall mangle
add action=change-dscp chain=postrouting disabled=no packet-mark=RTP new-dscp=46

Tag prioridad de vlan

Forzaremos la prioridad 5 de IEEE 802.1p para los paquetes que saquemos por la vlan de Orange.
Obviamente sólo afectará a los que salgan al exterior desde la centralita usando los puertos de RTP (recordemos que es el tráfico que va desde la centralita al trunk).
La prioridad 5 se suele usar para VoIP según el estándar de IEEE 802.1p.

/ip firewall mangle
add action=set-priority chain=output src-address=192.168.1.246\
 new-priority=5 port=10000-20000 protocol=udp out-interface=ether24-vlan832

Colas de prioridad

Nosotros tenemos 300 Mbps de subida y 300 Mbps de bajada.
Nuestra salida a Internet es a través de la interfaz ether24-vlan832.
Nuestra interfaz que se usa para conectar a todas las bocas es: ether1-master . En esa interfaz limitaremos la descarga.

Dada la bibliografía todo apunta a que por llamada VoIP se necesita:

  • 88 kbps para RTP
  • 65 kbps para SIP

Nosotros tenemos dos líneas VoIP así que no necesitaríamos más.
Pondremos 100 kbps para tener margen y supondremos que queremos 6 llamadas en paralelo para el día de mañana.

Así necesitaríamos:
6 llamadas x ( 100 kbps + 100 kbps ) = 1200 kbps

Del total: 300 Mbps = 307200 kbps repartiríamos:

  • Subida para VoIP: 1200 kbps
  • Subida para VoIP: 306000 kbps

Para la descarga o bajada realizaremos las mismas suposiciones que para la subida.

Cola padre de subida

En todos estos sistemas de priorización o limitación del ancho de banda tenemos que crear una limitación padre que contenga el 100% de nuestro ancho de banda. Yo he puesto el 100% porque nunca lo vamos usar aunque se recomienda usar el 80% de lo que realmente te dan por no tener problemas (el 20% se suele ir protocolos).

Así pues limitamos la subida a 300 mbps y a la mínima prioridad por defecto.

/queue tree
add limit-at=300M max-limit=300M name=subida parent=ether24-vlan832 priority=8 queue=default

Cola de subida RTP con prioridad 1

Las 6 llamadas simultaneas consumiendo RTP serían: 6 x 100 kbps = 600 kbps .
Gracias al marcado anterior de los paquetes con la marca RTP podemos con el limit-at reservarles 600 kbps sólo para ellos.

/queue tree
add limit-at=600k max-limit=600k name=subida_pri_1\
 packet-mark=RTP parent=subida priority=1 queue=default

Cola de subida SIP con prioridad 2

Las 6 llamadas simultaneas consumiendo SIP serían: 6 x 100 kbps = 600 kbps .
Gracias al marcado anterior de los paquetes con la marca SIP podemos con el limit-at reservarles 600 kbps sólo para ellos.

/queue tree
add limit-at=600k max-limit=600k name=subida_pri_2\
 packet-mark=SIP parent=subida priority=2 queue=default

Cola de subida para resto de tráfico

Este tráfico (el resto) tiene la prioridad mínima: 8.
No usamos limit-at porque no tenemos por qué garantizar este ancho de banda.

/queue tree
add max-limit=306000k name=subida_pri_8\
 packet-mark=no-mark parent=subida priority=8 queue=default

Cola padre de bajada

Aplican las mismas explicaciones que se dieron para las colas de subida.

/queue tree
add limit-at=300M max-limit=300M name=bajada parent=ether1-master priority=8 queue=default

Cola de bajada RTP con prioridad 1

Las 6 llamadas simultaneas consumiendo RTP serían: 6 x 100 kbps = 600 kbps

/queue tree
add limit-at=600k max-limit=600k name=bajada_pri_1\
 packet-mark=RTP parent=bajada priority=1 queue=default

Cola de bajada SIP con prioridad 2

/queue tree
add limit-at=600k max-limit=600k name=bajada_pri_2\
 packet-mark=SIP parent=bajada priority=2 queue=default

Cola de bajada para resto de tráfico

Este tráfico tiene la prioridad mínima: 8.
No usamos limit-at porque tenemos por qué garantizar este ancho de banda.

/queue tree
add max-limit=306000k name=bajada_pri_8 packet-mark=no-mark parent=bajada priority=8 queue=default

Bibliografía

Referencia – Todos los comandos de VoIP

/ip firewall mangle
# 
add chain=forward dst-address=192.168.1.246 protocol=tcp dst-port=5060\
 action=mark-connection new-connection-mark=sip-connection
add chain=forward src-address=192.168.1.246 protocol=tcp src-port=5060\
 action=mark-connection new-connection-mark=sip-connection-out

add action=mark-packet chain=forward connection-mark=sip-connection new-packet-mark=SIP
add action=mark-packet chain=forward connection-mark=sip-connection-out new-packet-mark=SIP

add action=mark-connection chain=forward dst-address=192.168.1.246\
 new-connection-mark=rtp-connection port=10000-20000 protocol=udp
add action=mark-connection chain=forward src-address=192.168.1.246\
 new-connection-mark=rtp-connection-out port=10000-20000 protocol=udp

add action=mark-packet chain=forward connection-mark=rtp-connection new-packet-mark=RTP
add action=mark-packet chain=forward connection-mark=rtp-connection-out new-packet-mark=RTP

add action=change-dscp chain=postrouting disabled=no packet-mark=SIP new-dscp=46
add action=change-dscp chain=postrouting disabled=no packet-mark=RTP new-dscp=46

# IEEE 802.1p : Prioridad 5 al salir a Internet
add action=set-priority chain=output src-address=192.168.1.246 new-priority=5\
 port=10000-20000 protocol=udp out-interface=ether24-vlan832

/queue tree
add limit-at=300M max-limit=300M name=subida parent=ether24-vlan832 priority=8 queue=default
add limit-at=600k max-limit=600k name=subida_pri_1\
 packet-mark=RTP parent=subida priority=1 queue=default
add limit-at=600k max-limit=600k name=subida_pri_2\
 packet-mark=SIP parent=subida priority=2 queue=default
add max-limit=306000k name=subida_pri_8 packet-mark=no-mark parent=subida priority=8 queue=default
add limit-at=300M max-limit=300M name=bajada parent=ether1-master priority=8 queue=default
add limit-at=600k max-limit=600k name=bajada_pri_1\
 packet-mark=RTP parent=bajada priority=1 queue=default
add limit-at=600k max-limit=600k name=bajada_pri_2\
 packet-mark=SIP parent=bajada priority=2 queue=default
add max-limit=306000k name=bajada_pri_8 packet-mark=no-mark parent=bajada priority=8 queue=default

Extra – Sniffer para evaluar calidad

Lo suyo es realizar este paso antes y despues de aplicar el QoS de VoIP (con diferentes file-name) para evaluar su impacto.

/tool sniffer
set memory-limit=2048KiB
set file-name=voip-evaluar01.pcap
set filter-ip-address=192.168.1.246
start
# Realizar llamada
stop
# Obtener voip-evaluar01.pcap
# por scp

Usar Common VoIP problems, How to detect, correct and avoid them. by Penny Tone LLC para interpretar el jitter.
Nuestro objetivo ideal es obtener, en base a los requisitos de VoIP:

Perdida de paquetes: Menos del 5%.
Latencia: Menos de 120-150 ms en un sentido.
Jitter (Buffer menos de entre 1 o 3 ms).

Referencia – Configuración Mikrotik – Dump inicial

# oct/30/2017 21:52:39 by RouterOS 6.35.4
# software id = LLYC-IDAG
#
/interface ethernet
set [ find default-name=ether1 ] name=ether1-master
set [ find default-name=ether2 ] mac-address=E0:51:63:04:C6:32
set [ find default-name=ether3 ] master-port=ether1-master
set [ find default-name=ether4 ] master-port=ether1-master
set [ find default-name=ether5 ] master-port=ether1-master
set [ find default-name=ether6 ] master-port=ether1-master
set [ find default-name=ether7 ] master-port=ether1-master
set [ find default-name=ether8 ] master-port=ether1-master
set [ find default-name=ether9 ] master-port=ether1-master
set [ find default-name=ether10 ] master-port=ether1-master
set [ find default-name=ether11 ] master-port=ether1-master
set [ find default-name=ether12 ] master-port=ether1-master
set [ find default-name=ether13 ] master-port=ether1-master
set [ find default-name=ether14 ] master-port=ether1-master
set [ find default-name=ether15 ] master-port=ether1-master
set [ find default-name=ether16 ] master-port=ether1-master
set [ find default-name=ether17 ] master-port=ether1-master
set [ find default-name=ether18 ] master-port=ether1-master
set [ find default-name=ether19 ] master-port=ether1-master
set [ find default-name=ether20 ] master-port=ether1-master
set [ find default-name=ether21 ] master-port=ether1-master
set [ find default-name=ether22 ] master-port=ether1-master
set [ find default-name=ether23 ] master-port=ether1-master
set [ find default-name=sfp1 ] master-port=ether1-master
/interface vlan
add interface=ether2 name=ether2-vlan832 vlan-id=832
add interface=ether24 name=ether24-vlan832 vlan-id=832
/ip pool
add name=dhcp_pool1 ranges=192.168.1.30-192.168.1.250
add name=dhcp_pool2 ranges=192.168.99.2
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether1-master lease-time=3d \
    name=dhcp1
add address-pool=dhcp_pool2 disabled=no interface=ether24-vlan832 lease-time=\
    3d name=dhcp2
/interface ethernet switch port
set 0 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 1 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 2 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 3 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 4 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 5 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 6 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 7 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 8 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 9 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 10 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 11 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 12 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 13 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 14 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 15 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 16 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 17 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 18 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 19 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 20 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 21 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 22 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 23 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 24 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 25 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
/ip address
add address=192.168.1.1/24 interface=ether1-master network=192.168.1.0

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

/ip dhcp-server network
add address=192.168.1.0/24 dns-server=62.36.225.150,62.37.228.20 gateway=\
    192.168.1.1
add address=192.168.99.0/24 gateway=192.168.99.1
/ip firewall filter
add chain=input comment="defconf: accept ICMP" protocol=icmp
add chain=input comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=input comment=\
    "Drop de todo lo que viene desde nuestra WAN" in-interface=ether2-vlan832
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related
add chain=forward comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "Drop de todo lo que viene de la WAN que no esta DSTNATed" \
    connection-nat-state=!dstnat connection-state=new in-interface=\
    ether2-vlan832
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether2-vlan832

/ip service
set telnet disabled=yes
set www disabled=yes
set api disabled=yes
set winbox disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Asia/Jakarta
/system routerboard settings
set protected-routerboot=disabled

Referencia – Configuración Mikrotik final

# nov/04/2017 00:03:10 by RouterOS 6.35.4
# software id = LLYC-IDAG
#
/interface ethernet
set [ find default-name=ether1 ] name=ether1-master
set [ find default-name=ether2 ] mac-address=E0:51:63:04:C6:32
set [ find default-name=ether3 ] master-port=ether1-master
set [ find default-name=ether4 ] master-port=ether1-master
set [ find default-name=ether5 ] master-port=ether1-master
set [ find default-name=ether6 ] master-port=ether1-master
set [ find default-name=ether7 ] master-port=ether1-master
set [ find default-name=ether8 ] master-port=ether1-master
set [ find default-name=ether9 ] master-port=ether1-master
set [ find default-name=ether10 ] master-port=ether1-master
set [ find default-name=ether11 ] master-port=ether1-master
set [ find default-name=ether12 ] master-port=ether1-master
set [ find default-name=ether13 ] master-port=ether1-master
set [ find default-name=ether14 ] master-port=ether1-master
set [ find default-name=ether15 ] master-port=ether1-master
set [ find default-name=ether16 ] master-port=ether1-master
set [ find default-name=ether17 ] master-port=ether1-master
set [ find default-name=ether18 ] master-port=ether1-master
set [ find default-name=ether19 ] master-port=ether1-master
set [ find default-name=ether20 ] master-port=ether1-master
set [ find default-name=ether21 ] master-port=ether1-master
set [ find default-name=ether22 ] master-port=ether1-master
set [ find default-name=ether23 ] master-port=ether1-master
set [ find default-name=sfp1 ] master-port=ether1-master
/interface vlan
add interface=ether2 name=ether2-vlan832 vlan-id=832
add interface=ether24 name=ether24-vlan832 vlan-id=832
/ip pool
add name=dhcp_pool1 ranges=192.168.1.30-192.168.1.250
add name=dhcp_pool2 ranges=192.168.99.2
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether1-master lease-time=3d \
    name=dhcp1
add address-pool=dhcp_pool2 disabled=no interface=ether24-vlan832 lease-time=\
    3d name=dhcp2
/queue tree
add limit-at=300M max-limit=300M name=subida parent=ether24-vlan832 queue=\
    default
add limit-at=600k max-limit=600k name=subida_pri_1 packet-mark=RTP parent=\
    subida priority=1 queue=default
add limit-at=600k max-limit=600k name=subida_pri_2 packet-mark=SIP parent=\
    subida priority=2 queue=default
add max-limit=306M name=subida_pri_8 packet-mark=no-mark parent=subida queue=\
    default
add limit-at=300M max-limit=300M name=bajada parent=ether1-master queue=\
    default
add limit-at=600k max-limit=600k name=bajada_pri_1 packet-mark=RTP parent=\
    bajada priority=1 queue=default
add limit-at=600k max-limit=600k name=bajada_pri_2 packet-mark=SIP parent=\
    bajada priority=2 queue=default
add max-limit=306M name=bajada_pri_8 packet-mark=no-mark parent=bajada queue=\
    default
/interface ethernet switch port
set 0 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 1 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 2 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 3 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 4 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 5 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 6 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 7 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 8 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 9 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 10 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 11 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 12 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 13 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 14 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 15 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 16 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 17 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 18 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 19 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 20 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 21 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 22 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 23 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 24 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 25 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
/ip address
add address=192.168.1.1/24 interface=ether1-master network=192.168.1.0

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

/ip dhcp-server network
add address=192.168.1.0/24 dns-server=62.36.225.150,62.37.228.20 gateway=\
    192.168.1.1
add address=192.168.99.0/24 gateway=192.168.99.1
/ip firewall filter
add chain=input comment="defconf: accept ICMP" protocol=icmp
add chain=input comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=input comment=\
    "Drop de todo lo que viene desde nuestra WAN" in-interface=ether2-vlan832
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related
add chain=forward comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "Drop de todo lo que viene de la WAN que no esta DSTNATed" \
    connection-nat-state=!dstnat connection-state=new in-interface=\
    ether2-vlan832
/ip firewall mangle
add action=mark-connection chain=forward dst-address=192.168.1.246 dst-port=\
    5060 new-connection-mark=sip-connection protocol=tcp
add action=mark-connection chain=forward new-connection-mark=\
    sip-connection-out protocol=tcp src-address=192.168.1.246 src-port=5060
add action=mark-packet chain=forward connection-mark=sip-connection \
    new-packet-mark=SIP
add action=mark-packet chain=forward connection-mark=sip-connection-out \
    new-packet-mark=SIP
add action=mark-connection chain=forward dst-address=192.168.1.246 \
    new-connection-mark=rtp-connection port=10000-20000 protocol=udp
add action=mark-connection chain=forward new-connection-mark=\
    rtp-connection-out port=10000-20000 protocol=udp src-address=\
    192.168.1.246
add action=mark-packet chain=forward connection-mark=rtp-connection \
    new-packet-mark=RTP
add action=mark-packet chain=forward connection-mark=rtp-connection-out \
    new-packet-mark=RTP
add action=change-dscp chain=postrouting new-dscp=46 packet-mark=SIP
add action=change-dscp chain=postrouting new-dscp=46 packet-mark=RTP
add action=set-priority chain=output new-priority=5 out-interface=\
    ether24-vlan832 port=10000-20000 protocol=udp src-address=192.168.1.246
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether2-vlan832

/ip service
set telnet disabled=yes
set www disabled=yes
set api disabled=yes
set winbox disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Asia/Jakarta
/system routerboard settings
set protected-routerboot=disabled
Anuncios

Ermita de Salas perdida

octubre 20, 2017

Volé desde Aguazul,
para iniciar peregrinaje,
ante tus pies arrodillarme,
solicitar tu indulgencia.

Tu figura presentaronme,
yo tenía que conocerte,
aquella capa voluptuosa,
no era sino signo divino.

En sueños me advertiste,
de no jugar con tu moral,
pero a mi palabra falté,
con el misterio jugué,
con el misterio me quemé.

El sexto penitencia,
recorro el Isuela,
por toda su vera,
buscando tu acompañante,
lametada ya no temida,
si no del todo ansiada.

Ahora no me pidas,
que a otra peregrine,
pues es tu imagen,
la que se me aparece.

Lecciones sobre separaciones temporales

septiembre 21, 2017

Primera lección: Por respeto después de una Luna que no duerme al día siguiente no puede haber un Europa que no duerma.

Segunda lección: Las brasas pueden arden. Hay que esperar, al menos 21 días, para que estén bien apagadas. No sea que gracias a dos fuegos te termines quemando más de lo que quisieras.

 

Finalmente, aunque no tenga que ver con separaciones temporales: No todo el mundo tiene tan pocos tonos de grises como los que tienes tú. Recuérdalo al ponerte en el lugar del otro.

Enara V

septiembre 19, 2017

¡Te busco!
¡No te encuentro!
Hablo solo,
frente a mi: ¡Eco!

No hay mayor abstinencia,
que la que siento dentro,
cuando no veo tu presencia.

Lucho contra el deseo,
de llamarte la atención,
pues bien al hacerlo,
la debilidad te muestro.

No hay mayor meta,
que calmar esas ansías.
¿En realidad quién eras?
¿Quizás una cualquiera?

No te quiero dar importancia,
pero aquí hago el recuento,
llego ya al decimosexto verso,
otorgándote gran relevancia.

Enara IV

agosto 18, 2017

Mis brazos alrededor tuya pondría,
en un abrazo contigo me fundiría,
sentir tu corazón palpitar,
escuchar tu aliento respirar.

Por un instante,
en el cielo me hallaría.

Asimetría labial

julio 17, 2017

Buscando la perfección,
para uno mismo,
allí me hallé,
buscando eso mismo,
en los demás.

Sin yo verlo venir,
fue de forma lenta,
se apoderó de mi.

Sobresaltado contemplé,
tus dudas encontradas,
la asimetría según tú,
no te iba a perdonar.

No son verdades,
pues si eres única,
y de mi especial,
es por esos detalles,
imperfecta te hacen.

Enara III

junio 16, 2017

Surgieron dudas de amor,
cuando la bella Enara,
descargó la bala,
que guardaba en recamara,
la bala que finalmente de amor,
me rematara.

Livebox Orange detrás de router neutro Mikrotik con VoIP funcionando

mayo 22, 2017

Livebox Orange detrás de router neutro Mikrotik con VoIP funcionando

Segunda parte

La segunda parte de este howto está disponible aquí: Mikrotik – QoS para VoIP en Orange FTTH

Objetivos

  • Evitar los cortes a Internet que el router por defecto de Orange (Livebox) genera durante el día
  • Control más personalizado de la conexión a Internet
  • Seguir disfrutando de la VoIP ofrecida por Livebox Orange

Diferencias con otros howtos

  • Se securiza la interfaz pública del router Mikrotik. (En el resto de howtos no se cae en la cuenta de que se deja la interfaz pública abierta. Es decir, que si no cambiamos la contraseña nos pueden entrar por ssh al Mikrotik desde el exterior.)
  • Está en una sola página y no has de elegir en un foro cuál es el post correcto
  • Basada en red 192.168.1.1/24 (se conserva esta porque se heredó de una red de Teléfonica / Movistar ADSL)
  • QoS para VozIP (En realidad esto al final no se implementó pero lo suyo sería que un howto de estas características configurase el Mikrotik para que este tráfico tuviera tráfico sobre el resto.)
  • En la medida de lo posible se explican los diferentes pasos realizados y no es un simple “Copiar y pegar todos los comandos”
  • Se conecta al Microtik mediante ssh en lugar de con winbox o utilidades similares
  • No se sacaran passwords de SIP del Livebox para sustituir por un dispositivo VoIP

Arquitectura física antes de la mejora

  • LiveBox conectado mediante “clavija Fibra” a ONT (Terminal de fibra óptica). (El modelo de la ONT es ONT F601.)
  • PCs y clientes VoIP conectados a “clavija 1”, “clavija 2”, “clavija 3”, “clavija 4” y “clavija 5” de LiveBox

Arquitectura física después de la mejora

  • Mikrotik conectado mediante “puerto 2” a ONT
  • Livebox conectado mediante “clavija Fibra” a “puerto 24” de Mikrotik
  • Livebox conectado mediante “clavija 1” a “puerto 2” de Mikrotik
  • PCs y clientes VoIP conectados a “clavija 2, “clavija 3” y “clavija 4” de Mikrotik

Arquitectura lógica antes de la mejora

  • Todos los PCS y clientes VoIP tienen como puerta enlace: 192.168.1.1 que es la ip asignada al Livebox
  • Los clientes VoIP se conectan contra 192.168.1.1 (Livebox)
  • Microtik no existe en la red
  • Livebox tiene la ip 192.168.1.1 (configurada en sus bocas LAN)
  • Livebox tiene la ip pública (En su clavija Fibra)
  • Livebox ofrece DHCP a la red

Arquitectura lógica después de la mejora

  • Todos los PCS y clientes VoIP tienen como puerta enlace: 192.168.1.1 que es la ip asignada al Mikrotik
  • Los clientes VoIP se conectan contra 192.168.1.2 (Livebox)
  • Mikrotik tiene la ip 192.168.1.1 (En sus puertos 2,3 y 4)
  • Mikrotik tiene la ip pública (En su puerto 1)
  • Mikrotik tiene la ip 192.168.99.1 (En su puerto 5)
  • Livebox tiene la ip 192.168.1.2 (configurada en sus bocas LAN)
  • Livebox tiene la ip 192.168.99.2 (En su clavija Fibra)
  • Livebox NO ofrece DHCP a la red
  • Mikrotik ofrece DHCP a la red

Materiales

  • Livebox
  • Mikrotik CRS125-24G-1S-RM (También aplicable a Mikrotik 750 y otros modelos)
  • PC con tarjeta de red provista de clavija ethernet RJ-45
  • Dispositivo VoIP (Opcional si podemos usar el PC)
  • Cable de red ( 4 cables mínimos )

Cómo conectarse al Livebox

  • Podemos conectarnos por cable
  • Podemos conectarnos por wifi
  • El PC lo tendremos que configurar, para mayor comodidad, para trabajar con ip estática y en el mismo rango que el Livebox.
  • Abrimos un navegador web y lo apuntamos a la ip (que tenga en ese momento el Livebox) es decir, por ejemplo,: http://192.168.1.1/

Cómo conectarse al Microtik

  • Sólo podemos conectarnos por cable (este modelo no tiene Wifi). Aún así, aunque tuviera wifi lo recomendable es conectarse por cable.
  • El PC lo tendremos que configurar, para mayor comodidad, para trabajar con ip estática y en el mismo rango que el de Microtik.
  • Abrimos un cliente SSH (putty en Windows) y lo apuntamos a la ip (que tenga en ese momento el Microtik) con el usuario: admin . Por ejemplo:  admin@192.168.88.1 .
  • Nos conectamos al puerto 2

Describiremos cómo configuramos el Mikrotik.

Configuración de red del PC

Para conectarse al router tenemos que configurar la red de nuestro PC para interactuar con él. Recordemos que la ip por defecto de Mikrotik es: 192.168.88.1 .

IP: 192.168.88.10
Mascara de red: 255.255.255.0

service network-manager stop
ifconfig eth0 192.168.88.10 netmask 255.255.255.0

Conexión inicial a Mikrotik

Nos conectamos al router por ssh en el puerto 3.

ssh -p 22 admin@192.168.88.1

Aceptamos la key.

Nos aparece algo parecido a:

  MMM      MMM       KKK                          TTTTTTTTTTT      KKK
  MMMM    MMMM       KKK                          TTTTTTTTTTT      KKK
  MMM MMMM MMM  III  KKK  KKK  RRRRRR     OOOOOO      TTT     III  KKK  KKK
  MMM  MM  MMM  III  KKKKK     RRR  RRR  OOO  OOO     TTT     III  KKKKK
  MMM      MMM  III  KKK KKK   RRRRRR    OOO  OOO     TTT     III  KKK KKK
  MMM      MMM  III  KKK  KKK  RRR  RRR   OOOOOO      TTT     III  KKK  KKK

  MikroTik RouterOS X.YY.Z (c) 1999-2016       http://www.mikrotik.com/

[?]             Gives the list of available commands
command [?]     Gives help on the command and list of arguments

[Tab]           Completes the command/word. If the input is ambiguous,
                a second [Tab] gives possible options

/               Move up to base level
..              Move up one level
/command        Use command at the base level
The following default configuration has been installed on your router:
-------------------------------------------------------------------------------
Switch mode:
 * all interfaces switched;
 * IP address 192.168.88.1/24 is set on LAN port
LAN Configuration:
    switch group: ether1 (master), ether2, ether3, ether4,
 ether5, ether6, ether7, ether8, ether9, ether10, ether11,
 ether12, ether13, ether14, ether15, ether16, ether17,
 ether18, ether19, ether20, ether21, ether22, ether23,
 ether24, sfp1

-------------------------------------------------------------------------------
You can type "v" to see the exact commands that are used to add and remove
this default configuration, or you can view them later with
'/system default-configuration print' command.
To remove this default configuration type "r" or hit any other key to continue.
If you are connected using the above IP and you remove it, you will be disconnected.

Pulsamos cualquier tecla para continuar.

Ahora por comodidad vamos a hacer un dump de la configuración actual.

/export file=dump_inicial_20170522

Con scp (desde el PC) podemos obtener este dump.

scp -P 22 admin@192.168.88.1:dump_inicial_20170522.rsc .

Configuración vlan 832 ONT

Ya que todos los puertos hacen bridge por defecto con ether1-master haremos que el puerto 2 tenga configurada la vlan 832. Esto nos permitirá interactuar con la ONT de Orange.
Así mismo esto nos facilitará configurar el router de forma más sencilla más adelante para que tenga la configuración de red 192.168.1.X .

Para que Mikrotik interactue con Orange no sólo ha de configurarse la vlan 832 si no que también se ha de configurar como un cliente dhcp de la misma.

Primero separaremos el puerto 2.

/interface ethernet
set [ find default-name=ether2 ] master-port=none

Lo definimos como vlan.

/interface vlan
add interface=ether2 name=ether2-vlan832 vlan-id=832

Y configuramos el cliente de dhcp.

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

Nueva red 192.168.1.X

Primero añadiremos una red extra a Mikrotik

/ip address
add address=192.168.1.1/24 interface=ether1-master network=192.168.1.0

Ahora nos desconectamos de nuestro router Mikrotik.

/quit

Configuramos nuestro PC para trabajar con:

IP: 192.168.1.10
Mascara de red: 255.255.255.0

ifconfig eth0 192.168.1.10 netmask 255.255.255.0

y nos conectamos ahora con:

ssh -p 22 admin@192.168.1.1

(En este punto aceptamos la key ssh).

Ahora ya podemos quitar la red por defecto.

/ip address print

nos muestra:

 #   ADDRESS            NETWORK         INTERFACE                                                                                                                                          
 0   ;;; defconf
     192.168.88.1/24    192.168.88.0    ether1-master                                                                                                                                      
 1   192.168.1.1/24     192.168.1.0     ether1-master

Ahí vemos como la red por defecto es 0. La quitaremos.

/ip address remove 0

con lo que nos quedará:

/ip address print
Flags: X - disabled, I - invalid, D - dynamic 
 #   ADDRESS            NETWORK         INTERFACE                                                                                                                                          
 0   192.168.1.1/24     192.168.1.0     ether1-master

Así mismo configuaremos dhcp en esta red porque usaremos el propio Mikrotik como servidor dhcp.

/ip pool
add name=dhcp_pool1 ranges=192.168.1.30-192.168.1.250
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether1-master lease-time=3d
/ip dhcp-server network
add address=192.168.1.0/24 dns-server=62.36.225.150,62.37.228.20 gateway=\
    192.168.1.1

Puerto 24 (puerto 5 en routers más pequeños) para Livebox

Este tiene que tener la vlan 832 así así como ofrecer un servidor dhcp al Livebox.

# Separamos
/interface ethernet
set [ find default-name=ether24 ] master-port=none
# Vlan
/interface vlan
add interface=ether24 name=ether24-vlan832 vlan-id=832
# Servidor DHCP
/ip pool
add name=dhcp_pool2 ranges=192.168.99.2
/ip dhcp-server
add address-pool=dhcp_pool2 disabled=no interface=ether24-vlan832 lease-time=3d
/ip dhcp-server network
add address=192.168.99.0/24 gateway=192.168.99.1

Salir a Internet por la ONT

/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether2-vlan832

Firewall para Internet

/ip firewall filter
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=input comment=\
    "Drop de todo lo que viene desde nuestra WAN" in-interface=ether2-vlan832
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "Drop de todo lo que viene de la WAN que no esta DSTNATed" \
    connection-nat-state=!dstnat connection-state=new in-interface=\
    ether2-vlan832

Recuperar red en PC de configuración

Opcionalmente podemos hacer:

service network-manager start

 

 

 

Cambiar contraseña

/user set 0 password="MuYSecr3to"

Desactivar accesos alternativos a ssh (opcional)

/ip service
set telnet disabled=yes
set www disabled=yes
set api disabled=yes
set winbox disabled=yes
set api-ssl disabled=yes

Desconectar y conectar todo de nuevo

Apagamos con:

/system shutdown

y pulsamos y para confirmar.

Ahora ya podemos poner el router en su localización final.

  • El PC de prueba (que esta vez deberá configurarse como un cliente dhcp normal) se conecta al puerto 3 del Mikrotik.
  • La ONT se conecta al puerto 2 del Mikrotik.
  • Livebox conectado mediante “clavija Fibra” a “puerto 24” de Mikrotik.

Mejoras posibles

  • Tráfico VoIP priorizado
  • Actualización del firmware del router

Referencia – Configuración Mikrotik – Dump inicial

# jan/02/1970 00:46:30 by RouterOS X.YY.Z
# software id = LLYC-IDAG
#
/interface ethernet
set [ find default-name=ether1 ] name=ether1-master
set [ find default-name=ether2 ] master-port=ether1-master
set [ find default-name=ether3 ] master-port=ether1-master
set [ find default-name=ether4 ] master-port=ether1-master
set [ find default-name=ether5 ] master-port=ether1-master
set [ find default-name=ether6 ] master-port=ether1-master
set [ find default-name=ether7 ] master-port=ether1-master
set [ find default-name=ether8 ] master-port=ether1-master
set [ find default-name=ether9 ] master-port=ether1-master
set [ find default-name=ether10 ] master-port=ether1-master
set [ find default-name=ether11 ] master-port=ether1-master
set [ find default-name=ether12 ] master-port=ether1-master
set [ find default-name=ether13 ] master-port=ether1-master
set [ find default-name=ether14 ] master-port=ether1-master
set [ find default-name=ether15 ] master-port=ether1-master
set [ find default-name=ether16 ] master-port=ether1-master
set [ find default-name=ether17 ] master-port=ether1-master
set [ find default-name=ether18 ] master-port=ether1-master
set [ find default-name=ether19 ] master-port=ether1-master
set [ find default-name=ether20 ] master-port=ether1-master
set [ find default-name=ether21 ] master-port=ether1-master
set [ find default-name=ether22 ] master-port=ether1-master
set [ find default-name=ether23 ] master-port=ether1-master
set [ find default-name=ether24 ] master-port=ether1-master
set [ find default-name=sfp1 ] master-port=ether1-master
/interface ethernet switch port
set 0 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 1 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 2 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 3 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 4 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 5 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 6 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 7 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 8 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 9 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 10 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 11 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 12 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 13 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 14 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 15 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 16 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 17 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 18 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 19 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 20 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 21 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 22 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 23 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 24 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 25 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
/ip address
add address=192.168.88.1/24 comment=defconf interface=ether1-master network=\
    192.168.88.0
/system routerboard settings
set boot-device=flash-boot protected-routerboot=disabled

Referencia – Configuración Mikrotik final

# jan/02/1970 03:12:33 by RouterOS X.YY.Z
# software id = LLYC-IDAG
#
/interface ethernet
set [ find default-name=ether1 ] name=ether1-master
set [ find default-name=ether3 ] master-port=ether1-master
set [ find default-name=ether4 ] master-port=ether1-master
set [ find default-name=ether5 ] master-port=ether1-master
set [ find default-name=ether6 ] master-port=ether1-master
set [ find default-name=ether7 ] master-port=ether1-master
set [ find default-name=ether8 ] master-port=ether1-master
set [ find default-name=ether9 ] master-port=ether1-master
set [ find default-name=ether10 ] master-port=ether1-master
set [ find default-name=ether11 ] master-port=ether1-master
set [ find default-name=ether12 ] master-port=ether1-master
set [ find default-name=ether13 ] master-port=ether1-master
set [ find default-name=ether14 ] master-port=ether1-master
set [ find default-name=ether15 ] master-port=ether1-master
set [ find default-name=ether16 ] master-port=ether1-master
set [ find default-name=ether17 ] master-port=ether1-master
set [ find default-name=ether18 ] master-port=ether1-master
set [ find default-name=ether19 ] master-port=ether1-master
set [ find default-name=ether20 ] master-port=ether1-master
set [ find default-name=ether21 ] master-port=ether1-master
set [ find default-name=ether22 ] master-port=ether1-master
set [ find default-name=ether23 ] master-port=ether1-master
set [ find default-name=sfp1 ] master-port=ether1-master
/interface vlan
add interface=ether2 name=ether2-vlan832 vlan-id=832
add interface=ether24 name=ether24-vlan832 vlan-id=832
/ip pool
add name=dhcp_pool1 ranges=192.168.1.30-192.168.1.250
add name=dhcp_pool2 ranges=192.168.99.2
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether1-master lease-time=3d \
    name=dhcp1
add address-pool=dhcp_pool2 disabled=no interface=ether24-vlan832 lease-time=\
    3d name=dhcp2
/interface ethernet switch port
set 0 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 1 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 2 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 3 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 4 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 5 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 6 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 7 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 8 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 9 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0:\
    8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 10 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 11 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 12 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 13 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 14 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 15 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 16 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 17 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 18 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 19 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 20 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 21 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 22 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 23 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 24 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
set 25 per-queue-scheduling="wrr-group0:1,wrr-group0:2,wrr-group0:4,wrr-group0\
    :8,wrr-group0:16,wrr-group0:32,wrr-group0:64,wrr-group0:128"
/ip address
add address=192.168.1.1/24 interface=ether1-master network=192.168.1.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether2-vlan832
/ip dhcp-server network
add address=192.168.1.0/24 dns-server=62.36.225.150,62.37.228.20 gateway=\
    192.168.1.1
add address=192.168.99.0/24 gateway=192.168.99.1
/ip firewall filter
add chain=input comment="defconf: accept ICMP" protocol=icmp
add chain=input comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=input comment=\
    "Drop de todo lo que viene desde nuestra WAN" in-interface=ether2-vlan832
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related
add chain=forward comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "Drop de todo lo que viene de la WAN que no esta DSTNATed" \
    connection-nat-state=!dstnat connection-state=new in-interface=\
    ether2-vlan832
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether2-vlan832
/system routerboard settings
set boot-device=flash-boot protected-routerboot=disabled

Referencia – Configuración Mikrotik final (Sistema alternativo 750)

# En este sistema antiguo los puertos tenían bridge
# por defecto con ether2-master y no con ether1-master
# se decidió pues usar el puerto 1 para conectar con la ONT.


# mar/31/2017 09:01:00 by RouterOS X.YY.Z
# software id = NQ5I-YFZV
#
/interface ethernet
set [ find default-name=ether2 ] name=ether2-master
set [ find default-name=ether3 ] master-port=ether2-master
set [ find default-name=ether4 ] master-port=ether2-master
/ip neighbor discovery
set ether1 discover=no
/interface vlan
add interface=ether1 name=eth1-vlan832 vlan-id=832
add interface=ether5 name=eth5-vlan832 vlan-id=832
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp_pool1 ranges=192.168.1.30-192.168.1.250
add name=dhcp_pool2 ranges=192.168.99.2
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether2-master lease-time=3d \
    name=dhcp1
add address-pool=dhcp_pool2 disabled=no interface=eth5-vlan832 lease-time=3d \
    name=dhcp2
/tool user-manager customer
set admin access=\
    own-routers,own-users,own-profiles,own-limits,config-payment-gw
/ip address
add address=192.168.1.1/24 interface=ether2-master network=192.168.1.0
add address=192.168.99.1/24 interface=eth5-vlan832 network=192.168.99.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=eth1-vlan832
/ip dhcp-server network
add address=192.168.1.0/24 dns-server=62.36.225.150,62.37.228.20 gateway=\
    192.168.1.1
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
add address=192.168.99.0/24 gateway=192.168.99.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=input comment=\
    "Drop de todo lo que viene desde nuestra WAN" in-interface=eth1-vlan832
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related" \
    connection-state=established,related
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "Drop de todo lo que viene de la WAN que no esta DSTNATed" \
    connection-nat-state=!dstnat connection-state=new in-interface=\
    eth1-vlan832
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    out-interface=ether1
add action=masquerade chain=srcnat out-interface=eth1-vlan832
/ip service
set telnet disabled=yes
set www disabled=yes
set api disabled=yes
set winbox disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/Madrid
/tool mac-server
set [ find default=yes ] disabled=yes
add interface=ether2-master
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2-master
/tool user-manager database
set db-path=user-manager

Enara II

mayo 15, 2017

Por verte Enara,
yo un bote remara,
hasta que los brazos,
se me cansaran.

Pues no hay mayor recompensa,
que de amor tu despensa,
mas tú la llenas,
cada vez que bisbiseas.

Enara I

abril 14, 2017

Enara, enara,
conmigo se enfada,
pero al final de todo,
conmigo habla,
no hay mujer más paciente,
ni más bella ni ardiente.