Community discussions

MikroTik App
 
PrinceProspero
just joined
Topic Author
Posts: 1
Joined: Wed Oct 26, 2022 6:56 pm

Configure IP on a VLAN

Thu Oct 27, 2022 9:18 pm

I'm very new to the world of Mikrotiks. Using a CRS326. 7.1.3 (stable)

I would like to setup a few VLANs, the first being a management VLAN (vlan id5). Ive configured it on ports 19-24. No trunk ports, only access.
Im able to connect two devices on ex. port 19 and 20 and theyre able to communicate with each others.

Im now trying to set an IP for the switch itself on that vlan
add address=172.20.50.248/24 interface=vlan-5-mgmt network=172.20.50.0
This does however not work as expected. Im not able to ex. reach the web interface on the new IP (172.20.50.248) nor ping it from a machine on 172.20.50.130 connected on port 19. I can however see the device in my arp cache. If I run a ping from the switch to the client with tcpdump on the client, I will see the arp requests (who has). What have I missed?

Full config below. Note: Im using mlag on sfp+ ports to connect to another CRS326 for redudancy, hope this isnt the problem.
# apr/04/1970 00:08:03 by RouterOS 7.1.3
# software id = 8618-ATXZ
#
# model = CRS326-24G-2S+
# serial number = xxxxxxxxx
/interface bridge
add admin-mac=12:34:56:78:9A:BC auto-mac=no comment=defconf ingress-filtering=no name=bridge vlan-filtering=yes
/interface vlan
add interface=bridge name=vlan-5-mgmt vlan-id=5
/interface bonding
add mode=802.3ad name=mlag-peer-bond slaves=sfp-sfpplus1,sfp-sfpplus2 transmit-hash-policy=layer-3-and-4
/interface lte apn
set [ find default=yes ] ip-type=ipv4
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/port
set 0 name=serial0
/interface bridge mlag
set bridge=bridge peer-port=mlag-peer-bond
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether1
add bridge=bridge comment=defconf ingress-filtering=no interface=ether2
add bridge=bridge comment=defconf ingress-filtering=no interface=ether3
add bridge=bridge comment=defconf ingress-filtering=no interface=ether4
add bridge=bridge comment=defconf ingress-filtering=no interface=ether5
add bridge=bridge comment=defconf ingress-filtering=no interface=ether6
add bridge=bridge comment=defconf ingress-filtering=no interface=ether7
add bridge=bridge comment=defconf ingress-filtering=no interface=ether8
add bridge=bridge comment=defconf ingress-filtering=no interface=ether9
add bridge=bridge comment=defconf ingress-filtering=no interface=ether10
add bridge=bridge comment=defconf ingress-filtering=no interface=ether11
add bridge=bridge comment=defconf ingress-filtering=no interface=ether12
add bridge=bridge comment=defconf ingress-filtering=no interface=ether13
add bridge=bridge comment=defconf ingress-filtering=no interface=ether14
add bridge=bridge comment=defconf ingress-filtering=no interface=ether15
add bridge=bridge comment=defconf ingress-filtering=no interface=ether16
add bridge=bridge comment=defconf ingress-filtering=no interface=ether17
add bridge=bridge comment=defconf ingress-filtering=no interface=ether18
add bridge=bridge comment=defconf ingress-filtering=no interface=ether19 pvid=5
add bridge=bridge comment=defconf ingress-filtering=no interface=ether20 pvid=5
add bridge=bridge comment=defconf ingress-filtering=no interface=ether21 pvid=5
add bridge=bridge comment=defconf ingress-filtering=no interface=ether22 pvid=5
add bridge=bridge comment=defconf ingress-filtering=no interface=ether23 pvid=5
add bridge=bridge comment=defconf ingress-filtering=no interface=ether24 pvid=5
add bridge=bridge interface=mlag-peer-bond pvid=99
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes
/interface bridge vlan
add bridge=bridge tagged=mlag-peer-bond untagged=ether1,bridge vlan-ids=1
add bridge=bridge comment=Mgmt vlan-ids=5
/ip address
add address=192.168.88.2/24 comment=defconf interface=ether1 network=192.168.88.0
add address=172.20.50.248/24 interface=vlan-5-mgmt network=172.20.50.0
/system routerboard settings
set boot-os=router-os
 
User avatar
Buckeye
Forum Veteran
Forum Veteran
Posts: 887
Joined: Tue Sep 11, 2018 2:03 am
Location: Ohio, USA

Re: Configure IP on a VLAN

Fri Oct 28, 2022 12:02 am

/interface bridge vlan
add bridge=bridge tagged=mlag-peer-bond untagged=ether1,bridge vlan-ids=1
add bridge=bridge comment=Mgmt vlan-ids=5

I am not sure what that command as entered actually does, but you need to include the bridge as tagged. The access ports probably have things "added dynamically" for vlan 5 because you specified pvid=5 on the /interface bridge port command

Entering /interface bridge/vlan/print at the command line will give you more information.

Reference: Untagged access with VLAN filtering
 
User avatar
Buckeye
Forum Veteran
Forum Veteran
Posts: 887
Joined: Tue Sep 11, 2018 2:03 am
Location: Ohio, USA

Re: Configure IP on a VLAN

Fri Oct 28, 2022 12:07 am

And if you haven't found it, @anav has a good "starting" point with links to many useful resources in his New User Pathway To Config Success thread.

See section C for info about configuring the vlan-filtering bridge.

Who is online

Users browsing this forum: 0xAA55, adrianmartin16, donmunyak and 40 guests