Community discussions

MikroTik App
 
mikrotik512
just joined
Topic Author
Posts: 1
Joined: Sat Aug 01, 2020 9:56 pm

Second usable IP in /29 does not work

Sat Aug 01, 2020 10:03 pm

Hi, I've got a /29 assigned to me by the ISP. The ISP put their own router in place so the WAN port (ether1) is connected directly to it, with ether2 as the LAN.

Let's say the public IP network is: 1.1.1.96/29. The ISP's public gateway is 1.1.1.102 and works just fine.

I've set the Mikrotik's WAN IP to be 1.1.1.97, and the LAN IP for the Mikrotik to be 192.168.1.1. I've set up NAT for the local machines.

Now - I also want to connect a server to one of the Mikrotik's ethernet ports, and use a public IP directly on that server.

I'm pretty sure that I should be able to just set that server's IP to 1.1.1.98 or .99, and set its default router to 1.1.1.97, but it doesn't seem like the Mikrotik routes the traffic at all. As far as I understand, it doesn't even need extra routing for this to be possible ?

It seems like such a silly simple problem, so I would appreciate any help clearing up my misconception.
 
User avatar
jitdor
just joined
Posts: 8
Joined: Tue Jul 07, 2015 9:17 pm

Re: Second usable IP in /29 does not work

Thu Sep 03, 2020 12:34 pm

You need to bridge the port you're connecting the server to and your WAN port (ether1), as they're within the same subnet.
Additionally, you'll need to exclude the server's IP from NAT srcnat or masquerade, else it will be seen as using 1.1.1.97 for outgoing.
 
tippenring
Member
Member
Posts: 304
Joined: Thu Oct 02, 2014 8:54 pm
Location: St Louis MO
Contact:

Re: Second usable IP in /29 does not work

Thu Sep 03, 2020 5:55 pm

You are confusing routing with bridging.

First, I would highly recommend not putting a server directly on the internet unless you are well aware of the risks.

If after assessing the risks you still would like to connect a server directly to the internet, you'll need to set up a bridge interface with more than 1 physical port for your internet connection. For example, ether1 and ether2. Then assign the router IP to the bridge, assign a second public IP to the server, and connect the ISP to ether1 and the server to ether2.