In this type of case the addresses are dynamic and the default route either through PPPoE or dhcp is delivered dynamically, therefore the two routes will have administrative distance equal to 1, for this type of scenarios the router generally selects its route By default, with whom I generate the connectivity first, however, these distances can be changed in the client PPPoE tunnel, which can be done from the interfaces using the option “Default Route Distance”, while in the dhcp client this distance can be modified using the option “Default Route Distance” which is in advanced.
In MikroTik RouterOS, it is possible to configure multiple WAN interfaces with different connection methods, such as PPPoE (Point-to-Point Protocol over Ethernet) for one provider and DHCP (Dynamic Host Configuration Protocol) for another. These interfaces can have routes assigned in the MikroTik routing table, and each route can have an assigned administrative distance that will influence the route selection in case of multiple routes to the same network.
The administrative distance, known in MikroTik RouterOS as “distance”, is a parameter that helps determine the preference of a route; a smaller distance has more priority over a larger distance.
We explain how this can be configured in a scenario with two providers:
- Interface Configuration:
- PPPoE: You configure a PPPoE interface with your first provider. This interface establishes the connection automatically and obtains an IP address directly from the provider through the PPPoE protocol.
- DHCP: The second interface is configured to obtain an IP address automatically from another provider via DHCP. This is a common configuration when the router is connected directly to a modem that dynamically provides IP.
- Route Configuration:
- For each interface, a default route can be established that directs traffic to the Internet. Typically, these routes are automatically configured by the PPPoE and DHCP client in MikroTik upon connection establishment.
- You can manually adjust the distance of these routes. For example, if both providers are equally trusted and you want them to participate in load balancing or you simply want to have a direct backup route without specific preference, you can configure both routes with the same distance, such as
distance=1
.
- Load balancing or Failover:
- Load balancing: If you configure both routes with the same distance and have load balancing configuration (for example, using PCC in MikroTik), the traffic could be distributed between both connections according to the defined rules.
- Failover: If one connection fails, the other can take all traffic automatically, assuming both routes have the same priority due to their equal distance.
- Monitoring and Maintenance:
- It is important to monitor the connection to ensure that both routes are working as expected. MikroTik RouterOS offers several tools to monitor and diagnose network connections.
In conclusion, it is possible to have distance 1
on each of the routes in MikroTik when using multiple providers with different connection methods, such as PPPoE and DHCP. This configuration can be useful for implementing load balancing or high availability scenarios.