Files
api_utils_converse_v2/readme/MikroTik-PPPoE-1000.md
T

2.0 KiB

MiktoTik Configuration Steps

20250210 / Khushal P S

We need to configure MikroTik servers for the end use case of "PPPoE"Here are the steps to achieve it through MikroTik's REST API facility. Use the MiktoTik (EasyFi) Postman collection for this.


Before We Begin

MikroTik allows access via REST API using Basic-Auth headers which take a username and a password. The base path would look something like http://<ip-addr>/rest. You may need to mention a port no. if the default has been changed.


Steps for PPPoE

1. Select a Physical Interface

In this step you must pick the first available interface that is not being used elsewhere. Mind you that this interface is an actual physical connectivity interface (typically ethernet) on the MikroTik device.

  • Enlist the available interfaces using the listing API on the /interface path using GET method.
  • Select the first one that has field "running" set to "false", and pick its ".id" value.
  • Rename it to "easyfi-pppoe" by its ".id" on the /interface/<.id> path using PATCH method.

ROLL-BACK: Save the original configuration as a JSON string in the comment field.

2. Create VLAN Interfaces

You will be given a range of VLAN interfaces like "2001-2010". Create on VLAN for each id such that the value of the name of the "interface" that you set for it is set to "easyfi-pppoe" (the name of the physical interface).

Use PUT method on the path /interface/vlan. Consider to the following example JSON:

{
    "name": "easyfi-vlan-2001",
    "interface": "easyfi-pppoe",
    "vlan-id": "2001",
    "disabled": "false",
    "comment": "easyfi"
}

NOTE: Looping needed.

ROLL-BACK: Save the original configuration as a JSON string in the comment field. If there was no original configuration, simply delete your record.

3. Assign Private IP Subnets to the VLANs

You will receive the Private IP range in either CIDR notation or as a hyphen-separated string.