2020-12-02

该博客围绕静态路由实验展开,全网网段基于192.168.1.0/24划分,R1 - R4各有两个环回。实验步骤包括IP地址划分、配置端口与环回IP、配置静态路由并添加缺省路由,还涉及备份、空接口防环路由等操作,最终实现全网可达。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

静态路由实验

  1. 全网所有网段全部基于192.168.1.0/24划分所得
  2. R1-R4每台设备均有两个环回
  3. 全网可达
  4. 尽量减少路由条目,且防止环路
  5. R5的环回5.5.5.5/24不能出现在其他设备的路由表中
  6. 在这里插入图片描述

一、ip地址的划分

主要网段的子网划分以及环回的ip地址
二、配置端口IP与环回IP地址

R1: Ethernet0/0/0 ip address 192.168.1.1 255.255.255.252
Ethernet0/0/1 ip address 192.168.1.5 255.255.255.252

interface LoopBack1 ip address 192.168.1.33 255.255.255.240
interface LoopBack2 ip address 192.168.1.49 255.255.255.240

R2: Ethernet0/0/0 ip address 192.168.1.2 255.255.255.252#
Ethernet0/0/1 ip address 192.168.1.9 255.255.255.252

interface LoopBack1 ip address 192.168.1.65 255.255.255.240
interface LoopBack2 ip address 192.168.1.81 255.255.255.240

R3: Ethernet0/0/0 ip ddress 192.168.1.10 255.255.255.252
Ethernet0/0/1 ip address 192.168.1.14 255.255.255.252
GigabitEthernet0/0/0 ip address 192.168.1.21 255.255.255.252
GigabitEthernet0/0/1 ip address 192.168.1.17 255.255.255.252

interface LoopBack1 ip address 192.168.1.97 255.255.255.240
interface LoopBack2 ip address 192.168.1.113 255.255.255.240

R4: Ethernet0/0/0 ip address 192.168.1.13 255.255.255.252
Ethernet0/0/1 ip address 192.168.1.6 255.255.255.252

interface LoopBack1 ip address 192.168.1.129 255.255.255.240
interface LoopBack2 ip address 192.168.1.145 255.255.255.240

R5: Ethernet0/0/0 ip address 192.168.1.22 255.255.255.252
Ethernet0/0/1 ip address 192.168.1.18 255.255.255.252

interface LoopBack1 ip address 5.5.5.5 255.255.255.0

三、配置静态路由,添加缺省路由

R1
R1:
ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
ip route-static 0.0.0.0 0.0.0.0 192.168.1.6
ip route-static 192.168.1.8 255.255.255.252 192.168.1.2
ip route-static 192.168.1.12 255.255.255.252 192.168.1.6
ip route-static 192.168.1.16 255.255.255.252 192.168.1.2
ip route-static 192.168.1.16 255.255.255.252 192.168.1.6
ip route-static 192.168.1.64 255.255.255.224 192.168.1.2
ip route-static 192.168.1.96 255.255.255.224 192.168.1.2
ip route-static 192.168.1.96 255.255.255.224 192.168.1.6
ip route-static 192.168.1.128 255.255.255.224 192.168.1.6

R2

R2:

ip route-static 0.0.0.0 0.0.0.0 192.168.1.10
ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
ip route-static 192.168.1.12 255.255.255.252 192.168.1.10
ip route-static 192.168.1.16 255.255.255.252 192.168.1.10
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
ip route-static 192.168.1.128 255.255.255.224 192.168.1.1
ip route-static 192.168.1.128 255.255.255.224 192.168.1.10

 R3

R3:

ip route-static 0.0.0.0 0.0.0.0 192.168.1.18
ip route-static 192.168.1.0 255.255.255.252 192.168.1.9
ip route-static 192.168.1.4 255.255.255.252 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 192.168.1.9
ip route-static 192.168.1.32 255.255.255.224 192.168.1.13
ip route-static 192.168.1.64 255.255.255.224 192.168.1.9
ip route-static 192.168.1.128 255.255.255.224 192.168.1.13

R4

R4:

ip route-static 0.0.0.0 0.0.0.0 192.168.1.14
ip route-static 192.168.1.0 255.255.255.252 192.168.1.5
ip route-static 192.168.1.8 255.255.255.252 192.168.1.14
ip route-static 192.168.1.16 255.255.255.252 192.168.1.14
ip route-static 192.168.1.32 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.14
ip route-static 192.168.1.96 255.255.255.224 192.168.1.14

 R5

R5:
ip route-static 192.168.1.0 255.255.255.252 192.168.1.17
ip route-static 192.168.1.4 255.255.255.252 192.168.1.17
ip route-static 192.168.1.8 255.255.255.252 192.168.1.17
ip route-static 192.168.1.12 255.255.255.252 192.168.1.17
ip route-static 192.168.1.32 255.255.255.224 192.168.1.17
ip route-static 192.168.1.64 255.255.255.224 192.168.1.17
ip route-static 192.168.1.96 255.255.255.224 192.168.1.17
ip route-static 192.168.1.128 255.255.255.224 192.168.1.17

R5的环回地址5.5.5.5/24写漏了,不要在意这些细节

查看已配置的端口IP
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

查看已配置的静态路由
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

测试直连
在这里插入图片描述
在这里插入图片描述

目前全网可达
三,备份
在这里插入图片描述

在这里插入图片描述
空接口防环路由
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

关闭R3 g0/0/1 端口,使其走千兆路线在这里插入图片描述
在这里插入图片描述

打开则又走百兆
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值