How to change and add IP Address on Mikrotik Router – CLI

Neicytechno – Adding an IP address to the MikroTik RouterBoard is the first step in making more serious routing. Without an IP Address, each Ethernet/Wlan port will not be able to connect to each other. Configuring the Mikrotik router we can use a GUI (Graphical User Interface) and CLI (Command Line Interface) based application.

What is the Difference Between GUI and CLI?

GUI (Graphical User Interface) is a visual-based interface that uses the method of interaction with the user. While CLI (Command Line Interface) is a text-based interface by typing certain commands

What is IP Address?

Internet Protocol Address (IP Address) is a numeric label used by every device connected to a computer network to communicate with each other using the internet protocol. The IP address can help us to enter and surf the internet easily and can be connected to each other.

In the IP address, there are two important parts, namely, Network ID and Host ID. Network ID is part of the IP Address that shows the location/path where the network is active, while the Host Id is the address used by the device on the network.

How to add IP Address on Mikrotik Interface?

To connect to each other between ethernet1 ports with others, then we must provide each device with an identifier called an IP address. To add an ip address on the Mikrotik router we can use the command line:

ip address Add address=??? interface=??? Network=???

To run it we can use Telnet or Terminal on Winbox.
For an example of how to use the command line formula, we can add an IP address with the IP class used, along with the interface/ether that we will use.

/ip address

add address=192.168.2.1/24 interface=ether2 network=192.168.2.0

add address=192.168.3.1/24 interface=ether3 network=192.168.3.0

add address=192.168.4.1/24 interface=ether4 network=192.168.4.

we can adjust the IP address according to the interface we will use, the example above uses a class C IP that uses /24 or 253 hosts, you can adjust it according to the number of devices that you will use later.

This command can run if the interface has not been renamed (ether1..n). If you have changed the interface name before, use the command with the changed interface name, for example, you have changed the ether2 interface to “Office” then we type the command

IP address add address=192.168.2.1/24 interface=Office network=192.168.2.0

Good luck…

Tinggalkan komentar