Community discussions

MikroTik App
 
ega2002
just joined
Topic Author
Posts: 15
Joined: Fri Sep 23, 2016 4:58 pm

Two DHCP addresses for WAN possible?

Thu Oct 06, 2016 2:47 pm

Hi, guys, this is my first post in this forum. I'm quite new to ROS, so I need your advice.
My RB is connected to the provider via managed switch (see scheme below), I also have STB for IPTV, IPoE is used to connect RB to Internet. So, when I physically attach the prov's cable, my RB, STP and the switch get the IP addresses via DHCP. In this state I can manage my switch and STB from the computer PC1 behind the RB with no problem. But, when I get through WEB authorization to connect to Internet, WAN gets another IP address in different subnet, so I loose the ability to manage my other devices.
Of course, I can manually assign to WAN the second IP address from the first subnet, but it is static, and I have to check if it is not occupied every time before doing this. I'm afraid to let it assigned all the time because of possible conflicts with provider's DHCP server.
Can you guys suggest any simple solution how to get another DHCP address for WAN (maybe some kind of virtual interface or so). Any other idea how to manage my devices are also welcome. I hope I clearly described my problem (English is not my native language). Thank you.
my_net.png
You do not have the required permissions to view the files attached to this post.
 
haik01
Member
Member
Posts: 406
Joined: Sat Mar 23, 2013 10:25 am
Location: Netherlands

Re: Two DHCP addresses for WAN possible?

Thu Oct 06, 2016 4:49 pm

Why not put the STB tot he LAN side of Mikrotik. Same as you did with the PC? I assume there is a DHCP server on the Mikrotik which hands out local IP addresses to you PC and other devices.
 
ega2002
just joined
Topic Author
Posts: 15
Joined: Fri Sep 23, 2016 4:58 pm

Re: Two DHCP addresses for WAN possible?

Thu Oct 06, 2016 8:40 pm

haik01,
yes, moving STB to LAN could be a solution, but I don't want to waste the RB's resources for routing IPTV traffic. Another reason is, that there likely will be another neighboring RB (with its own Internet account), which is planned to be connected to the same switch. So, the problem of managing this switch from behind the RB still remains.
Anyway, thank you for answering.
 
sup5
Member
Member
Posts: 329
Joined: Sat Jul 10, 2010 12:37 am

Re: Two DHCP addresses for WAN possible?

Thu Oct 06, 2016 8:56 pm

Actually this is possible.


example:
1) create a new bridge1
2) add ether1 (WAN) to bridge1
3) change the admin-mac of bridge1 to a different mac-address than ether1
4) add two ip-dhcp-clients, one each on ether1 and bridge1
that's it.
 
jarda
Forum Guru
Forum Guru
Posts: 7603
Joined: Mon Oct 22, 2012 4:46 pm

Re: Two DHCP addresses for WAN possible?

Thu Oct 06, 2016 10:11 pm

That is not it at all. Mikrotik doesn't support multiple dhcp clients on one interface. By making ether1 to be a bridge member you are disconnecting ether1 from cpu and putting there the bridge instead. So you have still only one interface. But you can do another thing. You can connect the stb or other devices to the wan bridge and let them use their dhcp clients to obtain ip config on their own from the isp...
 
ega2002
just joined
Topic Author
Posts: 15
Joined: Fri Sep 23, 2016 4:58 pm

Re: Two DHCP addresses for WAN possible?

Thu Oct 06, 2016 11:37 pm

You can connect the stb or other devices to the wan bridge and let them use their dhcp clients to obtain ip config on their own from the isp...
That was one of the first things I've thought about. But, if the other devices get their IPs from the provider, they will still be from the subnet, different from that of WAN bridge (if RB is connected to Internet via IPoE). So they are inaccessible from the RB itself and PC1 behind RB. Please correct me if I'm not right.
The other idea was to separately connect to the switch one more interface, e.g. ether2, not bridged with any other interface in the RB, and let it get the IP from ISP (like two WAN interfaces configuration). In this case the RB will be able to communicate with all other devices connected to the switch because they will be in the same subnet. But the switch is rather far from RB and to put another cable is not so convenient for me. I hoped that this could be done with some kind of virtual ethernet interface or something.
If there are no other ideas, I will prefer to stay with temporary second static IP for WAN, whenever I want to manage the switch.
 
sup5
Member
Member
Posts: 329
Joined: Sat Jul 10, 2010 12:37 am

Re: Two DHCP addresses for WAN possible?

Fri Oct 07, 2016 12:49 am

as a last way one could setup a metarouter with a least three interfaces.
these three interfaces needs to be bridged within the metarouter.

then one can use the metarouter as virtual cable/switch. this will remove the need for an external switch.

I've tried this before. it works.
 
cutedrummerboy
Member Candidate
Member Candidate
Posts: 137
Joined: Thu Nov 14, 2013 6:32 pm

Re: Two DHCP addresses for WAN possible?

Fri Oct 07, 2016 7:45 am

I have some similar situation.
i manage couple of managed switch at my routers wan side. so what I did, assign each switch a management vlan with dhcp client, change their port type as necessary with trunk or access or hybrid. then create the same vlan at mikrotiks wan interface without bridge and assign a new subnet with dhcp server. that's it, so easy.
because of direct connection that subnet will be automatically reachable from your lan without any special route.
Device: RB2011UIAS-RM, RB750GL, CISCO SG300-28, UNIFI UAP-LR
 
ega2002
just joined
Topic Author
Posts: 15
Joined: Fri Sep 23, 2016 4:58 pm

Re: Two DHCP addresses for WAN possible?

Fri Oct 07, 2016 11:16 am

so what I did, assign each switch a management vlan with dhcp client, change their port type as necessary with trunk or access or hybrid. then create the same vlan at mikrotiks wan interface without bridge and assign a new subnet with dhcp server. that's it, so easy.
Hmm, looks very attractive... Thank you, cutedrummerboy, I have to dig in this direction. I'm quite new to VLANs, it would be great if you post your RB VLAN config, so I can use it as an example.
 
ega2002
just joined
Topic Author
Posts: 15
Joined: Fri Sep 23, 2016 4:58 pm

Re: Two DHCP addresses for WAN possible?

Sat Oct 08, 2016 11:41 am

Unfortunately, my switch can have only one IP address (no separate DHCP for VLANs). So, I must look for another solution.
 
Sob
Forum Guru
Forum Guru
Posts: 5705
Joined: Mon Apr 20, 2009 9:11 pm

Re: Two DHCP addresses for WAN possible?

Sun Oct 09, 2016 2:33 am

By making ether1 to be a bridge member you are disconnecting ether1 from cpu and putting there the bridge instead. So you have still only one interface.
It used to work, but not any more (tested with latest RC). Well, it was indeed sort of bug. But the original vrrp hack still works. Although it might stop working too one day, because it doesn't look less bug-like by too much.
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply. Not intended as incentive for masochists.

Who is online

Users browsing this forum: olegon and 111 guests