HCIA——10实验:跨路由转发。静态路由、负载均衡、缺省路由、手工汇总、环回接口。空接口与路由黑洞、浮动静态。

学习目标:

  • 跨路由转发、负载均衡、环回接口、手工汇总、缺省路由、空接口与路由黑洞、浮动静态

学习内容:

  1. 跨路由转发
  2. 静态路由、负载均衡、缺省路由、手工汇总。环回接口
  3. 空接口与路由黑洞、浮动静态

目录

学习目标:

学习内容:

1.跨路由转发

1)第一次PING第一次PING)

2.静态路由、负载均衡、缺省路由、手工汇总。环回接口

1)要求

2)IP分配、规划

以下是我自行分配的参考

3)思路与优化

规划

缺省路由

负载均衡

手工汇总

4)输入命令

5)检验

3.空接口与路由黑洞、浮动静态------上面没有主动路由黑洞、额外的

1)模型

2)输入指令

学习时间:

学习产出:

1.跨路由转发

1)第一次PING

PC>ping 192.168.6.2

Ping 192.168.6.2: 32 data bytes, Press Ctrl_C to breal

Request timeout!

From 192.168.6.2: bytes=32 seq=2 ttl=127 time=109 ms From 192.168.6.2: bytes=32 seq=3 ttl=127 time=78 ms From 192.168.6.2: bytes=32 seq=4 ttl=127 time=110 ms From 192.168.6.2: bytes=32 seq=5 ttl=127 time=78 ms

192.168.6.2 ping statistics

5 packet (s) transmitted

4 packet (s) received

20.00% packet loss round-trip min/avg/max = 0/93/110 ms------时延高、ARP

2)如果没有补充路由表

PC>ping 192.168.1.5

Ping 192.168.1.5: 32 data bytes, Press Ctrl_C to break

From 192.168.1.1: Destination host unreachable

From 192.168.1.1: Destination host unreachable

From 192.168.1.1: Destination host unreachable

From 192.168.1.1: Destination host unreachable

From 192.168.1.1: Destination host unreachable------无条件丢弃

2.静态路由、负载均衡、缺省路由、手工汇总。环回接口

1)要求

2)IP分配、规划

以下是我自行分配的参考

192.168.1.0 24

. . .0 0000000 25

0

1

128

192.168.1.0 25

192.168.1.128 25

192.168.1.0 25

. . . 0 00 00000 27

00

01

10

11

64 32

192.168.1.0 27

192.168.1.32 27

192.168.1.64 27

192.168.1.96 27

192.168.1.96 27

. . .000 00 000 29

16 8

192.168.1.0 29

192.168.1.8 29

192.168.1.16 29

192.168.1.24 29

192.168.1.0 29

. . .000000 00 30

192.168.1.128 25

. . .0 0 000000 26

0

1

64

192.168.1.0 26

192.168.1.64 26

192.168.1.0 26

. . .00 0 0000 27

0

1

32

192.168.1.0 27

192.168.1.32 27

92.168.1.0 27

. . .000000 00 30

92.168.1.0 30

3)思路与优化

规划

互联网+没有WAN------WAN直连路由的下一个路由分

骨干+路由背后网段------尽量2的次方个

缺省路由

要WAN的部门路由

负载均衡

r1本身及背后------r4本身及背后

r4与r5

手工汇总

网段

4)输入命令

复制代码
静态路由
ip route-static 网段/详细 mask 下一跳

环回接口 
interface LoopBack 0-1023

手工汇总
ip route-static 网段 maask 下一跳

缺省路由
ip route-static 0.0.0.0 0 下一跳

6)检验

PING 8.8.8.8: 56 data bytes, press CTRL_C to break

Reply from 8.8.8.8: bytes-56 Sequence-l ttl-253 time-70 ms

Reply from 8.8.8.8: bytes=56 Sequence=2 ttl=253 time=20 ms

Reply from 8.8.8.8: bytes=56 Sequence=3 ttl=253 time=40 ms

Reply from 8.8.8.8: bytes=56 Sequence=4 ttl=253 time=20 ms

Reply from 8.8.8.8: bytes=56 Sequence=5 ttl=253 time=40 ms

8.8.8.8 ping statistics

5 packet (s) transmitted

5 packet (s) received

0.00% packet loss round-trip min/avg/max= 20/38/70 ms

3.空接口与路由黑洞、浮动静态------上面没有主动路由黑洞、额外的

1)模型

2)输入指令

复制代码
空接口
ip route-static 网段 mask NULL 0

浮动静态
静态路由 preference 0-255

3)详细命令

复制代码
配置IP地址
r6
interface GigabitEthernet 0/0/0
ip address 192.168.1.65 27
quit
interface GigabitEthernet 0/0/0------假设为与0/0/0不同的带宽接口
ip address 192.168.1.33 27
quit

r7
interface GigabitEthernet 0/0/1
ip address 192.168.1.66 27
quit
interface GigabitEthernet 0/0/0
ip address 192.168.1.34 27
quit

环回------空接口、不用配置IP地址-防止主动黑洞、可以配置缺省路由检验
r6
interface LoopBack 0------《0-1023任意一个都行》
ip route-static 192.168.1.16 27 NULL 0------空接口
quit
空接口-192.168.1.0 27、192.168.1.97 27
r6
interface LoopBack 1
ip address 192.168.1.1 27
quit
r7
interface LoopBack 0
ip address 192.168.1.97 27
quit

下一跳
r6
ip route-static 192.168.1.96 27 192.168.1.66 
r7
ip route-static 192.168.1.96 27 192.168.1.65

浮动路由------备用也要下一跳、直接写浮动路由
r6
ip route-static 192.168.1.96 27 192.168.1.34 preference 61
r7
ip route-static 192.168.1.0 27 192.168.1.33 preference 61

可以加缺省路由------缺省路由优先级默认255、可以改
r6
ip route-static 0.0.0.0 0 192.168.1.66 preference 254
ip route-static 0.0.0.0 0 192.168.1.33 preference 255
检验
r6/r7
interface GigabitEthernet 0/0/0------任意一个输入关闭接口
Shutdown
undo shutdown------打开接口
r6
interface LoopBack 1
ping 192.168.1.97

4)检验

PING 192.168.1.96: 56 data bytes, press CTRL C to break

Reply from 192.168.1.97: bytes=56 Sequence=l ttl=255 time=30 ms

Reply from 192.168.1.97: bytes=56 Sequence=2 ttl=255 time=l ms

Reply from 192.168.1.97: bytes=56 Sequence=3 ttl=255 time=20 ms

Reply from 192.168.1.97: bytes=56 Sequence=4 ttl=255 time=20 ms

Reply from 192.168.1.97: bytes=56 Sequence=5 ttl=255 time=20 ms

192.168.1.96 ping statistics ---

5 packet (s) transmitted

5 packet (s) received

0.00% packet loss round-trip min/avg/max= 1/18/30 ms


学习时间:

上课时后作业


学习产出:

  • 技术笔记 1遍
  • 有错误请指出,作者会及时改正
相关推荐
人工智能训练师1 小时前
Ubuntu22.04如何安装新版本的Node.js和npm
linux·运维·前端·人工智能·ubuntu·npm·node.js
JZZC21 小时前
MA上的OSPF动态路由(2025年9月11日)
计算机网络·ensp·ospf·动态路由·ma上的ospf动态路由
Tisfy2 小时前
服务器 - 从一台服务器切换至另一台服务器(损失数十条访客记录)
运维·服务器
qq_264220893 小时前
Nginx优化与 SSL/TLS配置
运维·nginx
hsjkdhs3 小时前
网络编程之UDP广播与粘包问题
网络·网络协议·udp
AKAMAI4 小时前
Sport Network 凭借 Akamai 实现卓越成就
人工智能·云原生·云计算
Aspiresky4 小时前
浅析Linux进程信号处理机制:基本原理及应用
linux·运维·信号处理
全栈工程师修炼指南5 小时前
告别手动构建!Jenkins 与 Gitlab 完美协作,根据参数自动化触发CI/CD流水线实践
运维·ci/cd·自动化·gitlab·jenkins
ajassi20005 小时前
linux C 语言开发 (八) 进程基础
linux·运维·服务器
yzx9910135 小时前
接口协议全解析:从HTTP到gRPC,如何选择适合你的通信方案?
网络·人工智能·网络协议·flask·pygame