RouterOS (MikroTik) instellingen

Hey, ik heb een poging gedaan met jullie voorbeelden alles werkend te krijgen, alleen krijg ik maar geen IPv6 adressen. De prefix delegation krijg ik netjes, maar daarna houdt het op…

# 2023-11-08 16:39:44 by RouterOS 7.11.2
# software id = SBVU-7RZN
#
# model = RB5009UPr+S+
# serial number = HF509D2R3F9
/interface bridge
add admin-mac=78:9A:18:73:5B:96 auto-mac=no comment=defconf name=bridge
add name=internet
/interface ethernet
set [ find default-name=ether1 ] advertise=\
    1000M-half,1000M-full,2500M-full,5000M-full
set [ find default-name=sfp-sfpplus1 ] advertise=1000M-full mtu=1508 name=sfp \
    rx-flow-control=on tx-flow-control=on
/interface vlan
add disabled=yes interface=sfp name=sfp.4 vlan-id=4
add interface=sfp mtu=1508 name=sfp.6 vlan-id=6
/interface pppoe-client
add add-default-route=yes allow=pap dial-on-demand=yes disabled=no interface=\
    sfp.6 max-mtu=1508 name=freedom user=fake@freedom
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa2-psk mode=dynamic-keys name=xs4some.local \
    supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=172.16.18.0/24
/ip dhcp-server
add address-pool=dhcp always-broadcast=yes interface=bridge lease-time=\
    23h59m59s name=defconf
/ipv6 dhcp-server option
add code=1 name=option1
/ipv6 pool
add name=freedom prefix=2a10:dead:beef::/48 prefix-length=48
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=ether6
add bridge=bridge comment=defconf interface=ether7
add bridge=bridge comment=defconf interface=ether8
add bridge=internet comment=defconf disabled=yes interface=sfp
add bridge=bridge interface=ether1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set accept-source-route=yes
/ipv6 settings
set accept-router-advertisements=yes forward=no
/interface detect-internet
set detect-interface-list=all
/interface list member
add comment=defconf interface=bridge list=LAN
add interface=internet list=LAN
add interface=freedom list=WAN
/ip address
add address=172.16.18.254/24 interface=bridge network=172.16.18.0
/ip dhcp-client
add dhcp-options=hostname,clientid_duid,clientid interface=sfp.6 \
    use-peer-dns=no
/ip dhcp-server matcher
add address-pool=dhcp code=43 name=unifi value=01:04:ac:10:12:18
/ip dhcp-server network
add address=172.16.18.0/24 comment=defconf dns-server=172.16.18.254 gateway=\
    172.16.18.254
/ip dns
set allow-remote-requests=yes servers=\
    45.90.28.200,45.90.30.200,2a07:a8c0::33:a3c6,2a07:a8c1::33:a3c6
/ip dns static
add address=172.16.17.254 comment=defconf name=router.lan
add address=172.16.18.24 name=unifi
/ip firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
    ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
    ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related hw-offload=yes
add action=accept chain=forward comment=\
    "defconf: accept established,related, untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    ipsec-policy=out,none out-interface=freedom
add action=dst-nat chain=dstnat comment=https dst-address=45.142.146.203 \
    dst-port=443 protocol=tcp to-addresses=172.16.18.24 to-ports=443
add action=dst-nat chain=dstnat comment=http dst-address=45.142.146.203 \
    dst-port=80 protocol=tcp to-addresses=172.16.18.24 to-ports=80
add action=dst-nat chain=dstnat comment="unifi inform" dst-address=\
    45.142.146.203 dst-port=8080 protocol=tcp to-addresses=172.16.18.24
add action=dst-nat chain=dstnat dst-address=172.16.18.254 dst-port=8080 \
    protocol=tcp to-addresses=172.16.18.24
/ip hotspot service-port
set ftp disabled=yes
/ip service
set www port=9080
set www-ssl disabled=no port=9443
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=freedom type=external
add interface=bridge type=internal
/ipv6 address
add address=::beef from-pool=freedom interface=ether1
/ipv6 dhcp-client
add add-default-route=yes interface=freedom pool-name=assigned-pool \
    pool-prefix-length=48 request=prefix
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
    icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
    33434-33534 protocol=udp
add action=accept chain=input comment=\
    "defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
    udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
    protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
    ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
    ipsec-esp
add action=accept chain=input comment=\
    "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
    "defconf: drop everything else not coming from LAN" in-interface-list=\
    !LAN
add action=accept chain=forward comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
    "defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
    hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
    icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
    500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
    ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
    ipsec-esp
add action=accept chain=forward comment=\
    "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
    "defconf: drop everything else not coming from LAN" in-interface-list=\
    !LAN
/ipv6 nd
set [ find default=yes ] disabled=yes dns=\
    2a07:a8c0::33:a3c6,2a07:a8c1::33:a3c6 hop-limit=64 interface=bridge \
    managed-address-configuration=yes ra-delay=6s ra-preference=high
/system clock
set time-zone-name=Europe/Amsterdam
/system note
set show-at-login=no
/system ntp client
set enabled=yes
/system ntp server
set broadcast=yes broadcast-addresses=172.16.18.254 enabled=yes multicast=yes
/system ntp client servers
add address=0.nl.pool.ntp.org
add address=1.nl.pool.ntp.org
add address=2.nl.pool.ntp.org
add address=3.nl.pool.ntp.org
/system routerboard settings
set auto-upgrade=yes
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

Hopelijk kunnen jullie me verder helpen, bedankt alvast!

Ik kan niet zien wat er nu precies niet goed gaat bij jou. Zelf gebruik ik nog de 6 versie van RouterOS, misschien dat het daar aan ligt. Ik ga versie 7 eens proberen en ik laat wel weten of ik verschillen zie die het probleem kunnen verklaren.

Wellicht helpt dit je verder.

Ik heb de IPv6 adressen hardcoded op de intefaces aan de binnenkant:

/ipv6 address
add address=2001:db8:0123:1::254 interface=bridge-LAN
add address=2001:db8:0123:10::254 interface=bridge-IPTV

/ipv6 settings
(niets)

/ipv6 dhcp-client
add interface=PPPoE pool-name=global_pool request=prefix use-peer-dns=no
add disabled=yes interface=vlan1.4 pool-name=vlan4_pool request=address use-peer-dns=no

/ipv6 dhcp-server
(niets)

/ipv6 nd
set [ find default=yes ] advertise-dns=no disabled=yes
add advertise-mac-address=no disabled=yes hop-limit=64 interface=bridge-DMZ

/ipv6 pool
(niets)

(Dit is nog steeds voor RouterOS 6.x)

Joining this party late,

Ik heb een 4011 met RouterOS 7.12 en een iets andere setup, want mijn Amino 710 staat op zolder terwijl de Mikrotik in de meterkast staat. Zolder is VLAN 60 bij mij. VLAN 60 zit in de standaard bridge (eth2 t/m eth9 met VLAN 60 in de trunk op eth2), de Freedom aansluiting in eth10. Op de bridge heb ik IGMP Snooping aan staan. De IGMP proxy uplink is VLAN 4 en de downlink is VLAN 60. Ik heb de NAT regels er niet in staan en gebruik (dus) de RTSP helper. Ik heb in de IGMP proxy “Quick Leave” uit moeten zetten. Ik weet het niet zeker maar heb het idee dat daardoor het beeld+geluid na een minuut of 5 bevroor en niet verder te krijgen was.

Ik heb nog geprobeerd om (zoals hierboven) een aparte bridge IPTV te maken en daar VLAN 60 aan te knopen maar dat kreeg ik niet werkend. Ik denk omdat VLAN 60 getrunkt is over eth2 en in die trunk zitten vele andere VLANs. De eerlijkheid is ook dat ik niet goed het verschil begrijp tussen “een interface een VLAN id in een bridge geven” via of /interface of /bridge.

Iemand daar ervaring mee, dat het beeld+geluid spontaan na 5 minuten stopt?

Laat maar! Die 5 minuten heeft niets met mijn setup te maken … CD valt weg met melding 5815 - 138 van uberguru

Fijn dat het werkt.
En RouterOS 7 heeft een RTSP helper? Dan moet ik snel eens updaten…

Yes, RTSP helper is aanwezig. Mocht je een upgrade overwegen: RouterOS 7.12 is (in mijn woorden) de laatste stabiele versie voorafgaand aan de grote split; vanaf RouterOS 7.13 hebben ze delen van wireless van RouterOS in packages gestopt om ruimte te maken voor nieuwe dingen:

Notice - Starting from RouterOS version 7.13, significant changes have been made to the RouterOS wireless packages. This is done due to a new product developemnt which will require more disk space for hardware drivers so we had to split it in order to maintain old products alongside the new ones. More wireless packages are yet to come.

  1. When upgrading by using “check-for-updates”, all versions earlier than 7.12 will display 7.12 as the latest available version. Upgrade from v7.12 to v7.13 or later versions must be done through 7.12 in order to convert wireless packages automatically. Fresh installation with Netinstall or manual package installation works in the same manner as always.
  2. Drivers for older wireless and 60GHz interfaces, as well as the wireless management system CAPsMAN, are now part of a separate “wireless” package instead of being a part of the bundle package. This package can be uninstalled if not needed.
  3. The existing “wifiwave2” package has been divided into distinct packages: “wifi-qcom” and “wifi-qcom-ac”, and the necessary utilities for WiFi management are now included in the RouterOS bundle. RouterOS and “wifi-qcom-ac” packages alongside each other now fit into 16MB flash memory.

@uberguru , het werkt als een zonnetje. Nou ja, voor zo ver mogelijk bij CD. Ik hoopte dat de problemen bij terugkijken zouden verminderen maar dat is hiermee niet opgelost.

Ik heb vrijwel alle statische NATting voor TV kunnen verwijderen; een stuk overzichtelijker. Wel lastig dat het pakket voor PPPoE eerst gedeinstalleerd moest worden; moest dus met een andere router een verbinding maken.

Edit:
Achteraf had alleen het pakket voor multicasting gedeïnstalleerd te hoeven worden; ik had natuurlijk weer eens niet goed gelezen.

Ik overweeg om de subnet-optie aan te vragen; hoe zou dat moeten gaan werken op een Mikrotik?

https://helpdesk.freedom.nl/category-detail/hoe-vraag-ik-een-subnet-aan

Niet wetende of het subnet net zo werkt als bij ExtraIP maar hier beschrijven zij het voor een Mikrotik: https://extraip.nl/configuraties/mikrotik

Volgens mij (maar dat moet je even nakijken/navragen) krijg je gewoon het subnet op de PPPoE virtuele interface. Ik weet alleen niet of je het subnet naast jouw huidige IP adres krijgt of in plaats er van. Als je het er naast krijgt dan moet je misschien een tweede PPPoE verbinding toevoegen. Het kan ook zijn dat het subnet over jouw bestaande IP adres gerouteerd wordt. In dat geval zul je een subnet moeten instellen op een van de interfaces en een routetabel aanmaken. De documentatie is vrij summier dus het zal wat experimenteren worden.

Ja tnx, die had ik ook al gevonden. Ik heb een e-mail gestuurd naar de Helpdesk of de Freedom implementatie hetzelfde is, maar na 1 week nog geen reactie…

Tnx! Ik ga het er gewoon op gokken denk ik. Worst case werkt het niet. :wink:

Hoi, ik ben de afgelopen dagen ook bezig geweest met IPv6 op mijn RB4011 en het werkt nu allemaal prima. Werkt het bij jou ook ondertussen?

Ja, het was even kloten. Wat ik raar vind, is dat je op je PPPoE interface een link-local adres krijgt.
Zodra ik een IPv6 adres uit de pool op de LAN bridge zette, en hierbij RA aanzette leek het te werken.

Die link-local wordt gebruikt om de pool mee beschikbaar te stellen! UDP, van hun poort 547 naar jouw poort 546. Zie bijvoorbeeld DHCPv6 - Wikipedia waar dat wordt beschreven. Ik request de pool ook dagelijks (timeout is 24 uur) maar betrek geen adressen uit die pool, ik heb alles fixed ingesteld. Dus waarschijnlijk /heb ik/is/ die pool request helemaal niet nodig …

Ik heb uiteraard een mikrotik.
Helaas krijg ik de initele connectie nog niet eens aan de gang. De log geeft aan dat die terminated word.
Waarschijnlijk mis ik een simpel stukje config. Stukje DHCP en firewall komt daana wel. Ik verwacht namelijk wel iets van netwerk activiteit wat nu letterlijk 0 is.

Klopt het ook dat wanneer je eigen apparatuur hebt dat je nog een serie nummer moet doorgeven of het serienummer van de fritzbox toevoegd aan de mikrotik config?

/interface ethernet
set [ find default-name=sfp1 ] auto-negotiation=no comment=WAN loop-protect=off mtu=1508 rx-flow-control=auto speed=1G-baseX
tx-flow-control=auto

/interface vlan
add comment=Guest interface=Lan3 name=“Vlan 100” vlan-id=100
add comment=Native interface=Lan3 name=Vlan5 vlan-id=5
add comment=Management interface=Lan3 name=Vlan10 vlan-id=10
add comment=Server interface=Lan3 name=Vlan15 vlan-id=15
add interface=sfp1 loop-protect=off mtu=1508 name=vlan6 vlan-id=6

/ppp profile
add change-tcp-mss=no name=“PPPOE Freedom” only-one=yes use-compression=yes use-upnp=no

/interface pppoe-client
add ac-name=xxxx allow=pap comment=“WAN PPPoE” interface=vlan6 name=PPPoE_out profile=“PPPOE Freedom” service-name=
“Freedom Internet” use-peer-dns=yes user=fake@freedom.nl

/interface bridge port
add bridge=bridge comment=defconf interface=ether2 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf interface=ether4 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf interface=ether5 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf interface=ether6 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf interface=ether7 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf interface=ether8 internal-path-cost=10 path-cost=10
add bridge=Lan3 comment=LAN interface=ether3 internal-path-cost=10 path-cost=10 pvid=2
add bridge=bridge interface=ether1 internal-path-cost=10 path-cost=10

Flags: X - disabled, R - running
0 R name=“Lan3” mtu=auto actual-mtu=1500 l2mtu=1596 arp=enabled arp-timeout=auto mac-address=78:9A:18:C1:70:63 protocol-mode=rstp
fast-forward=yes igmp-snooping=no auto-mac=yes ageing-time=5m priority=0x8000 max-message-age=20s forward-delay=15s
transmit-hold-count=6 vlan-filtering=no dhcp-snooping=no port-cost-mode=short

1 R ;;; defconf
name=“bridge” mtu=auto actual-mtu=1500 l2mtu=1596 arp=enabled arp-timeout=auto mac-address=78:9A:18:C1:70:62 protocol-mode=rstp
fast-forward=yes igmp-snooping=no auto-mac=no admin-mac=78:9A:18:C1:70:62 ageing-time=5m priority=0x8000 max-message-age=20s
forward-delay=15s transmit-hold-count=6 vlan-filtering=no dhcp-snooping=no port-cost-mode=short

/interface list member
add comment=defconf interface=bridge list=LAN
add interface=sfp1 list=WAN

Heb je nog een ONT (met dus utp tussen router en ont), of zit er zoals ik het vermoeden krijg een sft(+) module in je router? In dat laatste geval, is dat er eentje die zou moeten werken met jouw netwerk/belichter? Zover ik begrepen heb op dat punt namelijk wel uit of je bijvoorbeeld met kpn, delta, etc., etc. te maken hebt, engineers van delta hebben namelijk in het verleden al eens aangegeven in haar infra op basis van dat id nog wat “intelligentie” te doen, iets wat bijvoorbeeld kpn niet doet/wil doen en daardoor minden eigen apparatuur varianten accepteert/werken. De config van de mikrotik heb k gene verstand van, behalve dat ik volgens mij zie dat jet het avm gponid spoofed (id zou ik even onherkenbaar maken in je bericht) en dat gaat niet altijd werken op alle netwerken/belichters combinaties naar ik heb begrepen.

Ook bij een default config zou je verkeer moeten zien op de ethernet interface (WAN-zijde); in jouw geval fysieke interface sfp1 en virtuele interface vlan6. Als je in het log “terminated by remote” of iets dergelijks ziet dan gaat er verkeer overheen (anders zou je een “timeout” of “unresponsive” melding in het log zien). Kijk, om te beginnen, even of er inderdaad geen verkeer over jouw sfp1 interface loopt.

Het doorgeven van een serienummer is alleen nodig bij PON aansluitingen. het gaat daarbij niet om het serienummer van de router, maar om die van de PON terminal (ONT) bij jou in huis (dat kan een losse mediaconverter zijn maar ook een stukje in de router ingebouwde hardware of een PON SFP module) ik heb daar geen ervaring mee. Als je een aparte ONT hebt, dan is hoef je alleen het serienummer daarvan door te geven (als dat niet al gebeurd is). Maar nogmaals, dit is enkel van toepassing op PON aansluitingen.

Ik heb van te voren een fritzbox van freedom gekocht waar de SFP in zat.
Dit is werkend afgeleverd.
SFP heb ik uit fritzbox gehaald en in de mikrotik gestopt.

Bedankt voor je inzicht.