Hello everyone,
I am new to MikroTik, and have basic networks know-how
I have tried to reproduce the example from the manual
but instead of one router as DHCP-Relay and another as DHCP-Server, the two networks conected to the DHCP-Relay are two VLANs in the same DHCP-Server.
Here is my configuration
Interfaces:
[admin@VdP4071] /ip dhcp-relay> /interface print
Flags: D - dynamic, X - disabled, R - running, S - slave
NAME TYPE ACTUAL-MTU L2MTU MAX-L2MTU
0 R ether1 ether 1500 1600 4076
1 R ether2 ether 1500 1598 2028
2 ether3 ether 1500 1598 2028
3 ether4 ether 1500 1598 2028
4 R ether5-Management ether 1500 1598 2028
5 X wlan1 wlan 1500 1600 2290
6 R General vlan 1500 1594
7 R Contaduria vlan 1500 1594
admin@VdP4071] > /ip address
[admin@VdP4071] /ip address> print
Flags: X - disabled, I - invalid, D - dynamic
Your description and minimal config does not really give enough useful information. Please post a network drawing and export your configuration. To export and paste your configuration (and I’m assuming you are using WebFig or Winbox), open a terminal window, and type (without the quotes) “/export hide-sensitive file=any-filename-you-wish”. Then open the files section and right click on the filename you created and select download in order to download the file to your computer. It will be a text file with whatever name you saved to with an extension of .rsc. Suggest you then open the .rsc file in your favorite text editor and redact any sensitive information. Then in your message here, click the code display icon in the toolbar above the text entry (the code display icon is the 7th one from the left and looks like a square with a blob in the middle). Then paste the text from the file in between the two code words in brackets.
The problem is, when connecting a PC to the VLAN, it does not get IP address
I don’t find anything wrong in this configuration, I mean, its a copy from the manual example.
Maybe what I want to do is not posible?
Option with 2 DHCP servers is 100% doable. I don’t know about DHCP Relay and Server on one device.
I have 2 DHCP pools on my domain controller DHCP server which is in VLAN 50 - one for VLAN 50 and one for VLAN 253. On gateway I have a bunch of other vlans and DHCP servers, but I wanted to have this particular one (253) on DC, so I used DHCP Relay on Mikrotik to point it out for VLAN 253.
Is there a reason in your case for trying to use this functionality? Or you just want to get IP addresses dynamicly in both VLAN’s? And do you need more assistance with this or at the moment it’s “suspended” on the forum?
Please refer to the scheme I have attached in a previous post.
I want the Vlan-2 to be a subnet for the Accounting department, and to be separated from the rest of the company, which is connected to the Vlan-1
If the subnet Vlan-2 could be physically conected to one of the router’s hardware interfaces, and the Vlan-1 to another, then that solution would make the “software” much easier.
Unfortunately this is not posible, therefore I thought using VLANs for each subnet
But I am stuck, because the DHCP Server attached to the VLAN does not assign IP addresses to the PCs
I did not, you are right
But the switches I use are kind of dumb devices, what were called “hubs”
I don’t know if VLANs are the right solution for my problem
What I need is to have 2 subnets that are conected to the same ethernet interface of the router.
This isn’t possible. Or, it actually is partly … you can have two IP addresses set on single router interface (for different subnets). But you can’t have two DHCP servers.
One DHCP server can issue static addresses for the multiple subnets attached to an interface, however it can only issue dynamic addresses from one pool as it has no idea how to differentiate which clients should be associated with which subnet. (Actually there are mechanisms which allow matching on vendor ID to select alternate pools, but this is unlikely to be of use for general networks with a variety of client devices).