MikroTik RouterOS v2.9 Reference Manual page 51

Reference manual
Table of Contents

Advertisement

Viewing Routes
You can see two dynamic (D) and connected (C) routes, which have been added automatically
when the addresses were added in the example above:
[admin@MikroTik] ip route> print
Flags:
A - active, X - disabled, I - invalid, D - dynamic, C - connect,
S - static, r - rip, b - bgp, o - ospf, d - dynamic
#
DST-ADDRESS
0 ADC 192.168.0.0/24
1 ADC 10.0.0.0/24
[admin@MikroTik] ip route> print detail
Flags: A - active, X - disabled, I - invalid, D - dynamic, C - connect,
S - static, r - rip, b - bgp, o - ospf, d - dynamic
0 ADC dst-address=192.168.0.0/24 prefsrc=192.168.0.254 interface=Local scope=10
1 ADC dst-address=10.0.0.0/24 prefsrc=10.0.0.217 interface=Public scope=10
[admin@MikroTik] ip route>
These routes show, that IP packets with destination to 10.0.0.0/24 would be sent through the
interface Public, whereas IP packets with destination to 192.168.0.0/24 would be sent through the
interface Local. However, you need to specify where the router should forward packets, which have
destination other than networks connected directly to the router.
Adding Default Routes
In the following example the
be added. In this case it is the ISP's gateway 10.0.0.1, which can be reached through the interface
Public
[admin@MikroTik] ip route> add gateway=10.0.0.1
[admin@MikroTik] ip route> print
Flags: X - disabled, I - invalid, D - dynamic, J - rejected,
C - connect, S - static, R - rip, O - ospf, B - bgp
#
DST-ADDRESS
0 ADC 192.168.0.0/24
1 ADC 10.0.0.0/24
2 A S 0.0.0.0/0
[admin@MikroTik] ip route>
Here, the default route is listed under #2. As we see, the gateway 10.0.0.1 can be reached through
the interface 'Public'. If the gateway was specified incorrectly, the value for the argument 'interface'
would be unknown.
Notes
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.
G GATEWAY
r 0.0.0.0
r 0.0.0.0
(destination 0.0.0.0 (any), netmask 0.0.0.0 (any)) will
default route
G GATEWAY
r 10.0.0.1
DISTANCE INTERFACE
0
Local
0
Public
DISTANCE INTERFACE
Local
Public
0
Public
Page 37 of 695

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents