Arxiu d'etiquetes: router

Movistar Fibra – Mikrotik

Exemple de configuració per un router Mikrotik perquè funcioni amb la fibra de Movistar.

# jun/12/2016 14:08:34 by RouterOS 6.35.2
#
/interface ethernet
set [ find default-name=ether1 ] name=ether1-gateway
set [ find default-name=ether3 ] master-port=ether2
set [ find default-name=ether4 ] master-port=ether2
set [ find default-name=ether5 ] master-port=ether2
/interface vlan
add interface=ether1-gateway name=vlan2-tv vlan-id=2
add interface=ether1-gateway name=vlan3-voice vlan-id=3
add interface=ether1-gateway name=vlan6-data vlan-id=6
/interface pppoe-client
add add-default-route=yes allow=pap,chap disabled=no interface=vlan6-data \
    max-mru=1492 max-mtu=1492 name=pppoe-movistar password=adslppp \
    use-peer-dns=yes user=adslppp@telefonicanetpa
/ip dhcp-server
add disabled=no interface=ether2 name=dhcp-lan
/ip dhcp-server option
add code=240 name=option-240 value=\
    "':::::239.0.2.10:22222:v6.0:239.0.2.30:22222'"
add code=60 name=option-60 value="'[IAL]'"
/ip dhcp-server option sets
add name=MOVISTAR-IPTV-DECO options=option-240,option-60
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=aes-128-cbc
/interface pptp-server server
set authentication=mschap2 enabled=yes
/ip address
add address=192.168.1.1/24 comment="default configuration" interface=ether2 \
    network=192.168.1.0

/ip dhcp-client
add default-route-distance=0 dhcp-options=hostname,clientid disabled=no \
    interface=ether1-gateway
add add-default-route=no dhcp-options=hostname,clientid disabled=no \
    interface=vlan3-voice 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.1 \
    netmask=24
add address=192.168.1.199/32 dhcp-option-set=MOVISTAR-IPTV-DECO dns-server=\
    172.26.23.3 gateway=192.168.1.1 netmask=24
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.1.1 name=router
/ip firewall filter
add chain=input comment="default configuration" protocol=icmp
add action=drop chain=input comment="default configuration" in-interface=\
    pppoe-movistar
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=\
    vlan2-tv
add action=set-priority chain=postrouting new-priority=4 out-interface=\
    vlan3-voice
add action=set-priority chain=postrouting new-priority=1 out-interface=\
    pppoe-movistar
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=pppoe-movistar
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=ether1-gateway
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=vlan2-tv
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=vlan3-voice
/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-movistar type=external
/routing igmp-proxy interface
add alternative-subnets=0.0.0.0/0 interface=vlan2-tv upstream=yes
add interface=ether2
/routing rip interface
add interface=vlan3-voice passive=yes receive=v2
add interface=vlan2-tv passive=yes receive=v2
/routing rip network
add network=10.0.0.0/8
add network=172.26.0.0/16
/system clock
set time-zone-autodetect=no time-zone-name=Europe/Madrid
/system ntp client
set enabled=yes primary-ntp=130.206.3.166 secondary-ntp=131.188.3.220

Per què funcioni la TV s’ha de mirar la configuració del router original i mirar que IP tenim assiganada a l’interficie de la VLAN 2. Només caldrà configurar-la i funcionarà.

/ip address
add address=10.x.x.x/9 interface=vlan2-tv network=10.128.0.0

Habilitar Microsoft Windows 7 com a router

Perquè un Microsoft Windows 7 funcioni com un router cal habilitar una clau en el registre:

Executem: regedit

I busquem la cadena:

HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Canviem el DWORD IPEnableRouter de 0 a 1 i reiniciem l’ordinador.

http://technet.microsoft.com/en-us/library/cc962461.aspx

Es pot comprovar amb ipconfig /all si s’ha habilitat correctament,