❗️Toto je původní verze internetového fóra ISPforum.cz do února 2020 bez možnosti registrace nových uživatelů. Aktivní verzi fóra naleznete na adrese https://telekomunikace.cz

Mikrotik VLANy

Návody a problémy s konfigurací.
RDan
Příspěvky: 33
Registrován: 7 years ago

Mikrotik VLANy

Příspěvekod RDan » 6 years ago

Tak jsem dlouho nepsal ale mám tu další výzvu kterou nemůžu vygooglit.
Mám hlavní Router hAP ac². Na ETH1 je wan.
Router funguje tak jak má jen potřebuju aby ETH2 tagoval do vlan2 ale zároveň na něm běžel dhcp aby dostal ipadresu (potřebuju se tam dostat do nastavení modemu ale net z něj nepotřebuju).
No a tu vlan1 a vlan2 posílal do ETH4 (už vím že musím být Trunk).

No a za ETH4 bude druhej mikrotik kterej rozdělí vlan1 do ETH1+2 a vlan2 do ETH3+4 a hlavně do ETH5 zase obě vlany.

Pro ukázku stávající config, děkuji...

PS: Nastavuju ve winboxu.

Kód: Vybrat vše

# jun/12/2019 01:43:47 by RouterOS 6.44.3
# software id = LUHJ-J593
#
# model = RouterBOARD D52G-5HacD2HnD-TC
# serial number = 92F208CA06F6
/interface bridge
add admin-mac=CC:2D:E0:EB:8F:10 auto-mac=no comment=defconf name=bridge
add name=bridge-Pavsax
/interface wireless
set [ find default-name=wlan1 ] antenna-gain=3 band=2ghz-g/n channel-width=\
    20/40mhz-Ce country="czech republic" disabled=no distance=indoors \
    frequency=auto frequency-mode=regulatory-domain hide-ssid=yes mode=\
    ap-bridge radio-name="RDan 2,4ghz" ssid=RDan wireless-protocol=802.11 \
    wps-mode=disabled
set [ find default-name=wlan2 ] antenna-gain=3 band=5ghz-a/n/ac \
    channel-width=20/40mhz-Ce country="czech republic" disabled=no distance=\
    indoors frequency=auto frequency-mode=regulatory-domain hide-ssid=yes \
    mode=ap-bridge radio-name="RDan 5ghz" ssid=RDan wireless-protocol=802.11 \
    wps-mode=disabled
/interface vlan
add interface=ether1 name="vlan VDSL" vlan-id=848
add interface=ether1 name=vlan-modem vlan-id=1
/interface pppoe-client
add add-default-route=yes disabled=no interface="vlan VDSL" name=365internet \
    password=365internet use-peer-dns=yes user=365internet
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk eap-methods="" \
    mode=dynamic-keys supplicant-identity=MikroTik wpa-pre-shared-key=\
    ***** wpa2-pre-shared-key=****
add authentication-types=wpa-psk,wpa2-psk eap-methods="" mode=dynamic-keys \
    name=profile supplicant-identity=MikroTik wpa-pre-shared-key=*****\
    wpa2-pre-shared-key=*****
/interface wireless
add disabled=no mac-address=CE:2D:E0:EB:8F:15 master-interface=wlan2 name=\
    wlan3 security-profile=profile ssid=RDan-prizivnici wps-mode=disabled
add disabled=no mac-address=CE:2D:E0:EB:8F:14 master-interface=wlan1 name=\
    wlan4 security-profile=profile ssid=RDan-prizivnici wps-mode=disabled
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=dhcp ranges=10.111.111.10-10.111.111.250
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge lease-time=12h name=\
    defconf
/interface bridge filter
add action=drop chain=forward in-interface=wlan3
add action=drop chain=forward out-interface=wlan3
add action=drop chain=forward in-interface=wlan4
add action=drop chain=forward out-interface=wlan4
/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=wlan1
add bridge=bridge comment=defconf interface=wlan2
add bridge=bridge interface=wlan3
add bridge=bridge interface=wlan4
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge vlan-ids=1
add bridge=bridge-Pavsax tagged=bridge-Pavsax vlan-ids=2
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=365internet list=WAN
/ip address
add address=10.111.111.1/24 comment=defconf interface=ether2 network=\
    10.111.111.0
add address=192.168.1.2/24 interface=ether1 network=192.168.1.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=bridge-Pavsax
/ip dhcp-server lease
add address=10.111.111.30 client-id=1:50:e5:49:b2:31:2e \
    mac-address=50:E5:49:B2:31:2E server=defconf
add address=10.111.111.90 mac-address=B0:46:FC:9E:80:4B \
    server=defconf
add address=10.111.111.20 client-id=1:9c:5c:8e:90:69:4d \
    mac-address=9C:5C:8E:90:69:4D server=defconf
add address=10.111.111.40 client-id=1:c4:17:fe:9:9e:7e \
    mac-address=C4:17:FE:09:9E:7E server=defconf
add address=10.111.111.80 client-id=1:d4:38:9c:88:eb:a4 \
    mac-address=D4:38:9C:88:EB:A4 server=defconf
add address=10.111.111.251 client-id=1🇨🇨2d:e0:25:62:a9 \
    mac-address=CE:2D:E0:25:62:AA server=defconf
add address=10.111.111.70 client-id=1:b4:52:7d:57:f0:5c \
    mac-address=B4:52:7D:57:F0:5C server=defconf
add address=10.111.111.60 client-id=1:5c:9a:d8:62:2c:69 \
    mac-address=5C:9A:D8:62:2C:69 server=defconf
add address=10.111.111.100 mac-address=4C:12:65:BE:9C:21 \
    server=defconf
add address=10.111.111.3 client-id=1:74:4d:28:48:53:41 mac-address=\
    74:4D:28:48:53:41 server=defconf
/ip dhcp-server network
add address=10.111.111.0/24 comment=defconf gateway=10.111.111.1 ntp-server=\
    217.31.202.100
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=10.111.111.1 name=router.lan
/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=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
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-list=WAN
add action=dst-nat chain=dstnat comment=PF dst-port=49619 in-interface=\
    365internet protocol=tcp to-addresses=10.111.111.2 to-ports=49619
add action=dst-nat chain=dstnat comment=PF dst-port=49619 in-interface=\
    365internet protocol=udp to-addresses=10.111.111.2 to-ports=49619
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh disabled=yes
/ip ssh
set allow-none-crypto=yes forwarding-enabled=remote
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=365internet type=external
add type=external
/system clock
set time-zone-name=Europe/Prague
/system identity
set name=RDan-MikroTik
/system ntp client
set enabled=yes primary-ntp=217.31.202.100 secondary-ntp=195.113.144.201
/tool graphing interface
add
/tool graphing resource
add
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN




A ještě mě napadla taková čistě praktická blbost. Dle logu se vždy snaží připojit k pppoe dřív než se začne switch. Nejde to někde jednoduše poladit? Je to jen taková kravinka :)
0 x

RDan
Příspěvky: 33
Registrován: 7 years ago

Příspěvekod RDan » 6 years ago

Zjišťuju že je nějaké staré a nové nastavení vlanů. Taky se něco nastavuje přímo na switchi.
To teda vůbec netuším jestli i ty vdsl mám správě... :(
0 x

hafieror
Příspěvky: 616
Registrován: 18 years ago

Příspěvekod hafieror » 6 years ago

0 x

RDan
Příspěvky: 33
Registrován: 7 years ago

Příspěvekod RDan » 6 years ago

Tam ale neřešej co potřebuju.
Co jsem tak koukal různě tak už vůbec nevím jestli tu vdsl vlan mám správně. Teď jí mám softwarově a přitom bych mohl mít hardwarově zřejmě.

A vůbec nikdo nevysvětluje ten princip, já nemám od čeho se odpíchnout.
V položce switch se nastavují porty a také je tam záložka vlan a nemůžu zjistit co z toho potřebuju já.

A taky všichni jedou v příkazovce a já to dělám přes winbox.
0 x

ludvik
Příspěvky: 4448
Registrován: 14 years ago

Příspěvekod ludvik » 6 years ago

a) winbox je to samé, co příkazový řádek (ten má občas víc možností, ale v běžném použití na to asi nenarazíš). Jeho struktura menu vlastně odpovídá těm příkazům.

b) princip ti tady asi nikdo nevysvětlí. Na to bohužel musíš někam jinam a prostě to znát. Jak víš, jak to funguje, tak zvládneš leccos na libovolném zařízení.
b1) pokud si vymýšlíš VLAN-ID, zapomeň pro jistotu na číslo 1

c) pokud ta VLAN vystupuje jako rozhraní v routeru, tak je to vždy softwarové. Ty pakety vždy vylezou ven z čipu do CPU. Samozřejmě to lze zkombinovat.

d) z DSL ti leze VLAN? Možná to spíš nakresli ...
0 x
Jelikož je zde zakázáno se negativně vyjadřovat k provozním záležitostem, tak se holt musím vyjádřit takto: nové fórum tak jak je připravováno považuji za cestu do pekel. Nepřehledný maglajz z toho bude. Do podpisu se mi pozitiva již nevejdou.

RDan
Příspěvky: 33
Registrován: 7 years ago

Příspěvekod RDan » 6 years ago

diagram.jpg
diagram.jpg (124.18 KiB) Zobrazeno 5771 x


Zde jsem znázornil co potřebuji.
Ve fialové síti běží dhcp a potřeboval bych se tam občas dostat na nastavení routeru eventuálně NAS co tam poběží.
Ale směrovat internet tam netřeba.
Zelenou síť bych chtěl aby byla netagovaná abych tam mohl kdykoliv a kdekoliv cokoliv připojit bez nastavení.
No a do sklepa povede PWR line kde musí být i ta vlan2.
Ve sklepě bude router na zahradu který bude vysílat různé wifi.


No a chtěl bych aby se ty vlany směrovali na hw úrovni pokud to jde.
Hlavní hAP ac² se docela hřeje ale nutno dodat že mám 250mbit VDSL.

Předem děkuji za případné rady.

PS: Případné rady nebudou plácnutí do větru ale zapamatuju si to pro příště :)
0 x

Standula
Příspěvky: 158
Registrován: 16 years ago
Kontaktovat uživatele:

Příspěvekod Standula » 6 years ago

hafieror píše:Co třeba začít tady
viewtopic.php?f=5&t=28226&hilit=vlan


Ne... tady: https://wiki.mikrotik.com/wiki/Manual:S ... p_Examples

hlavne si to procti cele a koukni jake cipy jsou v deskach a co vubec umi.
0 x

RDan
Příspěvky: 33
Registrován: 7 years ago

Příspěvekod RDan » 6 years ago

Jo, tuto stránku jsem už párkrát viděl ale až teď jsem si všiml že bych mohl zřejmě celej router překonfigurovat jako Switch-router. Jdu to zkoumat :)
0 x

ludvik
Příspěvky: 4448
Registrován: 14 years ago

Příspěvekod ludvik » 6 years ago

Technicky máš dvě možnosti:
a) definovat to pomocí nového způsobu, tedy v bridge. https://wiki.mikrotik.com/wiki/Manual:Bridge_VLAN_Table
Jenže aby fungovalo PVID (tedy untagged port), musíš zapnout VLAN filtering a tím přijdeš o HW offload (nemáš-li CRS3xx routerboard).

Možná to jde i jinak: https://wiki.mikrotik.com/wiki/Manual:B ... witch_chip

b) pohrát si přímo s konfigurací switche. Zkusím příklad:

Kód: Vybrat vše

/interface ethernet switch port
set 2 default-vlan-id=66 vlan-header=add-if-missing vlan-mode=secure
set 5 vlan-mode=fallback
# čísluje se to od nuly, může se to ovšem lišit dle typu RB a zda je zapnuto "switch all ports". Ale podle tohodle to můžeš naklepat ručně winboxem.

Tohle udělá základ, na ether3 je VLAN 66 jako untagged a propouští jen VLANy definované dále.
To druhé je CPU port, ten propouští prostě vše.

Kód: Vybrat vše

/interface ethernet switch vlan
add independent-learning=no ports=ether3,switch1-cpu switch=switch1 vlan-id=66
add independent-learning=no ports=ether3,switch1-cpu switch=switch1 vlan-id=51

Tohle zajistí, že na portu ether3 budou funkční dvě vlany a obě skončí i v CPU (nemusí, pokud je potřebuješ jen mezi některými porty)

Kód: Vybrat vše

/interface vlan
add interface=ether3 name=vlan51 vlan-id=51
add interface=ether3 name=vlan66-02 vlan-id=66

Tohle už je normálně přidání VLANu mezi interfacy (ty, co mají jako port i switch-cpu). Lze je strčit do bridge, lze jim přímo přidělit IP. Prostě co chceš.

Příklad je z RB450Gx4, který má stejný switch čip jako ta tvoje HAPka. ROS 6.43.16

Mimochodem když už kreslíš nějaký diagram, tak by čáry co spolu souvisí měly mít stejnou barvu. Tys tam nakreslil 4, ale mluvíš jen o dvou.
0 x
Jelikož je zde zakázáno se negativně vyjadřovat k provozním záležitostem, tak se holt musím vyjádřit takto: nové fórum tak jak je připravováno považuji za cestu do pekel. Nepřehledný maglajz z toho bude. Do podpisu se mi pozitiva již nevejdou.

RDan
Příspěvky: 33
Registrován: 7 years ago

Příspěvekod RDan » 6 years ago

Omlouvám se, zkusím to ještě doupřesnit:
červená je wan přípoj z vdsl
zelený všechny jsou výstupy které jsou klasicky routovaný do wan
fialová je druhá síť s internetem, kterou potřebuju převést do vlan a poslat ji do pwr line (modrá) a zároveň bych se potřeboval do ní dostat do routru nebo nasu (nejsou moje ale občas je spravuju)

Ještě jsem si uvědomil že v diagramu jsem se dopustil nepřesnosti oproti původnímu text. V úvodním textu jsem psal o ETH2 jako wan2 ale musel jsem to změnit na ETH4 kvůli tomu že ETH2 je root port.
0 x

RDan
Příspěvky: 33
Registrován: 7 years ago

Příspěvekod RDan » 6 years ago

Tak jsem rozjel ten oficiální způsob.

Hlavní router:

Kód: Vybrat vše

# jun/14/2019 23:38:20 by RouterOS 6.44.3
# software id = LUHJ-J593
#
# model = RouterBOARD D52G-5HacD2HnD-TC
# serial number = 92F208CA06F6
/interface bridge
add admin-mac=CC:2D:E0:EB:8F:10 auto-mac=no comment=defconf name=bridge
add name=bridge-Pavsax vlan-filtering=yes
/interface wireless
set [ find default-name=wlan1 ] antenna-gain=3 band=2ghz-g/n channel-width=\
    20/40mhz-Ce country="czech republic" disabled=no distance=indoors \
    frequency=auto frequency-mode=regulatory-domain hide-ssid=yes mode=\
    ap-bridge radio-name="RDan 2,4ghz" ssid=RDan wireless-protocol=802.11 \
    wps-mode=disabled
set [ find default-name=wlan2 ] antenna-gain=3 band=5ghz-a/n/ac \
    channel-width=20/40mhz-Ce country="czech republic" disabled=no distance=\
    indoors frequency=auto frequency-mode=regulatory-domain hide-ssid=yes \
    mode=ap-bridge radio-name="RDan 5ghz" ssid=RDan wireless-protocol=802.11 \
    wps-mode=disabled
/interface vlan
add interface=ether1 name="vlan VDSL" vlan-id=848
add interface=bridge-Pavsax name=vlan-Pavsax use-service-tag=yes vlan-id=2
add interface=ether1 name=vlan-modem vlan-id=1
/interface pppoe-client
add add-default-route=yes disabled=no interface="vlan VDSL" name=365internet \
    password=365internet use-peer-dns=yes user=365internet
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk eap-methods="" \
    mode=dynamic-keys supplicant-identity=MikroTik wpa-pre-shared-key=\
    **** wpa2-pre-shared-key=****
add authentication-types=wpa-psk,wpa2-psk eap-methods="" mode=dynamic-keys \
    name=profile supplicant-identity=MikroTik wpa-pre-shared-key=**** \
    wpa2-pre-shared-key=****
/interface wireless
add disabled=no mac-address=CE:2D:E0:EB:8F:15 master-interface=wlan2 name=\
    wlan3 security-profile=profile ssid=RDan-prizivnici wps-mode=disabled
add disabled=no mac-address=CE:2D:E0:EB:8F:14 master-interface=wlan1 name=\
    wlan4 security-profile=profile ssid=RDan-prizivnici wps-mode=disabled
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=dhcp ranges=10.111.111.10-10.111.111.250
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge lease-time=12h name=\
    defconf
/interface bridge filter
add action=drop chain=forward in-interface=wlan3
add action=drop chain=forward out-interface=wlan3
add action=drop chain=forward in-interface=wlan4
add action=drop chain=forward out-interface=wlan4
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge-Pavsax comment=defconf interface=ether4
add bridge=bridge-Pavsax comment=defconf interface=ether5 pvid=2
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
add bridge=bridge interface=wlan3
add bridge=bridge interface=wlan4
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge-Pavsax tagged=ether5,ether4 untagged=bridge-Pavsax \
    vlan-ids=2
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=365internet list=WAN
/ip address
add address=10.111.111.1/24 comment=defconf interface=ether2 network=\
    10.111.111.0
add address=192.168.1.2/24 interface=ether1 network=192.168.1.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=bridge-Pavsax
/ip dhcp-server lease
/ip dhcp-server network
add address=10.111.111.0/24 comment=defconf gateway=10.111.111.1 ntp-server=\
    217.31.202.100
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=10.111.111.1 name=rdan-router.lan
/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=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
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-list=WAN
add action=dst-nat chain=dstnat comment=PF dst-port=49619 in-interface=\
    365internet protocol=tcp to-addresses=10.111.111.2 to-ports=49619
add action=dst-nat chain=dstnat comment=PF dst-port=49619 in-interface=\
    365internet protocol=udp to-addresses=10.111.111.2 to-ports=49619
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh disabled=yes
/ip ssh
set allow-none-crypto=yes forwarding-enabled=remote
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=365internet type=external
add type=external
/system clock
set time-zone-name=Europe/Prague
/system identity
set name="Hlavn\ED-MikroTik"
/system ntp client
set enabled=yes primary-ntp=217.31.202.100 secondary-ntp=195.113.144.201
/tool graphing interface
add
/tool graphing resource
add
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN


Druhý router:

Kód: Vybrat vše

# jan/02/1970 00:18:48 by RouterOS 6.44.3
# software id = ZL89-AQSH
#
# model = RB941-2nD
# serial number = A1C30A87A9F6
/interface bridge
add name=bridge vlan-filtering=yes
/interface wireless
set [ find default-name=wlan1 ] ssid=MikroTik
/interface vlan
add interface=ether1 name=vlan-Pavsax use-service-tag=yes vlan-id=2
add interface=pwr-line1 name=vlan-Pavsax-out use-service-tag=yes vlan-id=2
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/interface bridge port
add bridge=bridge interface=ether1
add bridge=bridge interface=ether2
add bridge=bridge interface=ether3
add bridge=bridge interface=ether4
add bridge=bridge interface=pwr-line1
/interface bridge vlan
add bridge=bridge tagged=vlan-Pavsax vlan-ids=2
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=bridge


Podle toho co jsem vyluštil tak jsem zprovoznil vlan tunel z hlavního routeru do druhého. Ale nějak to nemaká.
Jednak na hlavním routeru nedostává dhcp konfiguraci v "bridge-Pavsax".
A na druhém routeru taky nedostává dhcp konfiguraci, tam by to mělo být na netagované vlan.
Tagovaná vlan2 by se měla jen přesměrovat na pwr1.

Už se mi o tom i zdá :D
0 x

RDan
Příspěvky: 33
Registrován: 7 years ago

Příspěvekod RDan » 6 years ago

Jsem teď koukal na vytížení cpu. Já můžu v pohodě hnát provoz přes cpu, vůbec ho to nevytěžuje.
0 x

RDan
Příspěvky: 33
Registrován: 7 years ago

Příspěvekod RDan » 6 years ago

Tak jo, tato konfigurace na hlavním routeru by měla být zřejmě konečná.

Kód: Vybrat vše

# jun/15/2019 23:33:37 by RouterOS 6.44.3
# software id = LUHJ-J593
#
# model = RouterBOARD D52G-5HacD2HnD-TC
# serial number = 92F208CA06F6
/interface bridge
add admin-mac=CC:2D:E0:EB:8F:10 auto-mac=no comment=defconf name=bridge \
    vlan-filtering=yes
add disabled=yes name=bridge-Pavsax vlan-filtering=yes
/interface wireless
set [ find default-name=wlan1 ] antenna-gain=3 band=2ghz-g/n channel-width=\
    20/40mhz-Ce country="czech republic" disabled=no distance=indoors \
    frequency=auto frequency-mode=regulatory-domain hide-ssid=yes mode=\
    ap-bridge radio-name="RDan 2,4ghz" ssid=RDan wireless-protocol=802.11 \
    wps-mode=disabled
set [ find default-name=wlan2 ] antenna-gain=3 band=5ghz-a/n/ac \
    channel-width=20/40mhz-Ce country="czech republic" disabled=no distance=\
    indoors frequency=auto frequency-mode=regulatory-domain hide-ssid=yes \
    mode=ap-bridge radio-name="RDan 5ghz" ssid=RDan wireless-protocol=802.11 \
    wps-mode=disabled
/interface vlan
add interface=ether1 name="vlan VDSL" vlan-id=848
add interface=bridge name=vlan-Pavsax use-service-tag=yes vlan-id=2
add interface=ether1 name=vlan-modem vlan-id=1
/interface pppoe-client
add add-default-route=yes disabled=no interface="vlan VDSL" name=365internet \
    password=365internet use-peer-dns=yes user=365internet
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk eap-methods="" \
    mode=dynamic-keys supplicant-identity=MikroTik wpa-pre-shared-key=\
    **** wpa2-pre-shared-key=****
add authentication-types=wpa-psk,wpa2-psk eap-methods="" mode=dynamic-keys \
    name=profile supplicant-identity=MikroTik wpa-pre-shared-key=**** \
    wpa2-pre-shared-key=****
/interface wireless
add disabled=no mac-address=CE:2D:E0:EB:8F:15 master-interface=wlan2 name=\
    wlan3 security-profile=profile ssid=RDan-prizivnici wps-mode=disabled
add disabled=no mac-address=CE:2D:E0:EB:8F:14 master-interface=wlan1 name=\
    wlan4 security-profile=profile ssid=RDan-prizivnici wps-mode=disabled
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=dhcp ranges=10.111.111.10-10.111.111.250
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge lease-time=12h name=\
    defconf
/interface bridge filter
add action=drop chain=forward in-interface=wlan3
add action=drop chain=forward out-interface=wlan3
add action=drop chain=forward in-interface=wlan4
add action=drop chain=forward out-interface=wlan4
/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 ingress-filtering=yes interface=ether5 \
    pvid=2
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
add bridge=bridge interface=wlan3
add bridge=bridge interface=wlan4
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge tagged=ether5,ether4 untagged=bridge vlan-ids=2
add bridge=bridge tagged=ether5 untagged=bridge vlan-ids=1
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=365internet list=WAN
/ip address
add address=10.111.111.1/24 comment=defconf interface=ether2 network=\
    10.111.111.0
add address=192.168.1.2/24 interface=ether1 network=192.168.1.0
/ip dhcp-client
add add-default-route=special-classless dhcp-options=hostname,clientid \
    disabled=no interface=bridge
/ip dhcp-server lease
/ip dhcp-server network
add address=10.111.111.0/24 comment=defconf gateway=10.111.111.1 ntp-server=\
    217.31.202.100
/ip dns
set allow-remote-requests=yes
/ip dns static
/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=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
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-list=WAN
add action=dst-nat chain=dstnat comment=PF disabled=yes dst-port=49619 \
    in-interface=365internet protocol=tcp to-addresses=10.111.111.2 to-ports=\
    49619
add action=dst-nat chain=dstnat comment=PF disabled=yes dst-port=49619 \
    in-interface=365internet protocol=udp to-addresses=10.111.111.2 to-ports=\
    49619
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh disabled=yes
/ip ssh
set allow-none-crypto=yes forwarding-enabled=remote
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=365internet type=external
add type=external
/system clock
set time-zone-name=Europe/Prague
/system identity
set name="Hlavn\ED-MikroTik"
/system ntp client
set enabled=yes primary-ntp=217.31.202.100 secondary-ntp=195.113.144.201
/tool graphing interface
add
/tool graphing resource
add
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN


Jen mám jednu zásadní otázku.

--> Jak můžu udělat abych se z místní sítě 10.111.111.1 dostal do sítě na ETH5 např. do nastavení tamějšího routeru 192.168.0.1.
Děkuji...
0 x

ludvik
Příspěvky: 4448
Registrován: 14 years ago

Příspěvekod ludvik » 6 years ago

Pro přístup do sítě, kterou router nezná musí mít nějak zadanou routu (ip/route) aby cestu znal.
0 x
Jelikož je zde zakázáno se negativně vyjadřovat k provozním záležitostem, tak se holt musím vyjádřit takto: nové fórum tak jak je připravováno považuji za cestu do pekel. Nepřehledný maglajz z toho bude. Do podpisu se mi pozitiva již nevejdou.

RDan
Příspěvky: 33
Registrován: 7 years ago

Příspěvekod RDan » 6 years ago

https://ctrlv.cz/BF23

Vyfotil jsem screen kde je Adress list, dhcp client, Route list.

Dle mého bych měl dostat z 10.111.111.0 do 192.168.0.1.

Ještě mě napadá, na ETH5 mám zapnutý Ingress Filtering aby se mi netloukli dhcp servery.

Na ETH5 je ta druhá síť 192.168.0.0.
Naposledy upravil(a) RDan dne 17 Jun 2019 22:21, celkem upraveno 2 x.
0 x