Skip to main content

Mikrotik FTTH Movistar

Nombres habituales: Movistar, Telefonica, O2

Los datos de configuración del FTTH de Movistar son:

Datos: ID 6 Prioridad 1
Voz: ID 3 Prioridad 4
Televisión: ID 2 Prioridad 4

Como curiosidad, nos envían rutas para alcanzar los servidor de voz y de TV, así que para usarlos hay que activar rip para aprender esas rutas, el dia que tome las capturas dejaba la tabla de rutas asi:

Captura de pantalla 2024-03-20 190842.png

Captura de pantalla 2024-03-20 190913.png

así que vamos a intentar reproducir lo mismo en el mikrotik, lo mas parecido posible. Aunque la parte de TV no funciona por la ONT, el fabricante ya nos advierte de ese hecho, pero lo configuraremos como si funcionase.

 

 

 

Plantilla base

Inicio con una configuración básica luego la evolucionamos

/interface ethernet
set 0 comment="hacia la ONT" name=ether1-gatewayether8
set 1 name=ether2
/interface vlan
add commnet="TV " interface=ether1-gatewayether8 name=ether8.vlan3 vlan-id=2
add commnet="SIP" interface=ether8 name=ether8.vlan3 vlan-id=3
add commnet="pppoE Internet" interface=ether1-gatewayether8 name=ether8.vlan6 vlan-id=6
/interface pppoe-client
add add-default-route=yes allow=pap,chap disabled=no interface=vlan6 \
    max-mru=1492 max-mtu=1492 name=pppoe-out1 password=adslppp \
	use-peer-dns=yes user=adslppp@telefonicanetpa
/ip address
add comment="para gestionar la ont" address=192.168.1.2/24 interface=ether1-gatewayether8
/ip dhcp-client
add add-default-route=no disabled=no interface=vlan3 use-peer-ntp=no
/ip dhcp-server network
add address=192.168.1.0/24 dns-server=192.168.1.1 gateway=192.168.1.2  netmask=24
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.1.1 name=ont
/ip firewall filter
add chain=input comment="default configuration" protocol=icmp
add chain=input comment="default configuration" connection-state=established
add chain=input comment="default configuration" connection-state=related
add chain=input disabled=yes dst-port=23,80 in-interface=pppoe-out1 protocol=tcp
add chain=input dst-port=8291 in-interface=pppoe-out1 protocol=tcp
add chain=input dst-port=1723 in-interface=pppoe-out1 protocol=tcp
add action=drop chain=input comment="default configuration" in-interface= pppoe-out1
add chain=forward comment="default configuration" connection-state=established
add chain=forward comment="default configuration" connection-state=related
add action=drop chain=forward comment="default configuration" connection-state=invalid
/ip firewall mangle
add action=set-priority chain=postrouting new-priority=4 out-interface=vlan3ether8vlan2
add action=set-priority chain=postrouting new-priority=4 out-interface=ether8vlan3
add action=set-priority chain=postrouting new-priority=1 out-interface=pppoe-out1
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=pppoe-out1
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=ether1-gatewayether8
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=vlan3
add action=dst-nat chain=dstnat disabled=yes dst-port=80 in-interface=\
    pppoe-out1 protocol=tcp to-addresses=192.168.1.125
add action=dst-nat chain=dstnat disabled=yes dst-port=21 in-interface=\
    pppoe-out1 protocol=tcp to-addresses=192.168.1.125ether8vlan3
/ip route
add distance=255 gateway=255.255.255.255
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=ether2 type=internal
add interface=pppoe-out1 type=external

/routing# rip2024-03-21 interface16:30:44 addby interface=vlan3RouterOS passive=yes7.14.1
receive=v2# model = RB5009UG+S+
/routing rip networkinstance
add network=afi=ipv4 disabled=no in-filter-chain=rip-telefonica name=rip-telefonica originate-default=never redistribute="" routing-table=main vrf=main
/routing filter rule
add chain=rip-telefonica disabled=no rule="if (dst in 10.0.0.0/824) {accept} else {reject}"
/routing rip interface-template
add disabled=no instance=rip-telefonica interfaces=ether8vlan3,ether8vlan2

/system clock
set time-zone-name=Europe/Madrid
/system ntp client
set enabled=yes primary-ntp=163.117.202.33 secondary-ntp=\
    89.248.104.162