Summary
This article is a study guide content RIP routing experiments HCNP R & S.
table of Contents
RIPv2 Basic Configuration
Silent-interface
RIP routing manually Summary
RIP packet authentication
An interface additional metric
Configure RIP to advertise a default route
RIP routing tag
Configuring RIP interface Unicast suppression update
content
RIPv2 Configuration Basics
Network topology
Configuration Requirements
RIPv2 configured such that the network entire network.
Configuration code
R1
interface GigabitEthernet 0/0/1
ip address 192.168.1.1 30
#
interface GigabitEthernet 0/0/2
ip address 172.16.1.0
#
rip 1
version 2
network 172.16.0.0
network 192.168.1.1
R2
interface GigabitEthernet 0/0/1
ip address 192.168.1.2 30
#
interface GigabitEthernet 0/0/2
ip address 192.168.1.4 30
#
rip 1
verison 2
network 192.168.1.0
R3
interface GigabitEthernet 0/0/1
ip address 192.168.1.6 30
#
interface GigabitEthernet 0/0/2
ip address 172.16.31.254
#
rip 1
version 2
network 192.168.1.0
network 172.16.31.0 24
Silent-Interface
Network topology
Configuration Requirements
Since R1 -> GigabitEthernet 0/0/1 interface terminal connected to the network, thus configuring the RIP packet network terminal is not propagated.
Configuration code
R1
interface GigabitEthernet 0/0/1
ip address 192.168.1.1 24
#
interface GigabitEthernet 0/0/2
ip address 192.168.12.1
#
rip 1
version 2
network 192.168.1.0
network 192.168.12.0
silent-interface GigabitEthernet 0/0/1
R2
interface GigabitEthernet 0/0/0
ip address 192.168.12.2 24
#
rip 1
version 2
network 192.168.12.0
RIP路由手动汇总
网络拓扑
配置要求
实现全网通并优化路由条目数量。
配置代码
R1
interface GigabitEthernet 0/0/1
ip address 192.168.1.1 30
rip summary-address 172.16.0.0 255.255.252.0
#
interface loopback0
ip address 172.16.0.1 24
#
interface loopback1
ip address 172.16.1.1 24
#
interface loopback2
ip address 172.16.2.1 24
#
interface loopback3
ip address 172.16.3.1 24
#
rip 1
version 2
network 192.168.1.0
network 172.16.0.0
R2
interface GigabitEthernet 0/0/1
ip address 192.168.1.6 30
rip summary-address 172.16.4.0 255.255.252.0
#
interface loopback0
ip address 172.16.4.1 24
#
interface loopback1
ip address 172.16.5.1 24
#
interface loopback2
ip address 172.16.6.1 24
#
interface loopback3
ip address 172.16.7.1 24
#
rip 1
version 2
network 192.168.1.0
network 172.16.0.0
CORE
interface GigabitEthernet 0/0/1
ip address 192.168.1.2 30
#
interface GigabitEthernet 0/0/2
ip address 192.168.1.5 30
#
rip 1
version 2
network 192.168.1.0
配置接口的附加度量值
网络拓扑
配置要求
搭建RIPv2网络,并使得192.168.1.0/24和192.168.5.0/24之间的通信报文从AR4 AR5这边走。
配置代码
AR1
1 acl number 2000 2 rule 5 permit source 192.168.5.0 0 3 # 4 interface GigabitEthernet0/0/0 5 ip address 10.0.12.1 255.255.255.0 6 rip metricin 2000 2 7 # 8 interface GigabitEthernet0/0/1 9 ip address 10.0.14.1 255.255.255.0 10 # 11 interface LoopBack0 12 ip address 192.168.1.1 255.255.255.0 13 # 14 rip 1 15 version 2 16 network 192.168.1.0 17 network 10.0.0.0
AR2
1 acl number 2000 2 rule 5 permit source 192.168.1.0 0 3 # 4 interface GigabitEthernet0/0/0 5 ip address 10.0.12.2 255.255.255.0 6 # 7 interface GigabitEthernet0/0/1 8 ip address 10.0.23.2 255.255.255.0 9 rip metricout 2000 3 10 # 11 rip 1 12 version 2 13 network 10.0.0.0
AR3
1 interface GigabitEthernet0/0/0 2 ip address 10.0.23.3 255.255.255.0 3 # 4 interface GigabitEthernet0/0/1 5 ip address 10.0.53.3 255.255.255.0 6 # 7 interface LoopBack0 8 ip address 192.168.5.1 255.255.255.0 9 # 10 rip 1 11 version 2 12 network 10.0.0.0 13 network 192.168.5.0
AR4
1 interface GigabitEthernet0/0/0 2 ip address 10.0.45.4 255.255.255.0 3 # 4 interface GigabitEthernet0/0/1 5 ip address 10.0.14.4 255.255.255.0 6 # 7 rip 1 8 version 2 9 network 10.0.0.0
AR5
1 interface GigabitEthernet0/0/0 2 ip address 10.0.53.5 255.255.255.0 3 # 4 interface GigabitEthernet0/0/1 5 ip address 10.0.45.5 255.255.255.0 6 # 7 rip 1 8 version 2 9 network 10.0.0.0
控制RIP发布默认路由
网络拓扑
配置要求
AR1向AR2发布下一跳为200.1.1.2的默认路由。
配置代码
AR1
interface GigabitEthernet 0/0/0
network 10.1.12.1 24
#
ip route-static 0.0.0.0 0 200.1.1.2
#
rip 1
version 2
network 10.0.0.0
default-route originate cost 1 #即使在全局路由表中不存在该默认路由,RIP照样发送该路由信息。
AR2
interface GigabitEthernet 0/0/0
ip address 10.1.12.2 24
#
rip 1
version 2
network 10.0.0.0
RIP路由标记
网络拓扑
配置要求
在AR1上配置静态路由10.1.1.0 24 31.1.1.21标记为10,11.1.1.0 24 31.1.1.21标记为20,并导入到RIP中。
配置代码
AR1
interface GigabitEthernet 0/0/0
ip address 10.1.12.1 24
#
interface GigabitEthernet 0/0/1
ip address 31.1.1.1 24
#
rip 1
version 2
network 10.0.0.0
network 31.0.0.0
import-route static
#
ip route-static 10.1.1.0 24 31.1.1.21 tag 10
ip route-static 11.1.1.0 24 31.1.1.21 tag 20
配置RIP抑制接口及单播更新
网络拓扑
配置要求
配置路由器使得PC不会接收到RIP报文,并且路由器两两之间单播RIP报文。
配置代码
AR1
interface GigabitEthernet 0/0/1
ip address 172.16.1.254 24
#
rip 1
peer 172.16.1.100
peer 172.16.1.200
network 172.16.0.0
silent-interface GigabitEthernet 0/0/1
AR2
interface GigabitEthernet 0/0/0
ip address 172.16.2.254 24
#
interface GigabitEthernet 0/0/1
ip address 172.168.1.100 24
#
rip 1
peer 172.16.1.254
peer 172.16.1.200
network 172.16.0.0
silent-interface GigabitEthernet 0/0/0
silent-interface GigabitEthernet 0/0/1
AR3
interface GigabitEthernet 0/0/0
ip address 192.168.1.254 24
#
interface GigabitEthernet 0/0/1
ip address 172.16.1.200 24
#
rip 1
network 172.16.0.0
network 192.168.1.0
silent-interface GigabitEthernet 0/0/0
silent-interface GigabitEthernet 0/0/1
参考文献
[1] HCNA网络基础实验指南
[2] HCNP路由交换学习指南