when i export the configuration of my L009UiGS-RM (RouterOS Version is: 7.13.5) with command ‘/export’ or ‘/export verbose’ the default route to 0.0.0.0/0 is not listed.
I would have expected an entry similar like:
/ip route
add distance=1 gateway=192.168.178.1
Looking via Winbox into the UI under ‘IP → Routes’ i can find the default route properly configured. See screenshot attached. Any idea what is wrong here ?
With my old MT router RB750 gr 2, with RouterOS 6.x all time the default route was listed with command ‘/export’.
Do i have to use the '/expor’t command in a diffrent way in 7.x or ist it a bug ?
Even with my old MT router RB750 gr 2 all time only the default route to 192.168.178.1 was listed under section /ip route with command ‘/export’.
/ip route
add distance=1 gateway=192.168.178.1
All the other routes to the other networks (e.g. 192.168.2.0/24, 192.168.3.0/24, etc.) visible on the Winbox UI/ Route List never have been listed with /export command.
Regards
Ralf
PS: sorry for replying so late, but i was ill for some days.
Winbox has a bit different logic built in, so you can’t directly compare what is shown by winbox to what is shown by individual commands in CLI.
Alas: the routes you mention are not explicitly set routes, they are listed in /ip route print as “D” - dynamic. Which means they are there, but configuration, which “made them” was done elsewhere … so export in route subtree can not export those. In particular: those are “connected networks” which are accessible directly via appropriate interface (shown in route print output) because IP address (set on those interfaces) includes subnet mask, shorter than 31 (meaning that more than a single “foreign” host is accessible via that interface, making that a “subnet”). Hence “route” instructing device to reach those destinations by using appropriate interface. Likewise there might be a default route (dynamic as well, so non-exportable) if WAN interface is PPPoE and property “default-route” is set to “yes”.
@schmiro
To clear my previous post there are Dynamic rules D (that are auto-generated by the router depending on the networks/connections available and never exported) and Static s rules.
These latter ones can be of two types:
catch-all gateways, such as yours:
add distance=1 gateway=192.168.178.1
that actually is a “short form” for:
add dst-address=0.0.0.0/0 distance=1 gateway=192.168.178.1
specific routes, only as an example:
add dst-address=192.168.0.0/24 distance=2 gateway=192.168.178.1
The questions are:
are both types of Static routes above not exported?
or is it only the one without and explicit dst-address?
Or if you prefer:
what happens if you add temporarily a:
add dst-address=192.168.0.0/24 distance=2 gateway=192.168.178.1
, does it export?
what happens if you try adding the dst-address=0.0.0.0/0 to the main gateway route, does it export?