Задать вопрос
@sanzhinvo

Как прокинуть VLAN на Mikrotik?

Добрый день, очень нужна помощь, прям горю. надеюсь только на вас.
есть mikrotik rb4011. хочу сделать его основным, так же есть 4 - mikrotik crs 125-24g-15-rm,
и один пое коммутатор. хочу создать 3 влана на, vlan2MainLan, Vlan3WifiStaff, Vlan4WifiGuest,
как я понимаю mikrotik crs, л3 уровня, и не могу понять на и с них пробрасывать вланы,
запутался в interface - vlan, bridge - vlan, switch - vlan. на данный момент создал вланы, прокинул их до первого коммутатора, но как с него на следующий не могу понять, понимаю принципы работы trunk/accept(работал с cisco), но не понимаю где менять режимы портов на микротике.
ниже приложу конфиг,главного роутера и первого коммутатора, на втором коммутатор не прокидывается.

Mikrotik RB4011

[sanzh@MikroTik] > /export
# 2024-03-23 15:13:18 by RouterOS 7.11.3
# software id = VPX7-V91F
#
# model = RB4011iGS+
# serial number = HFF098CD1P6
/interface bridge
add admin-mac=78:9A:18:D5:83:83 auto-mac=no comment=defconf name=bridge
add name=bridgeVlan2MainLan
add name=bridgeVlan3WifiStaff
add name=bridgeVlan4WifiGuest
/interface vlan
add interface=ether8 name=Vlan2MainLan vlan-id=2
add interface=ether8 name=Vlan3WifiStaff vlan-id=3
add interface=ether8 name=Vlan4WifiGuest vlan-id=4
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp_pool1 ranges=192.168.110.30-192.168.111.254
add name=dhcp_pool2 ranges=192.168.100.30-192.168.101.254
add name=dhcp_pool3 ranges=192.168.105.2-192.168.105.254
/ip dhcp-server
add address-pool=default-dhcp interface=bridge lease-time=10m name=defconf
add address-pool=dhcp_pool1 interface=bridgeVlan2MainLan lease-time=1w30m name=\
dhcp1
add address-pool=dhcp_pool2 interface=bridgeVlan3WifiStaff lease-time=1w30m \
name=dhcp2
add address-pool=dhcp_pool3 interface=bridgeVlan4WifiGuest name=dhcp3
/port
set 0 name=serial0
set 1 name=serial1
/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=bridge comment=defconf interface=ether9
add bridge=bridge comment=defconf interface=ether10
add bridge=bridge comment=defconf interface=sfp-sfpplus1
add bridge=bridgeVlan2MainLan interface=Vlan2MainLan
add bridge=bridgeVlan3WifiStaff interface=Vlan3WifiStaff
add bridge=bridgeVlan4WifiGuest interface=Vlan4WifiGuest
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add comment=defconf interface=bridgeVlan2MainLan list=LAN
add comment=defconf interface=bridgeVlan3WifiStaff list=LAN
add comment=defconf interface=bridgeVlan4WifiGuest list=LAN
add interface=Vlan2MainLan list=LAN
add interface=Vlan3WifiStaff list=LAN
add interface=Vlan4WifiGuest list=LAN
/ip address
add address=192.168.110.1/23 interface=bridgeVlan2MainLan network=192.168.110.0
add address=192.168.105.1/24 interface=bridgeVlan4WifiGuest network=\
192.168.105.0
add address=85.159.26.53/24 interface=ether1 network=85.159.26.0
add address=192.168.100.1/23 interface=bridgeVlan3WifiStaff network=\
192.168.100.0
add address=192.168.88.1/24 interface=bridge network=192.168.88.0
/ip dhcp-server lease

/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=\
192.168.88.1
add address=192.168.100.0/23 gateway=192.168.100.1
add address=192.168.105.0/24 gateway=192.168.105.1
add address=192.168.110.0/23 gateway=192.168.110.1
/ip dns
set allow-remote-requests=yes servers=195.189.68.1
/ip dns static
add address=192.168.88.1 comment=defconf 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=accept chain=forward 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-list=WAN
add action=dst-nat chain=dstnat dst-port=5060 in-interface=ether1 protocol=udp \
to-addresses=10.10.10.1 to-ports=5060
add action=masquerade chain=srcnat disabled=yes out-interface=ether1 \
src-address=192.168.88.0/24
add action=masquerade chain=srcnat out-interface-list=WAN src-address=\
10.10.10.0/24
add action=masquerade chain=srcnat out-interface-list=WAN src-address=\
192.168.110.0/23
/ip route
add disabled=no dst-address=0.0.0.0/0 gateway=85.159.26.1 routing-table=main \
suppress-hw-offload=no
/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
/system clock
set time-zone-name=Asia/Almaty
/system note
set show-at-login=no
/system routerboard settings
set enter-setup-on=delete-key
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
  • Вопрос задан
  • 484 просмотра
Подписаться 1 Средний 6 комментариев
Пригласить эксперта
Ответы на вопрос 1
@Billander
Ребята из микротик рекомендуют в ROS вешать vlan на bridge. Конечно Вы ждёте готового ответа, но я бы настойчиво рекомендовал изучить этот момент. Все гайды с объяснением есть на ютубе "Mikrotik Training"
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы