Включение RIP
Этот пример демонстрирует минимальную конфигурацию, необходимую для включения RIP на интерфейсе. SW1 и SW2 — это два маршрутизатора, подключенные к сети 10.10.11.0/24. SW1 и SW2 также подключены к сетям 10.10.10.0/24 и 10.10.12.0/24 соответственно. Чтобы включить RIP, сначала определите процесс маршрутизации RIP, затем свяжите сеть с процессом маршрутизации.
Топология
Рисунок 2-54: Топология для включения RIP
SW1
#configure terminal | Перейти в режим конфигурации. |
(config)#router rip | Определить процесс маршрутизации RIP и перейти в режим маршрутизатора. |
(config-router)#network 10.10.10.0/24 (config-router)#network 10.10.11.0/24 | Связать сети с процессом RIP. |
SW2
#configure terminal | Перейти в режим конфигурации. |
(config)#router rip | Определить процесс маршрутизации RIP и перейти в режим маршрутизатора. |
(config-router)#network 10.10.11.0/24 (config-router)#network 10.10.12.0/24 | Связать сети с процессом RIP. |
Проверка
show ip rip, show running-config, show ip protocols rip, show ip rip interface, show ip route
SW1
#show 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.10.0/24 1 eth1
Rc 10.10.11.0/24 1 eth2
#show running-config
!
no service password-encryption
!
hostname rtr1
!
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.10.10/24
!
interface eth2
ip address 10.10.11.10/24
!
router rip
network 10.10.10.0/24 network 10.10.11.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 14 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 2 2
eth2 2 2
Routing for Networks:
10.10.10.0/24
10.10.11.0/24
Routing Information Sources:
Gateway Distance Last Update Bad Packets Bad Routes
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 RIP packets
Send RIP packets
Passive interface: Disabled
Split horizon: Enabled with Poisoned Reversed
IP interface address: 10.10.11.10/24
eth1 is up, line protocol is up
Routing Protocol: RIP
Receive RIP packets
Send RIP packets
Passive interface: Disabled
Split horizon: Enabled with Poisoned Reversed
IP interface address: 10.10.10.10/24
eth0 is up, line protocol is up
RIP is not enabled on this interface lo is up, line protocol is up
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.10.0/24 is directly connected, eth1
C 10.10.11.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
SW2
#show 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
2#show running-config
!
no service password-encryption
!
hostname rtr2
!
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.3/32 secondary
ipv6 address ::1/128
!
interface eth0
ip address 10.12.4.183/24
!
interface eth1
ip address 10.10.11.50/24
!
interface eth2
ip address 10.10.12.10/24
!
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 5 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 2 2
eth2 2 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
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 RIP packets
Send RIP 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 RIP packets
Send RIP packets
Passive interface: Disabled
Split horizon: Enabled with Poisoned Reversed
IP interface address: 10.10.11.50/24
eth0 is up, line protocol is up
RIP is not enabled on this interface lo is up, line protocol is up
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.3/32 is directly connected, lo