文章目录
Ⅰ RIP简介
Routing Information Protocol,路由信息协议。两个网段中的两台电脑能相互访问,那么需要在每台路由器上做静态路由来实现,但是做静态路由需要知道下一跳的地址。在小型的网络中,我们用rip协议来实现(RIP协议通常应用在小型网络,用于发现和生成路由信息),只需要知道本台路由器上接口的网段的地址就可以了。
Ⅱ 构建拓扑图
Ⅲ 配置pc ipv4
① pc1
② pc2
Ⅳ 路由器端口配置IP地址
① R1命令:
sys
[Huawei]sysname R1
[R1]un in en
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.1 24
[R1-GigabitEthernet0/0/1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 10.0.0.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]quit
save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait…
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
② R2命令:
sys
[Huawei]un in en
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 192.168.2.1 24
[Huawei-GigabitEthernet0/0/1]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 10.0.0.2 24
[Huawei-GigabitEthernet0/0/0]quit
[Huawei]sysname R2
[R2]quit
save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait…
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
Ⅴ 配置rip协议:
① R1:
sys
Enter system view, return user view with Ctrl+Z.
[R1]rip
[R1-rip-1]version 2 #可以选择版本2
[R1-rip-1]network 10.0.0.0
[R1-rip-1]network 192.168.2.0
[R1-rip-1]quit
[R1]quit
save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait…
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
② R2:
sys
Enter system view, return user view with Ctrl+Z.
[R2]rip
[R2-rip-1]version 2 #可以选择版本2
[R2-rip-1]network 10.0.0.0
[R2-rip-1]network 192.168.2.0
[R2-rip-1]quit
[R2]quit
save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait…
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
Ⅵ 测试连通性
① pc1
② pc2
Ⅶ 总结
记住network + 与本路由器接口的网段地址就可以了,注意结合拓扑图即可。