HCNA配置RIPv1
2024-08-23 22:28:56
1、拓扑图
2、配置
R1
The device is running!
######
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysnae
[Huawei]sysna
[Huawei]sysname R1
[R1]int
[R1]interface g0/
^
Error: Wrong parameter found at '^' position.
[R1]interface g0//
[R1-GigabitEthernet0//]ip add 12.1.1.1
Dec ::-: R1 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R1-GigabitEthernet0//]q
[R1]rip
[R1-rip-]netwo
[R1-rip-100]network 12.0.0.0
[R1-rip-]q
R2
Please press enter to start cmd line! <Huawei>
<Huawei>
Dec ::-: Huawei %%01IFPDT//IF_STATE(l)[]:Interface GigabitEt
hernet0// has turned into UP state.
<Huawei>
Dec ::-: Huawei %%01IFPDT//IF_STATE(l)[]:Interface GigabitEt
hernet0// has turned into UP state.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int g0//
[R2-GigabitEthernet0//]ip add 12.1.1.2
Dec ::-: R2 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R2-GigabitEthernet0//]q
[R2]rip
[R2-rip-]net
[R2-rip-]network 12.0.0.0
[R2-rip-]q
[R2]int
[R2]interface g0//
[R2-GigabitEthernet0//]ip add 172.16.1.2
[R2-GigabitEthernet0//]
Dec ::-: R2 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R2-GigabitEthernet0//]q
[R2]rip
[R2-rip-]net
[R2-rip-]network 172.16.0.0
[R2-rip-]q
R3
Configuration console exit, please press any key to log on <R3>sys
Enter system view, return user view with Ctrl+Z.
[R3]int
[R3]interface g0//
[R3-GigabitEthernet0//]ip add 192.168.1.3
Dec ::-: R3 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R3-GigabitEthernet0//]q
[R3]int
[R3]interface g0//
[R3-GigabitEthernet0//]ip add 172.16.1.3
Dec ::-: R3 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R3-GigabitEthernet0//]q
[R3]rip
[R3-rip-]net
[R3-rip-]network 172.16.0.0
[R3-rip-]net
[R3-rip-]network 192.168.1.0
[R3-rip-]q
[R3]
R4
The device is running!
######################
<Huawei>
Dec ::-: Huawei %%01IFPDT//IF_STATE(l)[]:Interface GigabitEt
hernet0// has turned into UP state.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn
[Huawei]sysname R4
[R4]int
[R4]interface G0//
[R4-GigabitEthernet0//]ip add 192.168.1.4
Dec ::-: R4 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R4-GigabitEthernet0//]q
[R4]rip
[R4-rip-]net
[R4-rip-]network 192.168.1.0
[R4-rip-]q
3、测试
R1上测试
Please check whether system data has been changed, and save data in time Configuration console time out, please press any key to log on <R1>
<R1>
<R1>
<R1>
<R1>
<R1>dis ip rou
<R1>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : Routes : Destination/Mask Proto Pre Cost Flags NextHop Interface 12.1.1.0/ Direct D 12.1.1.1 GigabitEthernet
//
12.1.1.1/ Direct D 127.0.0.1 GigabitEthernet
//
12.1.1.255/ Direct D 127.0.0.1 GigabitEthernet
//
127.0.0.0/ Direct D 127.0.0.1 InLoopBack0
127.0.0.1/ Direct D 127.0.0.1 InLoopBack0
127.255.255.255/ Direct D 127.0.0.1 InLoopBack0
172.16.0.0/ RIP D 12.1.1.2 GigabitEthernet
//
192.168.1.0/ RIP D 12.1.1.2 GigabitEthernet
//
255.255.255.255/ Direct D 127.0.0.1 InLoopBack0 <R1>ping 192.168.1.4
PING 192.168.1.4: data bytes, press CTRL_C to break
Request time out
Request time out
Reply from 192.168.1.4: bytes= Sequence= ttl= time= ms
Reply from 192.168.1.4: bytes= Sequence= ttl= time= ms
Reply from 192.168.1.4: bytes= Sequence= ttl= time= ms --- 192.168.1.4 ping statistics ---
packet(s) transmitted
packet(s) received
40.00% packet loss
round-trip min/avg/max = // ms <R1>ping 192.168.1.4
PING 192.168.1.4: data bytes, press CTRL_C to break
Reply from 192.168.1.4: bytes= Sequence= ttl= time= ms
Reply from 192.168.1.4: bytes= Sequence= ttl= time= ms
Reply from 192.168.1.4: bytes= Sequence= ttl= time= ms
Reply from 192.168.1.4: bytes= Sequence= ttl= time= ms
Reply from 192.168.1.4: bytes= Sequence= ttl= time= ms --- 192.168.1.4 ping statistics ---
packet(s) transmitted
packet(s) received
0.00% packet loss
round-trip min/avg/max = // ms
R4上测试
Please check whether system data has been changed, and save data in time Configuration console time out, please press any key to log on <R4>dis ip rou
<R4>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : Routes : Destination/Mask Proto Pre Cost Flags NextHop Interface 12.0.0.0/ RIP D 192.168.1.3 GigabitEthernet
//
127.0.0.0/ Direct D 127.0.0.1 InLoopBack0
127.0.0.1/ Direct D 127.0.0.1 InLoopBack0
127.255.255.255/ Direct D 127.0.0.1 InLoopBack0
172.16.0.0/ RIP D 192.168.1.3 GigabitEthernet
//
192.168.1.0/ Direct D 192.168.1.4 GigabitEthernet
//
192.168.1.4/ Direct D 127.0.0.1 GigabitEthernet
//
192.168.1.255/ Direct D 127.0.0.1 GigabitEthernet
//
255.255.255.255/ Direct D 127.0.0.1 InLoopBack0 <R4>ping 12.1.1.1
PING 12.1.1.1: data bytes, press CTRL_C to break
Reply from 12.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.1: bytes= Sequence= ttl= time= ms --- 12.1.1.1 ping statistics ---
packet(s) transmitted
packet(s) received
0.00% packet loss
round-trip min/avg/max = // ms
总结:
1.RIP协议如何工作?
在路由器上开启RIP协议,并将路由器的直连网段宣告进RIP后,RIP会将这些直连网段信息封装成RIP协议报文,
发送给邻居路由器。这样邻居路由器间就可以相互学习对方的网段信息,实现网络的互通。
2.如何配置基本的RIP网络?
第一步开启RIP协议,第二步将路由器的直连网段宣告进RIP协议。
3.RIP如何计算开销值?
RIP是基于跳数来计算的开销值。所谓跳数即是跨越网段的数量。
RIP路由的最大网络跳数为15,如果一条RIP路由的跳数到达16,路由器则认为该路由不可达。
最新文章
- .NET魔法堂:工程构建基石->;MSBuild
- Linux基础3(文件权限)
- C#:通过Visual Studio项目预生成命令获取SVN版本号
- iOS 实现快速切换主题详细教程(附上源码)
- 【BZOJ 3036】 绿豆蛙的归宿
- iOS - OC NSProcessInfo		系统进程信息
- 用AngularJS开发下一代Web应用 系列入门基础教程
- spring与jpa整合 简化persistence.xml配置文件 使用属性文件 数据源dbcp访问数据库
- ZooKeeper(3.4.5) - 开源客户端 Curator(2.7.0) 的简单示例
- 标准库string类型简述
- UITextField点击return后注销第一响应者
- properties文件中中文不能显示或者中文乱码
- 【BZOJ4569】萌萌哒(并查集,倍增)
- git配置ssh秘钥(公钥以及私钥)
- Asp.Net Core 实现谷歌翻译ApI 免费版
- Cocos Creator 动态设置Canvas的宽度与高度,更改适配
- VS2010下安装boost库
- java.util.concurrent包下并发锁的特点与适用场景
- Linux命令行烧录树莓派镜像至SD卡
- JavaScript异步和单线程