祖瑞科技 全国计算机 网络IT运维社区!

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 5069|回复: 0

HCNA-21 RIP路由协议基本配置

[复制链接]

199

主题

212

帖子

1200

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1200
发表于 2021-2-5 16:35:47 | 显示全部楼层 |阅读模式
HCNA-21 RIP路由协议基本配置

基本配置
<Huawei>system-view
[Huawei]sysname r1
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 172.16.10.1 24
[r1-GigabitEthernet0/0/0]quit
[r1]interface LoopBack 0  //创建环回口
[r1-LoopBack0]ip address 192.168.1.100 32
[r1-LoopBack0]quit
<Huawei>system-view
[Huawei]sysname r2
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 172.16.10.2 24
[r2-GigabitEthernet0/0/0]quit
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.2.100 32
[r2-LoopBack0]quit

使用RIP v1搭建网络
[r1]rip  //创建RIP协议进程 默认进程号为1
[r1-rip-1]network 172.16.0.0  //宣告参与RIP的网段
[r1-rip-1]network 192.168.1.0
[r1-rip-1]quit
[r2]rip
[r2-rip-1]network 172.16.0.0
[r2-rip-1]network 192.168.2.0
[r2-rip-1]quit
[r1]display ip routing-table  //查看IP路由表
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
        Destinations : 9        Routes :9        
Destination/Mask   Proto   Pre  Cost     Flags NextHop         Interface
……
192.168.1.100/32  Direct  0   0           D   127.0.0.1       LoopBack0
    192.168.2.0/24  RIP    100  1           D  172.16.10.2     GigabitEthernet
0/0/0
255.255.255.255/32 Direct  0    0          D   127.0.0.1       InLoopBack0
[r2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
        Destinations : 9        Routes :9        
Destination/Mask   Proto   Pre  Cost     Flags NextHop         Interface
……
172.16.10.255/32  Direct  0   0           D   127.0.0.1       GigabitEthernet
0/0/0
    192.168.1.0/24  RIP    100  1           D  172.16.10.1     GigabitEthernet
0/0/0
192.168.2.100/32  Direct  0   0           D   127.0.0.1       LoopBack0
255.255.255.255/32 Direct  0    0          D   127.0.0.1       InLoopBack0
[r1]ping -a 192.168.1.100 192.168.2.100  //R1使用源目标IP Ping R2的环回口
  PING192.168.2.100: 56  data bytes, pressCTRL_C to break
    Reply from192.168.2.100: bytes=56 Sequence=1 ttl=255 time=150 ms
    Reply from192.168.2.100: bytes=56 Sequence=2 ttl=255 time=10 ms
    Reply from192.168.2.100: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from192.168.2.100: bytes=56 Sequence=4 ttl=255 time=10 ms
    Reply from192.168.2.100: bytes=56 Sequence=5 ttl=255 time=30 ms
  ---192.168.2.100 ping statistics ---
    5 packet(s)transmitted
    5packet(s) received
    0.00%packet loss
round-trip min/avg/max =10/46/150 ms
<r1>debugging rip 1  //查看RIP协议定期更新情况
<r1>terminal debugging  //开启RIP终端调试功能
<r1>terminal monitor  //终端监视
<r1>undo debugging all
<r1>debugging rip 1 event  //查看路由器发出和接收的定期事件

使用RIP v2搭建网络
[r1]rip
[r1-rip-1]version 2 //版本V2
[r1-rip-1]quit
[r2]rip
[r2-rip-1]version 2
[r2-rip-1]quit
[r1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
        Destinations : 9        Routes :9        
Destination/Mask   Proto   Pre  Cost     Flags NextHop         Interface
……
172.16.10.255/32  Direct  0   0           D   127.0.0.1       GigabitEthernet
0/0/0
192.168.1.100/32  Direct  0   0           D   127.0.0.1       LoopBack0
  192.168.2.100/32  RIP    100  1           D  172.16.10.2     GigabitEthernet
0/0/0
255.255.255.255/32 Direct  0    0          D   127.0.0.1       InLoopBack0
[r2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
        Destinations : 9        Routes : 9        
Destination/Mask   Proto   Pre  Cost     Flags NextHop         Interface
……
172.16.10.255/32  Direct  0   0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.100/32  RIP    100  1           D  172.16.10.1     GigabitEthernet
0/0/0
192.168.2.100/32  Direct  0   0           D   127.0.0.1       LoopBack0
255.255.255.255/32 Direct  0    0          D   127.0.0.1       InLoopBack0
[r1]ping -a 192.168.1.100 192.168.2.100
  PING192.168.2.100: 56  data bytes, pressCTRL_C to break
    Reply from192.168.2.100: bytes=56 Sequence=1 ttl=255 time=20 ms
    Reply from192.168.2.100: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from192.168.2.100: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from192.168.2.100: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from192.168.2.100: bytes=56 Sequence=5 ttl=255 time=20 ms
  ---192.168.2.100 ping statistics ---
    5packet(s) transmitted
    5packet(s) received
    0.00%packet loss
round-trip min/avg/max =20/22/30 ms

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
祖瑞(上海)网络科技有限公司
我们在全国范围提供企业IT运维、网络工程、弱电安装、监控安防、计算机产品收售、办公设备耗材等服务!
期待与您的合作!
邮箱:sanne@zurkj.com
电话:021-51850021 18918292296
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

公司网站

QQ|Archiver|手机版|小黑屋|祖瑞科技 全国计算机 网络IT运维社区! ( 沪ICP备16021636号-2 )

GMT+8, 2024-5-6 03:54 , Processed in 0.124223 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表