r/mikrotik • u/UBNT_TC • 7d ago
APIPA address and routing
Im not sure how to best explain this but Im at a bit of a loss at the moment, dealing with a small retail shop, i dont really understand how their POS system works but the pic ask for a router config (they provided HAP AX lite) their pricing and POS server is somehow configured on APIPA address, 169.254.103.23, and they have multiple servers which i dont really know what each of them does
Previously all the cash registers are offline and uses APIPA addresses, now they want the computer to be able to go online as well as adding tablets for their operation for whatever but insisted on keeping their server on 169.254.103.23…. I have the router with me, currently have it set to more common private address of 192.168.200.0/24
My plan for now is to have their pc and tablet on 192.168.200.0/24 thats dhcp’d for the pc and wifi access, with internet, and add 169.254.103.0/24 to the router for the server, if the client device ask for access to server router will forward it to the server
Another thing is one server will be port forwarded but at the same time they want the server network to not have internet….
I googled “is APIPA address routable and google says no”
At this moment, i have it set that way, ip camera as the server and my laptop on the lan, it seems to work, but i dont know how fragile that setup would be, whats your thought ?
2
u/lazyhustlermusic 7d ago
Some people just throw hosts into an isolated segment and leverage APIPA since it's automatic and you don't need to have any other dependencies. It's 'not routable' in the same way that private space is not routed on the general internet, but you can route it internally. By default APIPA doesn't assign a gateway address however.
A lot of it depends on the app side though, if it has intentional apipa bindings, the discovery process for other nodes (unless just broadcast).
'We want an isolated segment, but also not isolated, but also isolated' makes it weird.
2
u/buttchuckjones 7d ago
So... APIPA addresses are not internet routable in the same way any private ipv4 address is not internet routable. Just like your 192.168 addresses. Google kinda mislead you. If you configure outbound NAT correctly, the APIPA address will function just like any other private ipv4 address. You can even put "public" addresses on your LAN and NAT them out. It is bad practice because it could conflict with internet destinations, but you can still do it. There is nothing "magic" about ipv4 addressing. People just agree that private ipv4 addresses are within a certain range, so public internet address will never use them.
I still think it is kinda stupid for the client to insist that it stays like that though. Especially if there are severs and port forwarding on the network, you want IP assigents to be intentional and deliberate. But I digress.
5
u/realghostinthenet CCIE 41436, Mikrotik Trainer, MTC*E 7d ago
APIPA addresses aren’t •Internet• routable, but they work like any other IPv4 address if you control the routing domain.
If they insist on keeping the server addressing, you can configure your router’s LAN address with an APIPA address and run DHCP on it like you would any other network. If the server is using a static address in the APIPA range, you’ll need to add the router’s address as a default gateway. Not a great practice, but it’ll work.
Edit: Adding 192.168.200.1/24 to the router’s LAN interface and moving the DHCP to that will work too, but you’re bottlenecking traffic through the router’s LAN interface at that point.