Table of contents
foreword
A computer network refers to a system in which multiple computers are interconnected through communication equipment and communication lines to exchange information. A router in a computer network is a dedicated network device, which is responsible for selecting the best transmission path according to the destination address, and forwarding the data packet to the next hop. Routers need to run routing protocols to obtain and maintain routing information. RIP (Routing Information Protocol) is an interior gateway protocol based on the distance vector algorithm. It uses the hop count as the metric and sends a routing update packet every 30 seconds. The maximum hop count is 15. This experiment aims to let students understand the working principle and configuration method of RIP routing protocol, and master the skills of using RIP to realize network interconnection.
Purpose
Master the configuration of RIP routing protocol.
Experimental content
(1) Familiar with the RIP protocol;
(2) Connect two 1941 routers to two PCs respectively, configure the RIP protocol on the routers, and test the connectivity.
Related knowledge points
Experimental background
The school has two campuses, East and West, and each campus is an independent local area network. In order to enable the two campuses to communicate with each other and share resources normally, the exit of each campus is connected by a router, and the school is connected between the two routers. A dedicated line was set up for connection. In order to simplify the management and maintenance of the network management, the school decided to use the RIP protocol to realize the routing intercommunication between the two campuses.
Laboratory equipment
Router_1941 2 sets; PC 2 sets; 3 crossover lines.
experiment procedure
Draw topology diagram
Set ip address, default gateway, subnet mask
PC1
IP: 192.168.1.1
Submark: 255.255.255.0 Gateway
: 192.168.1.254
PC2
IP: 192.168.2.1 Submark: 255.255.255.0 Gateway: 192.168.2.254 Configure Router R1 (basic configuration)
config t
hostname R1
interface gigabitEthernet 0/0
ip address 192.168.1.254 255.255.255.0
no shutdown
exit
Test pc1, R1 connectivity
PC1: ping 192.168.1.1
Ping 192.168.1.254
Similarly, configure router R2 (basic configuration) and test the connectivity of PC1, R1, R2, and PC2
enable
config t
hostname R2
interface gigabitEthernet 0/0
ip address 192.168.2.254 255.255.255.0
no shutdown
exit
Continue to configure routers R1 and R2 (basic configuration)
interface gigabitEthernet 0/1
ip address 192.168.3.1 255.255.255.0
no shutdown
exit
interface gigabitEthernet 0/1
ip address 192.168.3.2 255.255.255.0
no shutdown
exit
Test the connectivity of PC1, R1, R2, and PC2
Continue to configure routers R1 and R2 (RIP protocol-related configuration)
router rip //注释:开始配置RIP
network 192.168.1.0 //注释:宣告直连网络
network 192.168.3.0 //注释:宣告直连网络
version 2 //注释: 定义RIP协议版本为 RIP V2版
no auto-summary //注释:关闭路由信息的自动汇总功能
router rip //注释:开始配置RIP
network 192.168.3.0 //注释:宣告直连网络
network 192.168.2.0 //注释:宣告直连网络
version 2 //注释: 定义RIP协议版本为 RIP V2版
no auto-summary //注释:关闭路由信息的自动汇总功能
Test the connectivity of PC1, R1, R2, and PC2
Check the routing information of R1 or R2
In the privileged mode: show ip route
to distinguish between directly connected networks and ordinary routes.
Summarize
The purpose of this experiment is to realize the communication between different network segments by configuring the RIP routing protocol. RIP is a distance vector based routing protocol that uses hop count as a metric with a maximum of 15 hops. A RIP router sends a routing update message every 30 seconds to notify neighbor routers of its own routing table information. RIP supports two versions, namely RIPv1 and RIPv2. The main difference between them is that RIPv2 supports subnet mask and authentication mechanism.
In this experiment, we used 2 routers and 2 hosts to form 2 network segments respectively. We configured the RIP protocol on each router and specified the network address to broadcast. We also configured a default gateway and subnet mask on each host. Through the ping command, we verified the connectivity between different network segments. We also used the show ip route command to view the routing table information of each router. Through this experiment, we have deepened the understanding and application of the RIP protocol.