Community discussions

MikroTik App
 
beginner01
just joined
Topic Author
Posts: 3
Joined: Wed Oct 03, 2018 10:40 am

Please Urgent : Need Help with Vlans and DHCP on RB with 6.43

Wed Oct 03, 2018 10:57 am

Hi all,
I'm almost beginner in Mikrotik (not in network world) and I try to make a conf on RB960PGS (and then when succed apply it to a RB2011uias, I hope it will be the same conf). I thought it would be simple to do but not so much...

I have to create on the LAN part two DHCP servers : one on an untagged vlan 1 (network 10.250.0.0/16 and created an IP address ) and the second on a tagged vlan 10 network 10.10.10.0/24) on ether2 to connnect to the switch and on ether3 to have access to vlan1 with a PC. Ether 1 is the Wan access in DHCP Client.

Ether2 is connected to a 24 Ports Switch with all ports conf : vlan 1 as PVID and Vlan 10 as tagged

Result : PC on Ether2 or Ether3 I don't get any DHCP, if I put my PC on an access Vlan10 port on switch no dhcp again...

I follow mainly this wiki : https://wiki.mikrotik.com/wiki/Manual:I ... d_Ports.29

Thank you very much in advance for help,

Here is the config I've made :
# oct/03/2018 09:39:21 by RouterOS 6.43.2
# software id = YJZ4-WZEC
#
# model = 960PGS
# serial number = 725306064F8A
/interface bridge
add admin-mac=6C:3B:6B:AD:3B:35 auto-mac=no comment=defconf name=bridge
add admin-mac=6C:3B:6B:AD:3B:35 auto-mac=no name=bridge1
/interface ethernet
set [ find default-name=ether1 ] speed=100Mbps
set [ find default-name=ether2 ] name=ether2-master speed=100Mbps
set [ find default-name=ether3 ] speed=100Mbps
set [ find default-name=ether4 ] speed=100Mbps
set [ find default-name=ether5 ] speed=100Mbps
set [ find default-name=sfp1 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
/interface vlan
add interface=bridge1 name=vlan1 vlan-id=1
add interface=bridge1 name=vlan10 vlan-id=10
/interface ethernet switch port
set 1 default-vlan-id=1 vlan-mode=secure
set 2 default-vlan-id=1 vlan-mode=secure
/interface list
add exclude=dynamic name=discover
add name=mactel
add name=mac-winbox
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip dhcp-client option
add code=12 name=hostname value="\$(HOSTNAME)"
/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=dhcp_pool1 ranges=10.250.10.1-10.250.10.250
add name=dhcp_pool2 ranges=10.10.10.10-10.10.10.250
add name=dhcp_pool3 ranges=10.250.0.6-10.250.0.200
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
add address-pool=dhcp_pool2 disabled=no interface=vlan10 name=dhcp2
add address-pool=dhcp_pool3 disabled=no interface=vlan1 name=dhcp1
/interface bridge port
add bridge=bridge1 comment=defconf interface=ether2-master
add bridge=bridge comment=defconf hw=no interface=sfp1
add bridge=bridge1 interface=ether3
add bridge=bridge interface=ether4
add bridge=bridge interface=ether5
/ip neighbor discovery-settings
set discover-interface-list=discover
/interface ethernet switch vlan
add independent-learning=yes ports=ether2-master,ether3 switch=switch1 vlan-id=1
add independent-learning=yes ports=ether2-master,ether3 switch=switch1 vlan-id=10
/interface list member
add interface=ether2-master list=discover
add interface=ether3 list=discover
add interface=ether4 list=discover
add interface=ether5 list=discover
add interface=sfp1 list=discover
add interface=bridge list=discover
add interface=bridge list=mactel
add interface=bridge list=mac-winbox
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
add address=10.10.10.1/24 interface=vlan10 network=10.10.10.0
add address=10.250.0.1/16 interface=vlan1 network=10.250.0.0
/ip dhcp-client
add comment=defconf dhcp-options=*FFFFFFF6,clientid disabled=no interface=ether1
/ip dhcp-server network
add address=10.10.10.0/24 gateway=10.10.10.1
add address=10.250.0.0/16 gateway=10.250.0.5
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 name=router
/ip firewall filter
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept established,related" connection-state=established,related
add action=drop chain=input comment="defconf: drop all from WAN" in-interface=ether1
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related" connection-state=established,related
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=ether1
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" out-interface=ether1
/system clock
set time-zone-name=Europe/Paris
/system routerboard settings
set silent-boot=no
/tool mac-server
set allowed-interface-list=mactel
/tool mac-server mac-winbox
set allowed-interface-list=mac-winbox
 
User avatar
victorsoares
Member Candidate
Member Candidate
Posts: 106
Joined: Thu Feb 15, 2018 6:29 pm
Location: Ubatuba, São Paulo - Brazil
Contact:

Re: Please Urgent : Need Help with Vlans and DHCP on RB with 6.43

Wed Oct 03, 2018 2:39 pm

I'm not seeing an "/ip dhcp-server configuration" in your export. Do you have one?
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3343
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Please Urgent : Need Help with Vlans and DHCP on RB with 6.43

Wed Oct 03, 2018 3:52 pm

DHCP servers are there.

He has three network
10.250.0.0
10.10.10.0
192.168.88.1

This could be setup using one bridge with three Vlan instead og two bridges.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3343
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Please Urgent : Need Help with Vlans and DHCP on RB with 6.43

Wed Oct 03, 2018 10:43 pm

I can see that you are using two vlan on Bridge1, but not turned on VLAN filtering, This will not work.

Here is a setup using Bridge only solution. (Using switch is better for performance, but I do not have the knowledge of doing that)
eth1 outside
eth2 vlan1 192.168.88.0
eth3 vlan10 10.10.10.0
eth4,5 vlan20  10.250.0.0
PS not tested
/interface bridge
add  name=Bridge1 protocol-mode=none vlan-filtering=yes

/interface ethernet
set [ find default-name=ether1 ] name=ether1
set [ find default-name=ether2 ] name=ether2
set [ find default-name=ether3 ] name=ether3
set [ find default-name=ether4 ] name=ether4
set [ find default-name=ether5 ] name=ether5

/interface vlan
add interface=Bridge1 name=VLAN10 vlan-id=10
add interface=Bridge1 name=VLAN20 vlan-id=20

/interface bridge port
add bridge=Bridge1 interface=ether2 
add bridge=Bridge1 interface=ether3 pvid=10
add bridge=Bridge1 interface=ether4 pvid=20
add bridge=Bridge1 interface=ether5 pvid=20

/interface bridge vlan
add bridge=Bridge1 tagged=Bridge1 untagged=ether3 vlan-ids=10
add bridge=Bridge1 tagged=Bridge1 untagged=ether4,ether5 vlan-ids=20

/ip address
add address=192.168.88.1/24 interface=Bridge1 network=192.168.88.0
add address=10.10.10.1/24 interface=VLAN10 network=10.10.10.0
add address=10.250.0.1/24 interface=VLAN20 network=10.250.0.0

/ip dhcp-client
add comment=defconf dhcp-options=*FFFFFFF6,clientid disabled=no interface=ether1

/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
add address=10.10.10.0/24 gateway=10.10.10.1
add address=10.250.0.0/16 gateway=10.250.0.5

/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp_pool1 ranges=10.250.10.1-10.250.10.250
add name=dhcp_pool2 ranges=10.10.10.10-10.10.10.250
add name=dhcp_pool3 ranges=10.250.0.6-10.250.0.200

/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=Bridge1 name=defconf
add address-pool=dhcp_pool2 disabled=no interface=VLAN10 name=dhcp2
add address-pool=dhcp_pool3 disabled=no interface=VLAN20 name=dhcp1

Who is online

Users browsing this forum: k6ccc, romrider, seriosha, sindy and 53 guests