I’m new to this forum, come from Germany and hope to find help with a problem with the configuration of a MikroTik router.
I want to make my friends happy. I have created a simple Java server program, which runs on a laptop with a connected projector. With the program, a slideshow with photos, for example, presented at a wedding, the photos are uploaded live via mobile phones. Everything works very well so far.
Unfortunately, the mobile phone users always have to enter the IP address of the laptop after connecting to the WLAN and since I do not want my friends to set a static IP in their laptop, it unfortunately always changes.
So I thought to intercept the problems of a MikroTik router. Unfortunately I do not know myself with Routing, Routers, DHCP.
So I’ll describe what result the configuration should have:
1.) Ethernet 3 should only be reserved for the router configuration.
2.) Ethernet 4 should receive a static IP address for the laptop
3.) WLAN and Ethernet 4 are located in a network
4.) WLAN should receive a DHCP administration
5.) It would be nice, if the mobile phones automatically after the (Hotspot) WLAN connection, with Browseraufruf on the side “http: // ” of the Java server further forwarded. Or after a login page, press a button to be redirected to the link (which is easier).
I would be very happy if you write me what I have to configure and how. Best step by step
If you want the laptop acting as server to have a fixed IP, you can still use DHCP.
1.- Go to IP > DHCP Server > Leases and locate the laptop one.
2.- Double click on it, and click on “Make static”.
From now on, the laptop will be always offered that same IP via DHCP.
Another enhancement will be using DNS so that users access the service via a FQDN instead of an IP:
1.- Go to IP > DNS and enable “Allow Remote Requests” if it isn’t.
2.- Check on IP > DHCP > Networks, that your router LAN IP for the hostpot is on the DNS Server field.
3.- Now go to IP > DNS and click on [Static] button. Add a new entry, setting name to .eg. agascha.local, with the same IP whe checked on step #2.
Now users can type agascha.local to access this service.
If as it seems you’re using hotspot service, you can automatically redirect hotspot users after they athenticate by modifying alogin.html hotspot page, setting agascha.local instead of www.example.com in that post.
thanks for your help. Is there no way that the router is set up, which depends on Lan4 always the same IP address? So even with changing laptops on this Ethernet always the same IP receive.
You could do it with scripting, set a short lease time on the DHCP server. Have a script that updates the static lease based on the IP ARP table entry for the Eth4 interface. The first IP the laptop gets likely won’t be right but after the script runs on the router it would be updated.
A less difficult solution may be to let the laptop get whatever IP it wants and set a local static DNS entry in the router. Use a script to have the DNS record set to a very short TTL and have the router update the record based on the MAC from IP ARP for Eth4 and the IP address that is assigned to it from DHCP.
Right, you probably need a bit more background in networking. If you choose to do it with the method involving DNS you and your users never need to enter the IP address in the browser. Instead it could just be “http://pictures” for example.
If you choose to manage just the IP address and access it via “http://192.168.100.5” you then need the script to create or modify the static lease for 192.168.100.5.
I don’t have a canned thing you can download and it will magically solve the issue. You can however do a bit of learning and knock it out yourself.