0

I've received a /29 allocation of IPv4 addresses from my ISP. For sake of discussion, I will call this the 123.0.0.16/29 network.

This IP space is divided as follows:

123.0.0.16: Network
123.0.0.17-21: Free to use
123.0.0.22: Gateway
123.0.0.23: Broadcast

My ISP uses PPPoE and DHCP, and my router, a MikroTik, automatically picked up the gateway address to use as its own. Any clients on the LAN side will appear as this address on the WAN via the magic of NAT.

Now, I have a host I want to assign the .17 address, and have it available on that address through the WAN.

I have no idea how, exactly, to configure this on the MikroTik.

I do believe it needs configuration of some kind, since it wasn't as simple as dropping something like this interfaces file on the host in question:

auto eth0:0
iface eth0:0 inet static
address 123.0.0.17
netmask 255.255.255.248
gateway 123.0.0.22

From what I understand of basic networking, the router probably needs either a bridge or a static route of some kind set up, since right now it has no idea what to do with a packet claiming to come from 123.0.0.17 on the LAN side.

Am I on the right track here, and what do I need to be looking at in my router config?

  • If you have 5 of fewer devices you could simply disable NAT. That way is is trivial to give one of your internal hosts the ,17 IP. – Hennes Jan 28 '17 at 12:04
0

Whoever runs the DHCP server assigns the IP addresses to your local hosts (which in turn request those addresses via DHCP). So

1) You can configure your single host to use a static address instead of DHCP. That also means the DHCP server won't know that this address is also in use, and will happily assign the same address to some other host. So in this scenario, you'll probably want to assign all your hosts static addresses, directly on the hosts.

2) If your MikroTik router runs the DHCP server, then often the DHCP server can be configured to assign IP addresses based on the MAC address (so some some particular hosts always get the same address, like 123.0.0.17). You didn't say which MikroTik router you use, so I couldn't google for a manual.

3) If "your ISP" runs the DHCP server, then maybe this server can be configured to assign IPs based on MACs. Contact your ISP.

I didn't understand how NAT applies in your case. The whole point of allocating an address range like /29 is that you don't have to do NAT. And NAT doesn't use a gateway address in the way you describe. If there's really NAT involved somewhere, you'll have to tell whichever box is doing the NAT that there's a host/port combination behind the NAT you want to have visible to the outside. And the local address your host is assigned behind the NAT doesn't influence under what address it's visible from the outside at all. (And you probably should use private network address ranges behind the NAT in the first place).

0
  1. setup your external router interface with the public IP address
  2. setup your internal (local address with a reserved IP address pool)
  3. create a bridge for the switch ports 1-8 (or however many you want)
  4. create a DHCP pool and assign it to the bridge for the ports
  5. setup your DNS for the internet (8.8.8.8 is a good start)
  6. create a NAT on the bridge with out interface as your WAN port

Done!

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.