Community discussions

MikroTik App
 
millido
just joined
Topic Author
Posts: 5
Joined: Tue May 11, 2021 11:51 am

vlan'ing home lab network

Wed May 12, 2021 1:26 pm

I have recently gotten a hEX S (RB760iGS) that I want to use to segment my network into vlans. I have not finished all the vlans and stuff in the router config, but I cannot get this configuration to work either...
My problem right now is that I cannot get the DHCP on access ports to work (I don't have the switch and server here now, as I am studying elsewhere). But I have tried testing it in eve-ng with CHR, and it seems to work there with the same config. So I don't really understand what I am doing wrong here. I am guessing that my config will do a better job at explaining than me ':-P

If anyone does have any tips or ideas on how to make this work, it would be very much appreciated!
Thanks in advance!

This is how I have planned the network (probably not optimal, so suggestions are welcome :)), all vm's either have its own dedicated NIC, or have vlan aware virtual nics.
Image

The current config on the router:
# jan/02/1970 03:52:42 by RouterOS 6.47.7
# software id = 6JIK-BB6Q
#
# model = RB760iGS
# serial number = D4500D910DB4
/interface bridge
add admin-mac=08:55:31:85:A2:2E auto-mac=no comment=defconf name=bridge
add fast-forward=no name=vlan-bridge pvid=30 vlan-filtering=yes
/interface vlan
add comment=Management interface=vlan-bridge name=VLAN10 vlan-id=10
add comment=Management/BMC interface=vlan-bridge name=VLAN11 vlan-id=11
add comment="Remote Access" interface=vlan-bridge name=VLAN20 vlan-id=20
add comment=Devices interface=vlan-bridge name=VLAN30 vlan-id=30
add comment=Storage interface=vlan-bridge name=VLAN100 vlan-id=100
add comment=Auth interface=vlan-bridge name=VLAN110 vlan-id=110
add comment=DMZ interface=vlan-bridge name=VLAN120 vlan-id=120
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=VLAN30-POOL ranges=10.11.30.50-10.11.30.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
add address-pool=VLAN30-POOL disabled=no interface=VLAN30 name=VLAN30-DHCP
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=vlan-bridge comment=defconf interface=ether4 pvid=30 tag-stacking=yes
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=sfp1
add bridge=vlan-bridge comment=defconf hw=no interface=ether3 pvid=30 tag-stacking=yes
/interface bridge settings
set allow-fast-path=no
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=vlan-bridge tagged=vlan-bridge untagged=ether3,ether4 vlan-ids=30
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=vlan-bridge list=LAN
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
add address=10.11.30.1/24 interface=VLAN30 network=10.11.30.0
add address=10.11.10.1/24 interface=VLAN10 network=10.11.10.0
add address=10.11.11.1/24 interface=VLAN11 network=10.11.11.0
add address=10.11.20.1/24 interface=VLAN20 network=10.11.20.0
add address=10.11.100.1/24 interface=VLAN100 network=10.11.100.0
add address=10.11.110.1/24 interface=VLAN110 network=10.11.110.0
add address=10.11.120.1/24 interface=VLAN120 network=10.11.120.0
/ip dhcp-client
add comment=defconf disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/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 disabled=yes
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" disabled=yes \
    dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" disabled=yes 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 disabled=yes
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new disabled=yes in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
(Just tell me if I have explained something poorly ':-P )
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11381
Joined: Thu Mar 03, 2016 10:23 pm

Re: vlan'ing home lab network

Thu May 13, 2021 8:44 am

Don't set PVID on bridge:
/interface bridge
add fast-forward=no name=vlan-bridge pvid=30 vlan-filtering=yes

You're using said bridge as tagged further down the config and PVID seting messes that.

BTW, you don't use vlan-bridge as interface (other than underlying interface for VLAN interfaces) and hence doesn't belong in any of interface lists. You should put VLAN interfaces (e.g. VLAN30) in appropriate interface lists.

/interface list member
add interface=vlan-bridge list=LAN
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: vlan'ing home lab network

Thu May 13, 2021 7:46 pm

Please read this reference as a guide
viewtopic.php?f=23&t=143620
 
millido
just joined
Topic Author
Posts: 5
Joined: Tue May 11, 2021 11:51 am

Re: vlan'ing home lab network  [SOLVED]

Thu May 13, 2021 9:08 pm

Thanks for the replies!

Don't set PVID on bridge:
/interface bridge
add fast-forward=no name=vlan-bridge pvid=30 vlan-filtering=yes

You're using said bridge as tagged further down the config and PVID seting messes that.

BTW, you don't use vlan-bridge as interface (other than underlying interface for VLAN interfaces) and hence doesn't belong in any of interface lists. You should put VLAN interfaces (e.g. VLAN30) in appropriate interface lists.

/interface list member
add interface=vlan-bridge list=LAN
I did this but it didn't seem to change anything.
However when I did reset the board, clear default configuration, and setup everything myself. It started working exactly as I wanted :D So I guess I misunderstood some of the default config...
But for later reference, I ended up with the same config above. Apart from using only one bridge (from that config, just deleting bridge).

Please read this reference as a guide
viewtopic.php?f=23&t=143620
That is a really good reference! I read it multiple times to end up with the config I had in my original post :P
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: vlan'ing home lab network

Fri May 14, 2021 3:22 pm

Thanks for the replies!
That is a really good reference! I read it multiple times to end up with the config I had in my original post :P
If you had then you wouldn't have made the mistakes pointed out... ;-P ;-)
Glad its up and running for you! Amazing little router!!

Who is online

Users browsing this forum: jookraw, Wave and 38 guests