Перейти к основному содержимому

Указание версии RIP

Настройте маршрутизатор для приема и отправки определенных версий пакетов на интерфейсе. В этом примере маршрутизатор SW2 настроен для приема и отправки информации RIP версии 1 и версии 2 на обоих интерфейсах eth1 и eth2.

Топология

Image

Рисунок 2-55: Топология RIP версии

SW2

#configure terminalПерейти в режим конфигурации
(config)#router ripВключить процесс маршрутизации RIP
(config-router)#exitВыйти из режима маршрутизатора
(config)#interface eth1Перейти в режим интерфейса
(config-if)#ip rip send version 1 2Отправлять пакеты RIP версии 1 и версии 2 через этот интерфейс
(config-if)#ip rip receive version 1 2Принимать пакеты RIP версии 1 и версии 2 через этот интерфейс
(config-if)#exitВыйти из режима интерфейса
(config)#interface eth2Перейти в режим интерфейса
(config-if)#ip rip send version 1 2Отправлять пакеты RIP версии 1 и версии 2 через этот интерфейс
(config-if)#ip rip receive version 1 2Принимать пакеты RIP версии 1 и версии 2 через этот интерфейс
Проверка

SW2

#sh ip rip
Codes: R - RIP, Rc - RIP connected, Rs - RIP static, K - Kernel,
C - Connected, S - Static, O - OSPF, I - IS-IS, B - BGP,
X - Default
Network            Next Hop         Metric From            If     Time
Rc 10.10.11.0/24                            1                 eth1
Rc 10.10.12.0/24                            1                 eth2
#sh running-config
!
no service password-encryption
!
logging monitor 7
!
ip vrf management
!
ip domain-lookup
spanning-tree mode provider-rstp
data-center-bridging enable
feature telnet
feature ssh
no feature tacacs+
snmp-server view all .1 included
ntp enable sFlow disable
software-watchdog keep-alive-time 30
!
ip pim register-rp-reachability
!
interface lo
mtu 65536
ip address 127.0.0.1/8
ip address 192.168.0.2/32 secondary
ipv6 address ::1/128
!
interface eth0
ip address 10.12.4.108/24
!
interface eth1
ip address 10.10.11.50/24
ip rip send version 1 2
ip rip receive version 1 2
!
interface eth2
ip address 10.10.12.10/24
ip rip send version 1 2
ip rip receive version 1 2
!
router rip
network 10.10.11.0/24
network 10.10.12.0/24
!
line con 0
login line vty 0 39
login
!
end
#show ip protocols rip
RIP Database for VRF (default)
Routing Protocol is "rip"
Sending updates every 30 seconds with +/-50%, next due in 29 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing:
Default version control: send version 2, receive version 2
Interface        Send  Recv   Key-chain
eth1             1 2   1 2
eth2             1 2   1 2
Routing for Networks:
10.10.11.0/24
10.10.12.0/24
Routing Information Sources:
Gateway          Distance  Last Update  Bad Packets  Bad Routes
10.10.11.10           120  00:00:31               0           0
10.10.12.50           120  00:00:08               0           0
Number of routes (including connected): 2
Distance: (default is 120)
#show ip rip interface
svlan0.1 is down, line protocol is down
RIP is not enabled on this interface eth2 is up, line protocol is up
Routing Protocol: RIP
Receive RIPv1 and RIPv2 packets
Send RIPv1 and RIPv2 packets
Passive interface: Disabled
Split horizon: Enabled with Poisoned Reversed
IP interface address:       10.10.12.10/24
eth1 is up, line protocol is up
Routing Protocol: RIP
Receive RIPv1 and RIPv2 packets
Send RIPv1 and RIPv2 packets
Passive interface: Disabled
Split horizon: Enabled with Poisoned Reversed
IP interface address:       10.10.11.50/24
eth0 is up, line protocol is down
RIP is not enabled on this interface lo is up, line protocol is down
RIP is not enabled on this interface
#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
IP Route Table for VRF "default"
Gateway of last resort is 10.12.4.1 to network 0.0.0.0
K*      0.0.0.0/0 [0/0] via 10.12.4.1, eth0
C       10.10.11.0/24 is directly connected, eth1
C       10.10.12.0/24 is directly connected, eth2
C       10.12.4.0/24 is directly connected, eth0 C       127.0.0.0/8 is directly connected, lo
C       192.168.0.2/32 is directly connected, lo