Skip to content
MikroTik RouterOS Docs

RIP (Routing Information Protocol)

For the impatient: basic RIP setup in RouterOS v7.

# Create RIP instance with redistribution
/routing/rip/instance/add name=rip1 redistribute=connected,static
# Add interfaces to RIP
/routing/rip/interface-template/add instance=rip1 interfaces=ether2,ether3

Verify with:

/routing/rip/neighbor/print

What this does: RIP (Routing Information Protocol) is a distance-vector routing protocol that automatically shares routing information between routers. It uses hop count as its metric, selecting routes with the fewest hops.

When to use this:

  • Small networks (15 hops or fewer between any routers)
  • Simple dynamic routing requirements
  • Legacy environments requiring RIP compatibility
  • Learning dynamic routing concepts

Prerequisites:

  • IP addresses configured on participating interfaces
  • Firewall allowing UDP port 520
  • Multicast 224.0.0.9 reachable (or use static neighbors)

15 Hop Limit

RIP has a maximum metric of 15 hops. Routes requiring 16+ hops are considered unreachable. For larger networks, use OSPF instead.

Create an instance with route redistribution:

/routing/rip/instance/add name=rip1 redistribute=connected,static

The redistribute setting determines which routes RIP advertises:

  • connected: Directly connected networks
  • static: Static routes
  • ospf: Routes from OSPF
  • bgp: Routes from BGP

Define which interfaces participate in RIP:

/routing/rip/interface-template/add instance=rip1 interfaces=ether2,ether3

You can use wildcards: interfaces=ether* or interfaces=bridge1,vlan*

Check that RIP neighbors are discovered:

/routing/rip/neighbor/print

Expected output:

Columns: INSTANCE, ADDRESS, PACKETS-RX, PACKETS-TX, ENTRIES
# INSTANCE ADDRESS PACKETS-RX PACKETS-TX ENTRIES
0 rip1 192.168.1.2 125 130 12

Check that RIP routes are in the routing table:

/ip/route/print where routing-table=main protocol=rip

Secure RIP with MD5 authentication:

Step 1: Create key chain

/routing/rip/keys/add chain=rip-auth key=secretkey123 key-id=1

Step 2: Apply to interface template

/routing/rip/interface-template/add instance=rip1 interfaces=ether2 key-chain=rip-auth

Both routers must have identical key configuration.

For environments not requiring strong security:

/routing/rip/interface-template/add instance=rip1 interfaces=ether2 password=simplepass

Receive RIP routes without advertising:

/routing/rip/interface-template/add instance=rip1 interfaces=ether1 mode=passive

Use case: Receiving routes from an upstream ISP without advertising your networks.

Advertise a default route to RIP neighbors:

/routing/rip/instance/set rip1 originate-default=always

Options:

  • never: Don’t originate default (default)
  • always: Always advertise default
  • if-installed: Only if default route exists in routing table

Control which routes are advertised:

Step 1: Create output filter

/routing/filter/rule/add chain=rip-out rule="if (dst in 192.168.0.0/16 && dst-len>=16 && dst-len<=24) { accept }"
/routing/filter/rule/add chain=rip-out rule="reject"

Step 2: Apply to instance

/routing/rip/instance/set rip1 out-filter-chain=rip-out

Do not use protocol rip in filter rules when filtering redistributed connected/static routes. This only matches routes learned from other RIP speakers.

When multicast doesn’t work (filtered switches, tunnels):

/routing/rip/static-neighbor/add instance=rip1 address=192.168.1.2

Configure RIP for IPv6:

/routing/rip/instance/add name=ripng afi=ipv6 redistribute=connected
/routing/rip/interface-template/add instance=ripng interfaces=ether2

Customize update and timeout intervals:

/routing/rip/instance/set rip1 update-interval=15s route-timeout=90s route-gc-timeout=60s

Default timers:

  • update-interval: 30s (sends updates)
  • route-timeout: 180s (marks route invalid)
  • route-gc-timeout: 120s (removes invalid route)

For better loop prevention:

/routing/rip/interface-template/set [find instance=rip1] split-horizon=yes poison-reverse=yes
  • Split-horizon: Don’t advertise routes back to the learning interface
  • Poison-reverse: Advertise learned routes back with metric 16 (unreachable)

Add metric to routes learned on an interface:

/routing/rip/interface-template/set [find interfaces=ether3] cost=5

Routes learned via ether3 will have 5 added to their metric.

Confirm RIP is working correctly:

/routing/rip/instance/print

Expected: Instance with redistribute settings.

/routing/rip/interface-template/print

Expected: Templates with interfaces defined.

/routing/rip/interface/print

Expected: Interfaces running RIP.

/routing/rip/neighbor/print

Expected: Neighbor addresses with packet counts.

/ip/route/print where protocol=rip

Expected: Routes with rip protocol.

/routing/rip/neighbor/print

Look at packets-bad and entries-bad columns for authentication issues.

SymptomCauseSolution
No routes advertisedredistribute not setAdd redistribute=connected,static to instance
Routes received but inactiveFirmware bug or gateway unreachableReboot router; verify gateway connectivity
No neighbors discoveredFirewall blocking UDP 520 or multicastAllow UDP 520; check multicast 224.0.0.9
Routes exceed 15 hopsNetwork too large for RIPUse OSPF instead; reduce network diameter
Output filter blocking routesUsing protocol rip in filterRemove protocol matcher; filter by destination only
Authentication failuresKey mismatchVerify identical key-chain on both routers
Passive mode not receivingInterface not in templateAdd interface to template with mode=passive
v7 neighbor not showingNeighbors show only when exchanging routesWait for updates; check interface templates
/system/logging/add topics=rip,!raw action=memory
/log/print where topics~"rip"
/routing/rip/neighbor/print

Increasing packets-bad indicates authentication or protocol issues.

/tool/ping 224.0.0.9 interface=ether2 count=3

If multicast fails, use static neighbors.

Common Mistakes

  • Forgetting redistribute - v7 requires explicit redistribution; adding interfaces alone isn’t enough
  • Using protocol rip in filters - This only matches RIP-learned routes, not redistributed connected/static
  • Subnet mismatch - Both routers must have interfaces in the same subnet for RIP to work
  • Missing interface-template - Without it, the interface doesn’t join multicast group 224.0.0.9
  • Network too large - RIP cannot handle networks with more than 15 hops; use OSPF
TimerDefaultPurpose
update-interval30sSend routing updates
route-timeout180sMark route invalid if no updates
route-gc-timeout120sRemove invalid route from table

Convergence time = route-timeout + route-gc-timeout = 5 minutes by default.

  • OSPF - preferred for larger networks
  • BGP - external routing protocol
  • Static Routes - can be redistributed into RIP
CommandDescription
/routing/rip/instance/addCreate RIP instance
/routing/rip/instance/printView instances
/routing/rip/interface-template/addAdd interfaces to RIP
/routing/rip/interface/printView active interfaces
/routing/rip/neighbor/printView discovered neighbors
/routing/rip/static-neighbor/addAdd unicast neighbor
/routing/rip/keys/addCreate authentication key
PropertyTypeDefaultDescription
namestring-Instance identifier
vrfstringmainVRF for this instance
afiipv4/ipv6ipv4Address family
redistributelist-Sources: connected, static, ospf, bgp
originate-defaultenumneverAdvertise default route
update-intervaltime30sRoute update interval
route-timeouttime180sRoute invalidation timeout
route-gc-timeouttime120sGarbage collection timeout
in-filter-chainstring-Input routing filter
out-filter-chainstring-Output routing filter
PropertyTypeDefaultDescription
instancestring-Associated RIP instance
interfacesstring-Interface patterns
costinteger1Metric added to routes (1-15)
split-horizonyes/noyesEnable split-horizon
poison-reverseyes/nonoEnable poison-reverse
modeenum-passive = receive only
key-chainstring-MD5 authentication key chain
passwordstring-Plain-text authentication
PropertyTypeDefaultDescription
chainstring-Key chain name
keystring-MD5 secret (max 16 chars)
key-idinteger-Key identifier (0-255)
valid-fromdatetime-Key activation time
valid-tilldatetime-Key expiration time
LimitationValue
Maximum hop count15
Unreachable metric16 (infinity)
RIPv1 supportNot supported
Route summarizationNot supported
Default update interval30 seconds
Typical convergence3-5 minutes