ISP assigned static IP - changing from DHCP remotely

Hi all,

Just want to check my logic before I try something and get myself stuck.

ISP has provided a static IP.

Mikrotik is currently set to dynamically retrieve an address on ether1.

It would seem I have two steps to complete:

 /ip address
add address=83.227.135.130/26 interface=Ether1



/ip route
add dst-address=0.0.0.0/0 gateway=83.227.135.129

Will I be able to add these configuration items for the static IP to the Mikrotik while leaving the DHCP configuration in place until I decide to remove the DHCP configuration and reboot the ISP’s modem?

I’m attempting to perform this from a remote location, so I’m wondering how/if I can do so.

Thanks!

Changing the upstream interface is about the trickiest thing you can do from remote.

Please read up on safe mode and practice with it before you do this. You start it with Ctrl+x from the command line. Make sure your firewall rules don’t prevent access once you’ve added the new address as well.

You can put the static IP on the upstream interface (ether1) without issue. Try pinging the gateway address you were given to make sure it works. Then set the default gateway.

It should work if the ISP gave you the right info.

Thanks for the tips! I found the Safe Mode feature shortly after, but fortunately I had a user willing to let me use the hotspot on their device to simplify the process.

Probably could’ve gotten by with just safe mode, but had made the mistake of removing the DHCP address first, which still seemed to kill internet access. I guess going forward I’ll know to save the removal of the DHCP address for last, if that’s a possibility.

You can have 2 separate IP addresses on the same interface. Things get tricky when you set the default route, that’s where the problem comes up.

Set the new IP while keeping the DHCP address. If you can ping the gateway address that the ISP gave you, then you have to set the gateway. You can have 2 default gateways but I never studied up on how the router decides on which one to use. It could break things I suppose.

I think it has similar concepts to dual wan. To have both IPs work at the same time, the TCP connections coming in on the static IP needs to be marked. Outbound packets for that connection would need to be marked, and then a route added for packets with that route.