【汇总】华为路由交换由浅入深系列
掌握目标
拓扑一
实验配置如下:
一、基本配置:
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
拓扑二
一、基本配置
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
测试
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
Info: Current terminal monitor is on.
下载对应文档
关于博客资源下载说明
(1)第一种是书籍PDF与视频类,全部放在博客分享,觉得对大家学习有帮助的博主会收集好、然后以博主的经验整理分类后排序好分享出来。
(2)第二种是技术性文章与视频,全部放在公众号(网络之路博客)/B站(网络之路Blog)发布,以博主原创为主,主要分享系列为主,由浅入深的带大家了解工作中常用到的一些网络技术,当然也会分享一些比较经典的案例。
(3)分享资源有涉及到您的利益以及版权问题,请联系博主,24小时候内删除。
学习视频系列(总有您想要的)
Book与实验手册(从初级到高级)
数通系列(路由交换 无线、防火墙VPN等)
实战系列(最贴近企业需求的案例)
想第一时间收到最新更新内容吗,点击获取~~~