In this tutorial, we will be with you to check how to set a static IP On Mikrotik Router OS. In order to be able to connect to Mikrotik VPN Server through Winbox, first, you need to set a static IP address through the terminal of the Router OS. In this tutorial, we will use the setup command to set the IP address.
Steps To Set A Static IP On Mikrotik Router OS Through Setup Command
- Set A Static IP On Mikrotik Router OS With Setup Command.
- Reset Mac Address.
- Disable IP Neighbor Discovery.
Step 1: Set A Static IP On Mikrotik VPN Server
To set a static IP address on Mikrotik VPN Server, type the setup command and press enter. Then type (a) which is to configure the IP address and gateway and press enter. Then type (a) again which will be to add the IP address and press enter. Then you will be asked to enable the interface which you should enable by pressing the enter button. In this section, you should enter your static IP address, and the netmask and press enter. Consider that you should separate the IP address from netmask with / mark.
setup a a Enable interface Ether1 by pressing enter Set IP address/netmask and press enter. It will be something like 192.168.10.20/26
Now you have Set A Static IP On Mikrotik Router OS and just the gateway is left. Type (g) to choose the gateway and press the enter button after entering the gateway. Then press (x) two times to exit the setup environment.
g x x
Note: Try to ping 22.214.171.124 to be sure that you are connected to the internet.
Step 2: Reset Mac Address
Then, try to reset the mac address of your Mikrotik VPN Server to avoid any disruption with other machines on your network. To do this, use the below command.
interface ethernet reset-mac-address
In this section, you will be asked to choose the number of the flag which should be 0. Also, you can use the below command to see the list of your IP addresses to find the correct flag number.
ip address print
Step 3: Disable IP Neighbor Discovery
Now it’s better to disable the IP neighbor discovery tool to disallow the machine to find other devices on the network to prevent any interruptions with other machines. You can use the below command.
ip neighbor discovery set ether1 discover=no
Note: You can use the below educational link in order to connect to Mikrotik Router OS through Winbox.
Steps To Set A Static IP On Mikrotik VPN Server Without Setup Command
On some versions of Mikrotik Router OS, the Setup command doesn’t work. In this situation, we have to set the static IP through another command. We assume that here are our static IP details and we will use the below command.
IP Address: 192.168.10.5
Subnet Mask: 255.255.255.192
Command to set the above IP address details.
IP address add address=192.168.10.5/26 interface=ether1 IP route add gateway=192.168.10.4 interface ethernet reset-mac-address ip neighbor discovery set ether1 discover=no
You can set a static IP on Mikrotik VRouter OS easily through the setup command. And also we should be sure to do all of these 3 steps to avoid disruptions in the network.