Page 1 of 1

Two IPs each on separate port

Posted: Mon Jun 24, 2019 11:37 pm
by lok
Hey guys.

I have a question. I bought a MikroTik router for home and I have got two IP address from my internet provider. DHCP
Both IPs are in the same subnet.
My needs are to assign each IP address to separate Ethernet port. Could someone shed some light on this, please?

Re: Two IPs each on separate port

Posted: Wed Jun 26, 2019 7:13 pm
by lok
Seems like a not very active community. :(

Re: Two IPs each on separate port

Posted: Wed Jun 26, 2019 11:59 pm
by sebastia
Hi

These ip's are from two different modems? what is the wiring / network configuration?

Re: Two IPs each on separate port

Posted: Sat Jul 06, 2019 3:08 am
by lok
Hi

These ip's are from two different modems? what is the wiring / network configuration?
Hi. thank You for input.
No its just one and that same internet provider.
Photo 06-07-2019, 03 02 46.jpg
In 1 port I have In cable from Internet provider.
In Second port I have my workstation PC. I would like to leave it as it is now, DHCP address - Same I would like to leave wireless connection as well what currently gets DHCP IP.

But in third port I have Connected my server. So I would like to get separate IP address working on this port.

I have got two IPs

136.169.26.41
136.169.26.42

41 IP would work as main IP for DHCP server therefore for port 2 port 4 and 5 + wireless connection.
And 42 IP address would work directly from port 3. No need DHCP there.

Is that something possible ?

Thanks

Re: Two IPs each on separate port

Posted: Sat Jul 06, 2019 10:47 pm
by sebastia
Hey, there is no easy software solution to this, see viewtopic.php?f=2&t=149920 with same question.

Re: Two IPs each on separate port

Posted: Sat Jul 06, 2019 11:58 pm
by Sob
It doesn't look like same thing. The problem in other thread is when router itself should get multiple addresses from ISP's DHCP server.

In this case, if server should get the other address, simply bridging ether1 and ether3 should do the trick. Newly created bridge will serve as new WAN interface for router.

Re: Two IPs each on separate port

Posted: Sun Jul 07, 2019 12:50 am
by sebastia
Possible, not sure if server should be shielded / natted... If not then indeed, that will suffice.

Re: Two IPs each on separate port

Posted: Sun Jul 07, 2019 11:06 am
by mkx
Server can be shielded by configuring use-ip-firewall=yes on WAN bridge. It will affect the LAN<->server connections though (at least performance-wise).

Re: Two IPs each on separate port

Posted: Tue Jul 09, 2019 11:24 pm
by craigreilly
viewtopic.php?f=13&t=149603&p=738962#p738500 is the way to go...

Or - protect the server by using NAT and only allow the ports that should be passed thru (ie: 80)

Re: Two IPs each on separate port

Posted: Wed Jul 17, 2019 1:35 am
by lok
It doesn't look like same thing. The problem in other thread is when router itself should get multiple addresses from ISP's DHCP server.

In this case, if server should get the other address, simply bridging ether1 and ether3 should do the trick. Newly created bridge will serve as new WAN interface for router.
Well I guess I have same way. ISPs have DHCP server and Instead of one IP address I have two available. Only problem is to how to get them to work on my one Mikrotik router.
I have tried Your suggestions but failed, as it seems ETH1 can not be added in bridge. And It already is added in some kind of bridge. But it was default, nothing is configured yet.

Image

Thank you for input

Re: Two IPs each on separate port

Posted: Wed Jul 17, 2019 2:26 am
by Sob
If it's default config, then ether1 (WAN) should be separate port and the rest should be in bridge (as LAN).

If the solution with server getting public address directly would work for you, you need to remove server port (ether3) from LAN bridge and add it together with current WAN (ether1) to new bridge which will become your new WAN port. But it will also mean that server won't be part of your LAN anymore. Unless you add another connection using either second network adapter or VLAN.

If you'd rather have the second public address on router too and use NAT, then it's same problem as in thread linked by sebastia. In that case it's possible to use VRRP hack, which may not be the prettiest solution but should work.