Changing the router static IP address in Network (in System Preferences)

It's the second reason:
To change the IP address that the Mac is using for the Gateway so that it will find the router.

I ask as I have two routers each with different static IP addresses. Plus I have three Mac's all on the same ethernet network for file and printer sharing.

The routers have been given static IP addresses.
One has the usual 192.168.1.1
The other has 192.168.1.254

Two of my networked Apple Macs communicate with the first router having IP address 192.168.1.1

I have a third Apple Mac on the same network. BUT I want to configure that Apple Mac so that it only communicates with the router with static IP 192.168.1.254.

I can now see how to do it.

BUT I ALSO want to ensure that the third Mac NEVER communicates with the router at 192.168.1.1.

I am concerned that the Network control panel might at some stage in the future revert to the default settings which would cause the router address to be assigned dynamically. This might happen as a result of, for instance, the Mac crashing, or the malfunction of a third party application (such as Diskwarrior or Tech Tool Pro). Then the third mac might communicate with the wrong router.

At present I cannot see any way of preventing that happening and having all three macs on the same network for printer and file sharing.

It seems that I will have to disconnect the third Mac from the network and find another way to do printer and file sharing.

Anyone have any ideas?