ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

华为路由交换由浅入深系列(三): RIP简单配置、路由汇总、认证、重分布静态

2021-02-28 10:05:10  阅读:322  来源: 互联网

标签:由浅入深 10.0 Serial1 R1 rip 12.2 RIP 路由


掌握目标

一、基本IP地址配置
二、配置RIPV1
三、配置RIPV2
四、重分布静态路由
五、手工汇总路由
六、明文与MD5认证

拓扑一

huawei

实验配置如下:

一、基本配置:
R1:
interface Serial1/0/0
ip address 10.0.12.1 255.255.255.0
interface LoopBack0
ip address 10.0.1.1 255.255.255.0

R2:
interface Serial1/0/0
ip address 10.0.12.2 255.255.255.0
interface Serial2/0/0
ip address 10.0.23.2 255.255.255.0
interface LoopBack0
ip address 10.0.2.2 255.255.255.0

R3:
interface Serial2/0/0
ip address 10.0.23.3 255.255.255.0
interface LoopBack0
ip address 10.0.3.3 255.255.255.0

测试:
[R2]ping 10.0.12.1
PING 10.0.12.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.12.1: bytes=56 Sequence=1 ttl=255 time=20 ms
Reply from 10.0.12.1: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 10.0.12.1: bytes=56 Sequence=3 ttl=255 time=10 ms
[R2]ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=255 time=20 ms
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=255 time=10 ms

二、配置RIPv1协议
R1:
[R1]rip 1 ===启用RIP进程
[R1-rip-1]network 10.0.0.0 ===宣告网络到RIP进程

R2:
[R2]rip
[R2-rip-1]network 10.0.0.0

R3:
[R3]rip
[R3-rip-1]network 10.0.0.0

[R1]display ip routing-table protocol rip ====查看路由表中RIP路由
Route Flags: R – relay, D – download to fib
——————————————————————————
Public routing table : RIP
Destinations : 3 Routes : 3
RIP routing table status :
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.2.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/0
10.0.3.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/0
10.0.23.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/0
测试:
[R1]ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=254 time=30 ms
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=254 time=20 ms
[R1]ping 10.0.3.3
PING 10.0.3.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=254 time=10 ms
Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=254 time=10 ms
Reply from 10.0.3.3: bytes=56 Sequence=3 ttl=254 time=10 ms

debugging rip 1 ====开启RIP调试信息,必须在用户视图开启
terminal debugging
terminal monitor
display debugging rip ====查看开启debug功能
RIP Process id: 1
Debugs ON: SEND, RECEIVE, PACKET, TIMER, EVENT, BRIEF,
JOB, ROUTE-PROCESSING, ERROR,
REPLAY-PROTECT, GR
May 14 2014 13:15:09.866.1-05:13 R1 RIP/7/DBG: 6: 13414: RIP 1: Receiving v1 response on Serial1/0/0 from 10.0.12.2 with 3 RTEs
May 14 2014 13:15:09.866.2-05:13 R1 RIP/7/DBG: 6: 13465: RIP 1: Receive response from 10.0.12.2 on Serial1/0/0
May 14 2014 13:15:09.866.3-05:13 R1 RIP/7/DBG: 6: 13476: Packet: Version 1, Cmd response, Length 64
May 14 2014 13:15:09.866.4-05:13 R1 RIP/7/DBG: 6: 13527: Dest 10.0.2.0, Cost 1

undo debug rip 1 ====关闭RIP debug功能
undo debug all ====关闭所有debug功能

三、配置RIPv2协议
[R1]rip 1
[R1-rip-1]version 2

[R2]rip 1
[R2-rip-1]version 2

[R3]rip 1
[R3-rip-1]version 2

[R1]display ip routing-table protocol rip
Route Flags: R – relay, D – download to fib
——————————————————————————
Public routing table : RIP
Destinations : 3 Routes : 3
RIP routing table status :
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.2.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/0
10.0.3.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/0
10.0.23.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/0
RIP routing table status :
Destinations : 0 Routes : 0

测试:
debugging rip 1 event
debugging rip 1 packet
undo debugging all
May 14 2014 13:31:30.266.2-05:13 R1 RIP/7/DBG: 6: 13476: Packet: Version 2, Cmd response, Length 24
May 14 2014 13:31:30.266.3-05:13 R1 RIP/7/DBG: 6: 13546: Dest 10.0.1.0/24, Nexthop 0.0.0.0, Cost 1, Tag 0
May 14 2014 13:31:42.106.1-05:13 R1 RIP/7/DBG: 6: 13465: RIP 1: Receive response from 10.0.12.2 on Serial1/0/0
May 14 2014 13:31:42.106.2-05:13 R1 RIP/7/DBG: 6: 13476: Packet: Version 2, Cmd response, Length 64

四、RIP中重分布静态路由
[R3]int lo 1
[R3-LoopBack1]ip add 172.16.3.3 24

ping -c 3 172.16.3.3
PING 172.16.3.3: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
[R2]ip route-static 172.16.3.0 24 10.0.23.3
[R2]rip 1
[R2-rip-1]import-route static ====RIP进程中重分布静态路由

R1>display ip routing-table protocol rip | in 172
Route Flags: R – relay, D – download to fib
——————————————————————————
Public routing table : RIP
Destinations : 4 Routes : 4
RIP routing table status :
Destinations : 4 Routes : 4
Destination/Mask Proto Pre Cost Flags NextHop Interface
172.16.3.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/0

拓扑二

huawei

一、基本配置

R3:
interface LoopBack1
ip address 172.16.0.1 255.255.255.0
interface LoopBack2
ip address 172.16.1.1 255.255.255.0
interface LoopBack3
ip address 172.16.2.1 255.255.255.0
interface LoopBack4
ip address 172.16.3.1 255.255.255.0

二、配置RIPv2

R1:
[R1]rip 1
[R1-rip-1]version 2
[R1-rip-1]network 10.0.0.0

R2:
[R2]rip 1
[R2-rip-1]version 2
[R2-rip-1]network 10.0.0.0

R3:
[R3]rip 1
[R3-rip-1]version 2
[R3-rip-1]net 10.0.0.0
[R3-rip-1]net 172.16.0.0

R1]display ip routing-table protocol rip
Route Flags: R – relay, D – download to fib
——————————————————————————
Public routing table : RIP
Destinations : 7 Routes : 7
RIP routing table status : 
Destinations : 7 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.2.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/0
10.0.3.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/0
10.0.23.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/0
172.16.0.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/0
172.16.1.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/0
172.16.2.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/0
172.16.3.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/0
RIP routing table status : 
Destinations : 0 Routes : 0

三、配置手工路由汇总

[R2]int s1/0/0
[R2-Serial1/0/0]rip summary-address 172.16.0.0 255.255.0.0

测试
display ip routing-table protocol rip | in 172
Route Flags: R – relay, D – download to fib
——————————————————————————
Public routing table : RIP
Destinations : 4 Routes : 4
RIP routing table status : 
Destinations : 4 Routes : 4
Destination/Mask Proto Pre Cost Flags NextHop Interface
172.16.0.0/16 RIP 100 2 D 10.0.12.2 Serial1/0/0

四、配置明文与MD5认证

R1与R2明文认证
interface Serial1/0/0
rip authentication-mode simple cisco

interface Serial1/0/0
rip authentication-mode simple cisco
interface Serial2/0/0
rip authentication-mode md5 usual cisco

interface Serial2/0/0
rip authentication-mode md5 usual cisco

测试:
[R1]int s1/0/0
[R1-Serial1/0/0]rip authentication-mode simple huawei
debugging rip 1
terminal monitor
Info: Current terminal monitor is on.
terminal debugging
reset ip routing-table statistics protocol rip ====清除RIP路由表信息

如果大家有任何疑问或者文中有错误跟疏忽的地方,欢迎大家留言指出,博主看到后会第一时间修改,谢谢大家的支持,更多技术文章尽在网络之路Blog(其他平台同名),版权归网络之路Blog所有,原创不易,侵权必究,觉得有帮助的,关注、转发、点赞支持下!~。

标签:由浅入深,10.0,Serial1,R1,rip,12.2,RIP,路由
来源: https://blog.csdn.net/weixin_46948473/article/details/114209427

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有