RIP - Routing Information Protocol
RIP (Routing Information Protocol) - один из старейших протоколов динамической маршрутизации, использующий алгоритм distance-vector.
Обзор
RIP - простой протокол маршрутизации, подходящий для небольших сетей с предсказуемой топологией.
Характеристики RIP
Основные параметры:
- Distance-vector алгоритм (Bellman-Ford)
- Метрика - hop count (количество роутеров до сети)
- Максимум 15 hops (16 = unreachable)
- Периодические обновления каждые 30 секунд
- Split horizon и poison reverse для предотвращения петель
Версии протокола:
- RIPv1 (RFC 1058) - classful, без VLSM, broadcast обновления
- RIPv2 (RFC 2453) - classless, VLSM, CIDR, multicast (224.0.0.9), authentication
- RIPng (RFC 2080) - для IPv6 сетей, multicast (FF02::9)
Когда использовать RIP
Подходит для:
- Малые сети (до 15 роутеров)
- Простые топологии (без резервирования)
- Legacy оборудование
- Учебные лаборатории
- Временные тестовые сети
Не подходит для:
- Крупные enterprise сети
- Сети с резервными путями
- Высоконагруженные сети
- Сети требующие быструю конвергенцию
Ограничения RIP
- Hop count limit - максимум 15 роутеров
- Медленная конвергенция - до 3 минут
- Периодические обновления - создают постоянный трафик
- Простая метрика - не учитывает bandwidth, latency
- Нет поддержки VLSM в RIPv1
RIPv2 Configuration
VyOS поддерживает RIPv2 по умолчанию.
Базовая настройка
Минимальная конфигурация:
set protocols rip interface eth0
set protocols rip interface eth1
set protocols rip network 192.168.1.0/24
set protocols rip network 192.168.2.0/24
commit
saveNetwork statement:
set protocols rip network 10.0.0.0/8
set protocols rip network 172.16.0.0/12
set protocols rip network 192.168.0.0/16
commitNetwork statement включает все интерфейсы с IP из указанных сетей в RIP процесс.
Interface Configuration
Включить RIP на интерфейсе:
set protocols rip interface eth0
set protocols rip interface eth1
commitExclude интерфейс:
delete protocols rip interface eth2
commitRIP Version
Установить версию RIP:
set protocols rip version 2
commitПо умолчанию VyOS использует RIPv2.
Neighbor Configuration
Unicast neighbor (вместо multicast):
set protocols rip neighbor 192.168.1.2
set protocols rip neighbor 192.168.2.2
commitПолезно для:
- Point-to-point links
- Сети где multicast недоступен
- VPN туннели
Passive Interface
Интерфейс анонсирует свою сеть, но не отправляет RIP updates.
Per-interface:
set protocols rip interface eth2 passive
commitAll interfaces passive by default:
set protocols rip passive-interface default
commitЗатем активировать нужные:
set protocols rip passive-interface eth0 disable
set protocols rip passive-interface eth1 disable
commitРекомендация: Используйте passive для LAN интерфейсов без RIP neighbors.
Authentication
Защита от несанкционированных RIP обновлений.
Plaintext Authentication
Не рекомендуется (пароль передается в открытом виде):
set interfaces ethernet eth0 ip rip authentication plaintext-password 'MyPassword'
commitИспользуйте только для совместимости с legacy устройствами.
MD5 Authentication
Рекомендуется:
set interfaces ethernet eth0 ip rip authentication md5 1 password 'SecureRIPPassword123!'
commitKey ID (1-255) позволяет плавную смену паролей:
# Старый ключ
set interfaces ethernet eth0 ip rip authentication md5 1 password 'OldPassword'
# Добавить новый ключ
set interfaces ethernet eth0 ip rip authentication md5 2 password 'NewPassword'
commit
# После обновления всех роутеров, удалить старый
delete interfaces ethernet eth0 ip rip authentication md5 1
commitВажно: Authentication должна совпадать на всех соседних роутерах.
Authentication Example
Router 1:
set interfaces ethernet eth1 ip rip authentication md5 1 password 'RIP-Secure-2024'
commitRouter 2:
set interfaces ethernet eth1 ip rip authentication md5 1 password 'RIP-Secure-2024'
commitSplit Horizon
Механизм предотвращения routing loops.
Default Split Horizon
По умолчанию включен:
# Роутер не анонсирует маршруты обратно через интерфейс, откуда их получилDisable Split Horizon
set interfaces ethernet eth0 ip rip split-horizon disable
commitКогда отключать:
- Hub-and-spoke топологии
- Frame Relay NBMA сети
- Некоторые VPN конфигурации
Poison Reverse
Агрессивная версия split horizon:
set interfaces ethernet eth0 ip rip split-horizon poison-reverse
commitАнонсирует маршруты обратно с метрикой 16 (unreachable).
Когда использовать:
- Faster convergence при отказах
- Явное указание на недоступность маршрута
Timers
Управление RIP timers для конвергенции.
Update Timer
Интервал отправки RIP updates:
set protocols rip timers update 30
commitПо умолчанию: 30 секунд.
Меньшее значение:
- Faster convergence
- Больше трафика
- Выше CPU usage
Timeout Timer
Время ожидания обновления от neighbor:
set protocols rip timers timeout 180
commitПо умолчанию: 180 секунд (6x update timer).
После timeout маршрут помечается unreachable (metric 16).
Garbage Collection Timer
Время до удаления unreachable маршрута:
set protocols rip timers garbage-collection 120
commitПо умолчанию: 120 секунд.
Timers Configuration Example
set protocols rip timers update 30
set protocols rip timers timeout 180
set protocols rip timers garbage-collection 120
commit
saveAggressive timers (для быстрой конвергенции):
set protocols rip timers update 10
set protocols rip timers timeout 60
set protocols rip timers garbage-collection 40
commitОсторожно: Более короткие timers увеличивают нагрузку на сеть и CPU.
Route Redistribution
Импорт маршрутов из других источников в RIP.
Redistribute Connected
Анонсировать directly connected сети:
set protocols rip redistribute connected
commitС метрикой:
set protocols rip redistribute connected metric 2
commitRedistribute Static
Анонсировать static routes:
set protocols rip redistribute static
commitС метрикой:
set protocols rip redistribute static metric 3
commitRedistribute OSPF
Импорт OSPF маршрутов в RIP:
set protocols rip redistribute ospf
commitС метрикой:
set protocols rip redistribute ospf metric 5
commitRedistribute BGP
Импорт BGP маршрутов:
set protocols rip redistribute bgp
commitОсторожно: BGP full table (900K+ routes) не подходит для RIP (limit 15 hops).
Redistribute Kernel
Kernel routes (e.g., from DHCP):
set protocols rip redistribute kernel
commitRoute-map для Selective Redistribution
Создать route-map:
set policy route-map STATIC-TO-RIP rule 10 action permit
set policy route-map STATIC-TO-RIP rule 10 match ip address prefix-list ALLOWED-NETWORKS
set policy prefix-list ALLOWED-NETWORKS rule 10 action permit
set policy prefix-list ALLOWED-NETWORKS rule 10 prefix 192.168.0.0/16 le 24
commitПрименить к redistribution:
set protocols rip redistribute static route-map STATIC-TO-RIP
commitMetric для Redistribution
По умолчанию: metric 1 (для всех redistributed routes).
Установить custom metric:
set protocols rip redistribute connected metric 2
set protocols rip redistribute static metric 3
set protocols rip redistribute ospf metric 5
commitDefault Information Originate
Анонс default route (0.0.0.0/0) в RIP.
Basic Default Route
set protocols rip default-information originate
commitАнонсирует default route только если она существует в routing table.
Создать static default route:
set protocols static route 0.0.0.0/0 next-hop 203.0.113.1
commitAlways Originate
Анонсировать default route всегда (даже если нет в routing table):
set protocols rip default-information originate always
commitDefault Route Example
Internet Gateway Router:
# Static default route к ISP
set protocols static route 0.0.0.0/0 next-hop 198.51.100.1
# Анонсировать в RIP
set protocols rip default-information originate
commit
saveBranch routers получат default route автоматически.
Distance (Administrative Distance)
Приоритет RIP маршрутов относительно других протоколов.
Default Distance
RIP default distance: 120 (выше чем OSPF 110, ниже чем eBGP 20).
Change RIP Distance
set protocols rip distance 130
commitМеньшее значение - выше приоритет:
- Connected: 0
- Static: 1
- eBGP: 20
- OSPF: 110
- RIP: 120
- iBGP: 200
Network-specific Distance
set protocols rip network-distance 192.168.10.0/24 distance 90
commitДля конкретной сети установить custom distance.
Distance Example
# Prefer OSPF over RIP
set protocols ospf distance global 110
set protocols rip distance 120
# Except для specific network - prefer RIP
set protocols rip network-distance 10.10.0.0/16 distance 80
commitAccess List (Distribute List)
Фильтрация RIP routes.
Inbound Filter
Фильтровать входящие updates:
set policy access-list 10 rule 10 action permit
set policy access-list 10 rule 10 source any
set policy access-list 10 rule 10 destination 192.168.0.0/16
set protocols rip distribute-list interface eth0 access-list in 10
commitПринимать только маршруты из 192.168.0.0/16.
Outbound Filter
Фильтровать исходящие updates:
set policy access-list 20 rule 10 action deny
set policy access-list 20 rule 10 source any
set policy access-list 20 rule 10 destination 10.0.0.0/8
set policy access-list 20 rule 20 action permit
set policy access-list 20 rule 20 source any
set policy access-list 20 rule 20 destination any
set protocols rip distribute-list interface eth1 access-list out 20
commitНе анонсировать 10.0.0.0/8, анонсировать всё остальное.
Prefix-list Filter
Более гибкая фильтрация:
set policy prefix-list ALLOWED-IN rule 10 action permit
set policy prefix-list ALLOWED-IN rule 10 prefix 192.168.0.0/16 le 24
set protocols rip distribute-list interface eth0 prefix-list in ALLOWED-IN
commitПринимать 192.168.0.0/16 и все подсети до /24.
RIPng (IPv6)
RIPng - RIP для IPv6 сетей.
RIPng Overview
Характеристики:
- Distance-vector для IPv6
- Multicast FF02::9
- UDP port 521 (vs 520 для RIPv2)
- Аналогичная логика RIPv2
- Hop count limit 15
Применение:
- Малые IPv6 сети
- Legacy IPv6 routing (современные сети используют OSPFv3/BGP)
RIPng Basic Configuration
Router 1:
set protocols ripng interface eth0
set protocols ripng interface eth1
set protocols ripng network 2001:db8:1::/64
set protocols ripng network 2001:db8:2::/64
commit
saveRouter 2:
set protocols ripng interface eth0
set protocols ripng interface eth2
set protocols ripng network 2001:db8:1::/64
set protocols ripng network 2001:db8:3::/64
commit
saveRIPng Timers
set protocols ripng timers update 30
set protocols ripng timers timeout 180
set protocols ripng timers garbage-collection 120
commitRIPng Redistribution
Connected networks:
set protocols ripng redistribute connected
commitStatic routes:
set protocols ripng redistribute static
commitOSPFv3:
set protocols ripng redistribute ospfv3
commitRIPng Default Route
set protocols ripng default-information originate
commitRIPng Aggregate Address
Суммирование IPv6 префиксов:
set protocols ripng aggregate-address 2001:db8::/32
commitRIPng Passive Interface
set protocols ripng interface eth2 passive
commitRIPng Split Horizon
set interfaces ethernet eth0 ipv6 ripng split-horizon disable
commitPoison reverse:
set interfaces ethernet eth0 ipv6 ripng split-horizon poison-reverse
commitConfiguration Examples
Simple Two-Router RIP Network
Топология:
[Router1: eth0 192.168.1.1/24] --- [eth1 10.0.0.1/30 - 10.0.0.2/30 eth1] --- [Router2: eth0 192.168.2.1/24]Router 1:
# Interfaces
set interfaces ethernet eth0 address 192.168.1.1/24
set interfaces ethernet eth1 address 10.0.0.1/30
# RIP
set protocols rip interface eth0
set protocols rip interface eth1
set protocols rip network 192.168.1.0/24
set protocols rip network 10.0.0.0/30
# Authentication
set interfaces ethernet eth1 ip rip authentication md5 1 password 'RipSecure2024!'
# Passive на LAN
set protocols rip interface eth0 passive
commit
saveRouter 2:
# Interfaces
set interfaces ethernet eth0 address 192.168.2.1/24
set interfaces ethernet eth1 address 10.0.0.2/30
# RIP
set protocols rip interface eth0
set protocols rip interface eth1
set protocols rip network 192.168.2.0/24
set protocols rip network 10.0.0.0/30
# Authentication
set interfaces ethernet eth1 ip rip authentication md5 1 password 'RipSecure2024!'
# Passive на LAN
set protocols rip interface eth0 passive
commit
saveRIP with Default Route
Internet Gateway Router:
# WAN interface
set interfaces ethernet eth0 address dhcp
# LAN interface
set interfaces ethernet eth1 address 192.168.1.1/24
# Static default route
set protocols static route 0.0.0.0/0 dhcp-interface eth0
# RIP
set protocols rip interface eth1
set protocols rip network 192.168.1.0/24
# Originate default
set protocols rip default-information originate
# Passive на LAN
set protocols rip interface eth1 passive
commit
saveBranch Router:
# WAN к gateway
set interfaces ethernet eth0 address 192.168.1.2/24
# LAN
set interfaces ethernet eth1 address 192.168.10.1/24
# RIP
set protocols rip interface eth0
set protocols rip interface eth1
set protocols rip network 192.168.1.0/24
set protocols rip network 192.168.10.0/24
set protocols rip interface eth1 passive
commit
saveRIP Redistribution Example
Core Router (RIP + OSPF):
# Interfaces
set interfaces ethernet eth0 address 192.168.1.1/24
set interfaces ethernet eth1 address 10.0.0.1/30
# RIP domain
set protocols rip interface eth0
set protocols rip network 192.168.1.0/24
# OSPF domain
set protocols ospf parameters router-id 10.0.0.1
set protocols ospf interface eth1 area 0
set protocols ospf area 0 network 10.0.0.0/30
# Redistribute RIP в OSPF
set protocols ospf redistribute rip metric 100 metric-type 2
# Redistribute OSPF в RIP
set protocols rip redistribute ospf metric 5
commit
saveОсторожно: Возможны routing loops при двусторонней redistribution. Используйте route-maps.
RIP через VPN (VTI)
Site A:
# VTI tunnel
set interfaces vti vti0 address 172.16.0.1/30
# IPsec VPN (настроить отдельно)
# RIP через VTI
set protocols rip interface vti0
set protocols rip network 172.16.0.0/30
set protocols rip network 192.168.1.0/24
# Authentication
set interfaces vti vti0 ip rip authentication md5 1 password 'VPN-RIP-Pass'
# LAN interface
set interfaces ethernet eth1 address 192.168.1.1/24
set protocols rip interface eth1 passive
commit
saveSite B:
# VTI tunnel
set interfaces vti vti0 address 172.16.0.2/30
# RIP через VTI
set protocols rip interface vti0
set protocols rip network 172.16.0.0/30
set protocols rip network 192.168.2.0/24
# Authentication
set interfaces vti vti0 ip rip authentication md5 1 password 'VPN-RIP-Pass'
# LAN interface
set interfaces ethernet eth1 address 192.168.2.1/24
set protocols rip interface eth1 passive
commit
saveRIP Filtering Example
HQ Router (анонсирует только internal сети):
# Prefix list для фильтрации
set policy prefix-list INTERNAL-ONLY rule 10 action permit
set policy prefix-list INTERNAL-ONLY rule 10 prefix 192.168.0.0/16 le 24
set policy prefix-list INTERNAL-ONLY rule 20 action permit
set policy prefix-list INTERNAL-ONLY rule 20 prefix 10.0.0.0/8 le 24
# Применить к RIP outbound
set protocols rip distribute-list interface eth1 prefix-list out INTERNAL-ONLY
# RIP configuration
set protocols rip network 192.168.0.0/16
set protocols rip network 10.0.0.0/8
commit
saveRIPng IPv6 Example
Router 1:
# IPv6 interfaces
set interfaces ethernet eth0 address 2001:db8:1::1/64
set interfaces ethernet eth1 address 2001:db8:100::1/64
# RIPng
set protocols ripng interface eth0
set protocols ripng interface eth1
set protocols ripng network 2001:db8:1::/64
set protocols ripng network 2001:db8:100::/64
# Passive на LAN
set protocols ripng interface eth0 passive
commit
saveRouter 2:
# IPv6 interfaces
set interfaces ethernet eth0 address 2001:db8:2::1/64
set interfaces ethernet eth1 address 2001:db8:100::2/64
# RIPng
set protocols ripng interface eth0
set protocols ripng interface eth1
set protocols ripng network 2001:db8:2::/64
set protocols ripng network 2001:db8:100::/64
# Passive на LAN
set protocols ripng interface eth0 passive
commit
saveYandex Cloud Example: Legacy Network Migration
Сценарий: Миграция legacy RIP сети в Yandex Cloud с постепенным переходом на OSPF.
Topology
Internet
|
[Yandex Cloud VPC]
|
[Gateway Router - RIP + OSPF]
|
+--+----------+----------+
| | |
[Legacy1] [Legacy2] [OSPF Zone]
(RIP) (RIP) (OSPF)Gateway Router Configuration
Gateway Router (dual protocol):
# External interface
set interfaces ethernet eth0 address 10.128.0.10/24
set protocols static route 0.0.0.0/0 next-hop 10.128.0.1
# RIP zone interface
set interfaces ethernet eth1 address 192.168.1.1/24
# OSPF zone interface
set interfaces ethernet eth2 address 10.10.0.1/24
# Loopback
set interfaces loopback lo address 10.255.255.1/32
# RIP configuration
set protocols rip interface eth1
set protocols rip network 192.168.1.0/24
# RIP authentication
set interfaces ethernet eth1 ip rip authentication md5 1 password 'YC-RIP-Legacy2024'
# RIP passive
set protocols rip interface eth1 passive disable
# Default route в RIP
set protocols rip default-information originate
# OSPF configuration
set protocols ospf parameters router-id 10.255.255.1
set protocols ospf interface eth2 area 0
set protocols ospf area 0 network 10.10.0.0/24
set protocols ospf area 0 network 10.255.255.1/32
# OSPF authentication
set protocols ospf interface eth2 authentication md5 key-id 1 md5-key 'YC-OSPF-Secure'
# Redistribute RIP в OSPF (controlled)
set policy prefix-list RIP-TO-OSPF rule 10 action permit
set policy prefix-list RIP-TO-OSPF rule 10 prefix 192.168.0.0/16 le 24
set policy route-map RIP-TO-OSPF rule 10 action permit
set policy route-map RIP-TO-OSPF rule 10 match ip address prefix-list RIP-TO-OSPF
set protocols ospf redistribute rip route-map RIP-TO-OSPF metric 100 metric-type 2
# Redistribute OSPF в RIP (controlled)
set policy prefix-list OSPF-TO-RIP rule 10 action permit
set policy prefix-list OSPF-TO-RIP rule 10 prefix 10.10.0.0/16 le 24
set policy route-map OSPF-TO-RIP rule 10 action permit
set policy route-map OSPF-TO-RIP rule 10 match ip address prefix-list OSPF-TO-RIP
set protocols rip redistribute ospf route-map OSPF-TO-RIP metric 3
commit
saveLegacy RIP Router
Legacy Router (только RIP):
# Management interface (Yandex Cloud)
set interfaces ethernet eth0 address dhcp
# LAN interface
set interfaces ethernet eth1 address 192.168.10.1/24
# Uplink к Gateway
set interfaces ethernet eth2 address 192.168.1.10/24
# RIP configuration
set protocols rip interface eth2
set protocols rip interface eth1
set protocols rip network 192.168.1.0/24
set protocols rip network 192.168.10.0/24
# Authentication
set interfaces ethernet eth2 ip rip authentication md5 1 password 'YC-RIP-Legacy2024'
# Passive на LAN
set protocols rip interface eth1 passive
commit
saveMigration Plan
Phase 1: Dual protocol на Gateway (текущее состояние).
Phase 2: Перенести legacy routers один за другим:
# На каждом legacy router
delete protocols rip
set protocols ospf parameters router-id 192.168.10.1
set protocols ospf interface eth2 area 0
set protocols ospf area 0 network 192.168.1.0/24
set protocols ospf interface eth2 authentication md5 key-id 1 md5-key 'YC-OSPF-Secure'
commitPhase 3: После миграции всех роутеров, удалить RIP с Gateway:
delete protocols rip
delete protocols ospf redistribute rip
commitVK Cloud Example: Small Office RIP Deployment
Сценарий: Простая малая офисная сеть на VK Cloud с RIP.
Topology
[VK Cloud VPC 10.0.0.0/16]
|
[Main Router]
10.0.1.1/24
|
+-----+-----+
| |
[Office1] [Office2]
10.0.2.1/24 10.0.3.1/24Main Router Configuration
Main Router:
# Interfaces
set interfaces ethernet eth0 address 10.0.1.1/24
set interfaces ethernet eth1 address 10.0.10.1/30
set interfaces ethernet eth2 address 10.0.10.5/30
# Internet via VK Cloud NAT
set protocols static route 0.0.0.0/0 next-hop 10.0.1.254
# RIP configuration
set protocols rip interface eth1
set protocols rip interface eth2
set protocols rip network 10.0.10.0/30
set protocols rip network 10.0.10.4/30
# Authentication для безопасности
set interfaces ethernet eth1 ip rip authentication md5 1 password 'VKCloud-RIP-2024'
set interfaces ethernet eth2 ip rip authentication md5 1 password 'VKCloud-RIP-2024'
# Default route в RIP для branch offices
set protocols rip default-information originate
# Timers (aggressive для малой сети)
set protocols rip timers update 15
set protocols rip timers timeout 90
set protocols rip timers garbage-collection 60
commit
saveOffice Router 1
# Interfaces
set interfaces ethernet eth0 address 10.0.2.1/24
set interfaces ethernet eth1 address 10.0.10.2/30
# RIP
set protocols rip interface eth0
set protocols rip interface eth1
set protocols rip network 10.0.2.0/24
set protocols rip network 10.0.10.0/30
# Authentication
set interfaces ethernet eth1 ip rip authentication md5 1 password 'VKCloud-RIP-2024'
# Passive на LAN
set protocols rip interface eth0 passive
# Timers (match main router)
set protocols rip timers update 15
set protocols rip timers timeout 90
set protocols rip timers garbage-collection 60
# NAT для выхода в интернет
set nat source rule 100 outbound-interface name eth1
set nat source rule 100 source address 10.0.2.0/24
set nat source rule 100 translation address masquerade
commit
saveOffice Router 2
# Interfaces
set interfaces ethernet eth0 address 10.0.3.1/24
set interfaces ethernet eth1 address 10.0.10.6/30
# RIP
set protocols rip interface eth0
set protocols rip interface eth1
set protocols rip network 10.0.3.0/24
set protocols rip network 10.0.10.4/30
# Authentication
set interfaces ethernet eth1 ip rip authentication md5 1 password 'VKCloud-RIP-2024'
# Passive на LAN
set protocols rip interface eth0 passive
# Timers
set protocols rip timers update 15
set protocols rip timers timeout 90
set protocols rip timers garbage-collection 60
# NAT
set nat source rule 100 outbound-interface name eth1
set nat source rule 100 source address 10.0.3.0/24
set nat source rule 100 translation address masquerade
commit
saveFirewall для RIP
На всех роутерах:
# Allow RIP multicast (224.0.0.9)
set firewall ipv4 input filter rule 100 action accept
set firewall ipv4 input filter rule 100 destination address 224.0.0.9
set firewall ipv4 input filter rule 100 protocol udp
set firewall ipv4 input filter rule 100 destination port 520
# Allow from specific interfaces only
set firewall ipv4 input filter rule 100 inbound-interface interface-name eth1
commitVerification Commands
Show RIP Status
Общий статус RIP:
show ip rip statusВывод:
Routing Protocol is "rip"
Sending updates every 30 seconds with +/-50%, next due in 18 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default redistribution metric is 1
Redistributing: connected, static
Default version control: send version 2, receive version 2
Interface Send Recv Key-chain
eth0 2 2
eth1 2 2
Routing for Networks:
192.168.1.0/24
192.168.2.0/24
10.0.0.0/8
Routing Information Sources:
Gateway BadPackets BadRoutes Distance Last Update
192.168.1.2 0 0 120 00:00:05
Distance: (default is 120)Show RIP Routes
RIP routing table:
show ip ripВывод:
Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP
> - selected route, * - FIB route
R>* 192.168.2.0/24 [120/1] via 192.168.1.2, eth0, 00:00:15
R>* 192.168.3.0/24 [120/2] via 192.168.1.2, eth0, 00:00:15
R>* 10.10.0.0/24 [120/1] via 192.168.1.2, eth0, 00:00:15Show RIP Database
RIP database entries:
show ip protocolsИнформация о всех routing protocols включая RIP.
Show IP Route
Все маршруты (включая RIP):
show ip routeТолько RIP маршруты:
show ip route ripВывод:
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
R>* 192.168.2.0/24 [120/1] via 192.168.1.2, eth0, weight 1, 00:02:15
R>* 192.168.3.0/24 [120/2] via 192.168.1.2, eth0, weight 1, 00:02:15Show RIP Interface
RIP на интерфейсах:
show ip rip interfaceDebug RIP
Enable RIP debugging:
monitor protocol ripRIP packet debug:
debug rip packetRIP events:
debug rip eventsОстановить debug:
no debug rip allClear RIP Routes
Clear RIP process (restart):
restart ripУдаляет все learned routes и перезапускает RIP процесс.
Troubleshooting
RIP Neighbors не видны
Проверка 1 - Connectivity:
ping <neighbor-ip>Проверка 2 - RIP процесс активен:
show ip rip statusПроверка 3 - Network statements:
show configuration protocols ripУбедитесь, что интерфейсы включены в RIP:
set protocols rip interface eth0
set protocols rip network 192.168.1.0/24Проверка 4 - Authentication:
show configuration interfaces ethernet eth0 ip rip authenticationAuthentication должна совпадать на обоих роутерах.
Проверка 5 - Firewall:
# Allow RIP (UDP 520)
set firewall ipv4 input filter rule 100 action accept
set firewall ipv4 input filter rule 100 destination address 224.0.0.9
set firewall ipv4 input filter rule 100 protocol udp
set firewall ipv4 input filter rule 100 destination port 520
commitПроверка 6 - Multicast:
tcpdump -i eth0 -n 'udp port 520'Должны видеть RIP updates каждые 30 секунд.
Routes не появляются
Проверка 1 - RIP database:
show ip ripМаршрут есть в RIP, но не в routing table?
Проверка 2 - Administrative Distance:
show ip route <network>Возможно другой протокол (OSPF, static) имеет лучший distance.
Проверка 3 - Hop count:
show ip ripЕсли metric 16 - маршрут unreachable (слишком далеко).
Проверка 4 - Split horizon:
set interfaces ethernet eth0 ip rip split-horizon disable
commitПопробуйте отключить split horizon (для hub-and-spoke).
Проверка 5 - Distribute list:
show configuration protocols rip distribute-listВозможно route filter блокирует маршрут.
Slow Convergence
RIP convergence медленная (до 3 минут).
Решение 1 - Aggressive timers:
set protocols rip timers update 10
set protocols rip timers timeout 60
set protocols rip timers garbage-collection 40
commitОсторожно: Увеличивает нагрузку на сеть.
Решение 2 - Poison reverse:
set interfaces ethernet eth0 ip rip split-horizon poison-reverse
commitРешение 3 - Migrate to OSPF:
RIP не подходит для сетей требующих быструю конвергенцию. Используйте OSPF.
Authentication Failures
Проверка 1 - Logs:
show log | grep RIPИщите “authentication failed” сообщения.
Проверка 2 - Passwords match:
# Router 1
show configuration interfaces ethernet eth0 ip rip authentication
# Router 2
show configuration interfaces ethernet eth0 ip rip authenticationПароли и key-id должны совпадать.
Проверка 3 - Key rotation:
Если меняете пароли, добавьте новый key ID перед удалением старого:
# Добавить новый
set interfaces ethernet eth0 ip rip authentication md5 2 password 'NewPassword'
commit
# После обновления всех роутеров, удалить старый
delete interfaces ethernet eth0 ip rip authentication md5 1
commitRouting Loops
Проблема: Пакеты ходят по кругу между роутерами.
Решение 1 - Split horizon:
# Убедитесь, что split horizon включен (по умолчанию)
delete interfaces ethernet eth0 ip rip split-horizon disable
commitРешение 2 - Maximum hop count:
RIP автоматически ограничивает loops через hop count (max 15).
Решение 3 - Administrative distance:
Если используете redistribution между RIP и другими протоколами:
set protocols rip distance 120
set protocols ospf distance global 110
commitHigh Network Traffic
RIP создает постоянный трафик (updates каждые 30 сек).
Решение 1 - Passive interfaces:
set protocols rip interface eth2 passive
commitРешение 2 - Unicast neighbors:
set protocols rip neighbor 192.168.1.2
delete protocols rip interface eth0
commitРешение 3 - Increase update interval:
set protocols rip timers update 60
commitОсторожно: Замедляет конвергенцию.
Решение 4 - Migrate to OSPF:
OSPF использует triggered updates вместо periodic.
Best Practices
General Recommendations
Use RIPv2 (не RIPv1):
set protocols rip version 2MD5 Authentication на всех интерфейсах:
set interfaces ethernet eth0 ip rip authentication md5 1 password 'StrongPassword'Passive interfaces для LAN:
set protocols rip interface eth1 passiveLimit network size - максимум 10-15 роутеров
Use default route на branch routers:
set protocols rip default-information originateFilter redistributed routes:
set protocols rip redistribute connected route-map CONNECTED-FILTERMonitor hop count - не допускайте близости к 15
Document network topology - RIP не имеет database visibility
Plan migration to OSPF для growing networks
Regular backups конфигурации
Security Best Practices
Always use MD5 authentication:
set interfaces ethernet eth0 ip rip authentication md5 1 password 'Secure123!'Passive interfaces по умолчанию:
set protocols rip passive-interface default set protocols rip passive-interface eth0 disableFirewall для RIP:
set firewall ipv4 input filter rule 100 action accept set firewall ipv4 input filter rule 100 source address 192.168.1.0/24 set firewall ipv4 input filter rule 100 destination address 224.0.0.9 set firewall ipv4 input filter rule 100 protocol udp set firewall ipv4 input filter rule 100 destination port 520Filter redistributed routes:
set protocols rip distribute-list interface eth0 prefix-list ALLOWED-OUT outLimit network statements - только нужные сети
Performance Best Practices
Default timers для большинства случаев:
set protocols rip timers update 30 set protocols rip timers timeout 180 set protocols rip timers garbage-collection 120Poison reverse для faster convergence:
set interfaces ethernet eth0 ip rip split-horizon poison-reverseSummarization где возможно (хотя RIPv2 не имеет explicit summarization)
Unicast neighbors для reducing multicast:
set protocols rip neighbor 192.168.1.2Monitor metrics:
show ip rip
Migration Best Practices
From RIP to OSPF:
Dual protocol phase:
# Keep RIP running set protocols rip network 192.168.0.0/16 # Add OSPF set protocols ospf parameters router-id 10.0.0.1 set protocols ospf area 0 network 10.0.0.0/8 # Redistribute both ways (temporary) set protocols rip redistribute ospf metric 5 set protocols ospf redistribute rip metric 100Migrate routers one by one
Remove RIP after all migrated:
delete protocols rip delete protocols ospf redistribute rip
From RIP to static routes (small networks):
Document current RIP routes:
show ip ripCreate static routes:
set protocols static route 192.168.2.0/24 next-hop 192.168.1.2Disable RIP:
delete protocols rip
When to Migrate from RIP
Signs You Need OSPF/BGP
- Network growth - more than 10 routers
- Slow convergence - unacceptable downtime
- Multiple paths - need load balancing
- VLSMs required - complex subnetting
- Hop count limit - hitting 15 hop barrier
- High bandwidth links - need better metrics
- Large routing tables - RIP updates too big
- Require fast failover - seconds not minutes
- Integration with ISP - need BGP
- Security requirements - need better authentication
Migration Path
Small networks (2-5 routers):
RIP → Static RoutesMedium networks (5-20 routers):
RIP → OSPF (single area)Large networks (20+ routers):
RIP → OSPF (multi-area) → BGP for externalCloud deployments:
RIP → Cloud-native routing (VPC routing tables + BGP)Comparison with Other Protocols
RIP vs OSPF
| Feature | RIP | OSPF |
|---|---|---|
| Algorithm | Distance-vector | Link-state |
| Metric | Hop count | Cost (bandwidth) |
| Max hops | 15 | No limit |
| Convergence | Slow (minutes) | Fast (seconds) |
| Scalability | Small (10-15) | Large (100+) |
| CPU usage | Low | Medium |
| Configuration | Simple | Complex |
| Updates | Periodic (30s) | Triggered |
| VLSM | RIPv2 yes | Yes |
| Areas | No | Yes |
Recommendation: Use OSPF for any network with more than 10 routers.
RIP vs BGP
RIP - Interior Gateway Protocol (IGP) для internal routing.
BGP - Exterior Gateway Protocol (EGP) для inter-AS routing.
Use case:
- RIP - small internal networks
- BGP - ISP connectivity, multi-homed networks
RIP vs Static Routes
| Feature | RIP | Static Routes |
|---|---|---|
| Configuration | Automatic | Manual |
| Failover | Automatic | Manual or with tracking |
| Scalability | Low | Very low |
| Convergence | Slow | Instant (if tracked) |
| Maintenance | Low | High |
When to use static:
- 2-3 routers
- No redundancy needed
- Predictable topology
When to use RIP:
- 5-15 routers
- Some redundancy
- Simple failover needed
Summary
RIP Summary:
- Simple distance-vector protocol
- Suitable for small networks (5-15 routers)
- Maximum 15 hops
- Slow convergence (minutes)
- Use RIPv2 with MD5 authentication
- Passive interfaces on LAN
- Plan migration to OSPF as network grows
Key Commands:
# Enable RIP
set protocols rip interface <interface>
set protocols rip network <network>
# Authentication
set interfaces ethernet <int> ip rip authentication md5 <id> password '<pass>'
# Passive interface
set protocols rip interface <int> passive
# Default route
set protocols rip default-information originate
# Verification
show ip rip
show ip rip status
show ip route ripMigration Path:
Small network: RIP → Static Routes
Growing network: RIP → OSPF
Large network: RIP → OSPF + BGPNext Steps
- OSPF Configuration - для growing networks
- BGP Configuration - для ISP connectivity
- Static Routes - базовая маршрутизация
- Policy Routing - route-maps и filtering