Community discussions

MikroTik App
 
supermuzhik
just joined
Topic Author
Posts: 10
Joined: Wed Feb 09, 2011 3:25 pm

Multiple DHCP assigned public IPs via single interface

Sun Nov 16, 2014 5:42 pm

Hi,

My internet provider allows me to use up to five dynamically assigned IP addresses. Currently I only have a single ethernet port and it is being assigned a single public IP via internet providers DHCP server. I know I could add statis IPs under IP->addresses, but how can I force mikrotik to ask for multiple DHCP assignled Ips on ethernet gateway port?

Regards,
Dimy
 
Dmitrii
just joined
Posts: 2
Joined: Mon Nov 17, 2014 12:07 am

Re: Multiple DHCP assigned public IPs via single interface

Mon Nov 17, 2014 7:02 am

Each Ethernet can have only 1 MAC address.
Each Vlan can have 1 MAC address, but you cant use vlans...
So i can offer you only this:
You do not have the required permissions to view the files attached to this post.
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Re: Multiple DHCP assigned public IPs via single interface

Mon Nov 17, 2014 8:38 am

It's ugly.
But I have not better idea.
 
supermuzhik
just joined
Topic Author
Posts: 10
Joined: Wed Feb 09, 2011 3:25 pm

Re: Multiple DHCP assigned public IPs via single interface

Mon Nov 17, 2014 12:09 pm

Thank you for the reply. So you are saying there is no fancy way of doing this with a single physical ethernet port? I found in other sources someone was mentioning DHCP relays, but there was no instructions of how to do it...
 
User avatar
rmmccann
Member Candidate
Member Candidate
Posts: 182
Joined: Tue Sep 25, 2012 11:15 pm
Location: USA

Re: Multiple DHCP assigned public IPs via single interface

Tue Nov 18, 2014 7:40 pm

DHCP Relay would be for centralizing a DHCP server in a routed or otherwise non-bridged network.

What I would try is this:

Let's say ETH1 is your WAN interface. You have a DHCP client on that interface. Create a few VLANs on that interface (with a unique MAC) and put a DHCP client on each one. Assign all of the VLANs and ETH1 to a bridge.

Not sure *how* that would work in practice, but it's worth a shot.
 
supermuzhik
just joined
Topic Author
Posts: 10
Joined: Wed Feb 09, 2011 3:25 pm

Re: Multiple DHCP assigned public IPs via single interface

Wed Nov 19, 2014 10:21 am

If I understand correctly you can only change a VLAN's mac address by adding it to a bridge and changing the bridge's MAC address. So I am not sure how to get multiple VLANs with different MAC that are attached to a single bridge. What I managed to do is to add the ethernet port to a bridge and change the mac on the bridge. Then I added a DHCP client on the bridge and bridge got another IP address from my provider. So now I was able to use two IP addresses, not sure how to get more than two though...
 
User avatar
gabrielpike
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Thu Apr 17, 2014 4:17 pm

Re: Multiple DHCP assigned public IPs via single interface

Wed Nov 19, 2014 3:53 pm

Just out of curiosity why don't you just add multiple static addresses to your WAN port? If you know the address range and the subnet you should be able to manually add the addresses...
 
User avatar
rmmccann
Member Candidate
Member Candidate
Posts: 182
Joined: Tue Sep 25, 2012 11:15 pm
Location: USA

Re: Multiple DHCP assigned public IPs via single interface

Wed Nov 19, 2014 4:08 pm

If I understand correctly you can only change a VLAN's mac address by adding it to a bridge and changing the bridge's MAC address. So I am not sure how to get multiple VLANs with different MAC that are attached to a single bridge. What I managed to do is to add the ethernet port to a bridge and change the mac on the bridge. Then I added a DHCP client on the bridge and bridge got another IP address from my provider. So now I was able to use two IP addresses, not sure how to get more than two though...
You're right, the only way to change the MAC is via the bridge interface. I'm going to ask as well, why not just add the public IP addresses as statics? That'll make life much easier than looking for a clunky solution.
 
supermuzhik
just joined
Topic Author
Posts: 10
Joined: Wed Feb 09, 2011 3:25 pm

Re: Multiple DHCP assigned public IPs via single interface

Wed Nov 19, 2014 4:42 pm

This could lead to IP conflicts - the DHCP of my Internet provider wouldn't know that this IP is taken and might give it to some of my fellow neighbors :)
 
User avatar
rmmccann
Member Candidate
Member Candidate
Posts: 182
Joined: Tue Sep 25, 2012 11:15 pm
Location: USA

Re: Multiple DHCP assigned public IPs via single interface

Wed Nov 19, 2014 7:33 pm

You should ask your provider to either assign you a /29 (five static IPs) or reserve 5 IPs for you on their DHCP server.

I've worked with providers that do both methods and neither should be a big deal.

Who is online

Users browsing this forum: Bing [Bot] and 84 guests