小型企业网络组网与配置仿真实验

 实验要求如下:

 我这里以学号46为例

一、IP 地址规划表

(一)主类网络

(二)子网划分 

需要自己计算有效ip范围

在C类主网络192.168.46.0/24中,我们需要先了解这个网络的子网掩码为255.255.255.0,其二进制表示为11111111.11111111.11111111.00000000。这个网络包含了从192.168.46.1到192.168.46.254的可用IP地址。

为了划分出5个子网,我们需要考虑每个子网至少需要2个IP地址(一个用于网络地址,一个用于广播地址),但实际上,为了实际使用,每个子网至少应该分配3个或更多的IP地址(一个用于网络地址,一个用于广播地址,一个或更多用于主机)。

如果我们假设每个子网至少需要4个IP地址(出于简化的考虑),我们可以从主机位中借用3位来划分子网。这样,我们可以得到2^3 = 8个子网掩码块,子网掩码/24 就变为 /27(255.255.255.224)(二进制: 11111111.11111111.11111111.11100000)了可以划分成 8 个子网,每个子网有 32 个地址,其中 30 个是有效的主机地址,但我们只需要5个子网掩码块,够用了。

有效IP范围

子网掩码

网络地址

广播地址

企业网1

VLAN-2

192.168.46.1 - 192.168.46.30

255.255.255.224

192.168.46.0

192.168.46.31

VLAN-3

192.168.46.33 - 192.168.46.62

255.255.255.224

192.168.46.32

192.168.46.63

企业网2

VLAN-2

192.168.46.65 - 192.168.46.94

255.255.255.224

192.168.46.64

192.168.46.95

VLAN-3

192.168.46.97 - 192.168.46.126

255.255.255.224

192.168.46.96

192.168.46.127

路由器

直连链路

192.168.46.129 - 192.168.46.158

255.255.255.224

192.168.46.128

192.168.46.159

(三)IP分配表

IP地址

子网掩码

网关地址

企业网1

VLAN-2

PC0

192.168.46.2

255.255.255.224

192.168.46.1

PC1

192.168.46.3

255.255.255.224

192.168.46.1

VLAN-3

PC2

192.168.46.34

255.255.255.224

192.168.46.33

PC3

192.168.46.35

255.255.255.224

192.168.46.33

企业网2

VLAN-2

PC4

192.168.46.66

255.255.255.224

192.168.46.65

PC5

192.168.46.67

255.255.255.224

192.168.46.65

VLAN-3

PC6

192.168.46.98

255.255.255.224

192.168.46.97

PC7

192.168.46.99

255.255.255.224

192.168.46.97

路由器1

VLAN-2子接口

192.168.46.1

255.255.255.224

-

VLAN-3子接口

192.168.46.33

255.255.255.224

-

与路由器2互联端口

192.168.46.129

255.255.255.224

-

路由器2

VLAN-2子接口

192.168.46.65

255.255.255.224

-

VLAN-3子接口

192.168.46.97

255.255.255.224

-

与路由器1互联端口

192.168.46.130

255.255.255.224

-

(四)VLAN端口分配表

VLAN名称(ID)

端口分配

企业网1

VLAN-2

fa0/0, fa0/1

VLAN-3

fa0/2,fa 0/3

企业网2

VLAN-2

fa0/4,fa 0/5

VLAN-3

fa0/6, fa0/7

二、网络拓扑及参数规划图 

 我方便使用后面的指令请注意连接方向和顺序

ctrl+r勾选显示端口(ip地址什么的是我自己手动写的不用管)

 配置每个电脑的ip地址、子网掩码、网关地址

交换机VLAN配置

左边交换机(注意:指令中有关的ip都是自己表中对应的ip)

Switch>enable
Switch#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#int f0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#vlan 3
Switch(config-vlan)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#int f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#int f0/5
Switch(config-if)#switchport mode trunk
Switch(config-if)#

上面指令提取出来如下 

enable
config terminal
vlan 2
exit
int f0/1
switchport mode access
switchport access vlan 2
exit
int f0/2
switchport mode access
switchport access vlan 2
exit
vlan 3
exit
int f0/3
switchport mode access
switchport access vlan 3
exit
int f0/4
switchport mode access
switchport access vlan 3
exit
int f0/5
switchport mode trunk

右边交换机

Switch>enable
Switch#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#int f0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#vlan 3
Switch(config-vlan)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#int f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#

Switch(config)#int f0/5
Switch(config-if)#switchport mode trunk
Switch(config-if)#

 上面指令提取出来如下 

enable
config terminal
vlan 2
exit
int f0/1
switchport mode access
switchport access vlan 2
exit
int f0/2
switchport mode access
switchport access vlan 2
exit
vlan 3
exit
int f0/3
switchport mode access
switchport access vlan 3
exit
int f0/4
switchport mode access
switchport access vlan 3
exitint f0/5
switchport mode trunk
单臂路由配置 

左路由(其中涉及的地址写你自己路由器1的VLAN子接口的IP地址和子网掩码

Router>en
Router#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#no shutdownRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#int fa0/0.2
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to upRouter(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip add 192.168.46.1 255.255.255.224
Router(config-subif)#int fa0/0.3
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.3, changed state to upRouter(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip add 192.168.46.33 255.255.255.224
Router(config-subif)#

 上面指令提取出来如下  

en
config terminal
int fa0/0
no shutdown
int fa0/0.2
encapsulation dot1Q 2
ip add 192.168.46.1 255.255.255.224
int fa0/0.3
encapsulation dot1Q 3
ip add 192.168.46.33 255.255.255.224

右边路由

Router>en
Router#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#no shutdownRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#int fa0/0.2
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to upRouter(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip add 192.168.46.65 255.255.255.224
Router(config-subif)#int fa0/0.3
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.3, changed state to upRouter(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip add 192.168.46.97 255.255.255.224
Router(config-subif)#

 上面指令提取出来如下   

en
config terminal
int fa0/0
no shutdown
int fa0/0.2
encapsulation dot1Q 2
ip add 192.168.46.65 255.255.255.224
int fa0/0.3
encapsulation dot1Q 3
ip add 192.168.46.97 255.255.255.224

 静态路由配置

(ip add 本路由器地址 子网掩码)

(ip route 目标地址 子网掩码 下一跳)

左边路由

Router>en
Router#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa0/1
Router(config-if)#ip address 192.168.46.129 255.255.255.224
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
Router(config-if)#ip route 192.168.46.96 255.255.255.224 192.168.46.130
Router(config)#int fa0/1
Router(config-if)#ip route 192.168.46.64 255.255.255.224 192.168.46.130
Router(config)#

 上面指令提取出来如下   

en
config terminal
int fa0/1
ip address 192.168.46.129 255.255.255.224
no shutdown
ip route 192.168.46.96 255.255.255.224 192.168.46.130
int fa0/1
ip route 192.168.46.64 255.255.255.224 192.168.46.130

右边路由

Router>en
Router#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa0/1
Router(config-if)#ip address 192.168.46.130 255.255.255.224
Router(config-if)#ip route 192.168.46.0 255.255.255.224 192.168.46.129
Router(config)#int fa0/1
Router(config-if)#ip route 192.168.46.32 255.255.255.224 192.168.46.129
Router(config)#int fa0/1
Router(config-if)#no shutdownRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#

 上面指令提取出来如下   

en
config terminal
int fa0/1
ip address 192.168.46.130 255.255.255.224
ip route 192.168.46.0 255.255.255.224 192.168.46.129
int fa0/1
ip route 192.168.46.32 255.255.255.224 192.168.46.129
int fa0/1
no shutdown

三、交换机配置图

(一)VLAN配置
1、交换机1的VLAN配置图
show vlan brief

 2、交换机2的VLAN配置图
show vlan brief

 

(二)TRUNK配置
1、交换机1接口的TRUNK状态图
show interface trunk

 2、交换机2的VLAN配置图
show interface trunk

四、路由器配置图

(一)路由器1
1、路由器1端口配置图
show ip interface brief
2、路由器1的静态路由表项
show ip interface brief

(二)路由器2
1、路由器2端口配置图
show ip route
2、路由器2的静态路由表项
show ip route

 五、Ping通图

实验报告其他部分 

实验项目

实验3:小型企业网络组网与配置仿真实验

类别

验证性

£

实验目的

1.掌握配置交换机VLAN和TRUNK链路的基本方法和步骤;

2.掌握规划和配置路由器接口IP地址的基本方法;

3.掌握在路由器上配置单臂路由实现VLAN间通信的基本方法。

实验任务与要求

1.在Packet Tracer模拟环境下搭建一个小型企业网络;

2.规划并配置网络的IP参数、VLAN、TRUNK链路和单臂路由;

3.测试网络的连通性。

实验原理(技术)

小型企业网络组网与配置仿真实验通过单臂路由、VLAN划分、静态路由配置实现不同VLAN之间的通信。

单臂路由:在路由器的一个接口上通过配置子接口(逻辑接口)的方式,实现原来相互隔离的不同VLAN之间的互联互通。

VLAN(Virtual LAN,虚拟局域网):在交换式局域网的基础上,对连接到的第二层交换机端口的网络用户进行逻辑分组,不受网络用户物理位置的限制。各个VLAN逻辑分组之间彼此隔离,互相不能访问,不仅实现了广播域的分隔,而且增强了网络的安全性。

路由器不同接口的IP不能位于同一网段;路由器连接内网的网关接口IP应该与内网IP位于同一网段;路由器直连链路两端的IP应该位于同一网段。

实验仪器设备(环境条件)

硬件环境:PC终端或笔记本电脑一台

软件环境:Windows操作系统和PT模拟软件

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/339899.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

MOS管开关电路简单笔记

没错&#xff0c;这一篇还是备忘录&#xff0c;复杂的东西一律不讨论。主要讨论增强型的PMOS与NMOS。 PMOS 首先上场的是PMOS,它的导通条件&#xff1a;Vg-Vs<0且|Vg-Vs|>Vgsth&#xff0c;PMOS的电流流向是S->D,D端接负载&#xff0c;S端接受控电源。MOS管一般无法…

LeetCode:环形链表II

文章收录于LeetCode专栏 LeetCode地址 环形链表II 题目 给定一个链表&#xff0c;返回链表开始入环的第一个节点。如果链表无环&#xff0c;则返回null。   为了表示给定链表中的环&#xff0c;我们使用整数pos来表示链表尾连接到链表中的位置&#xff08;索引从0开始&#…

三十五、openlayers官网示例Dynamic Data——在地图上加载动态数据形成动画效果

官网demo地址&#xff1a; Dynamic Data 初始化地图 const tileLayer new TileLayer({source: new OSM(),});const map new Map({layers: [tileLayer],target: "map",view: new View({center: [0, 0],zoom: 2,}),}); 创建了三个样式 const imageStyle new Style(…

WIFI 万[néng]钥匙 v5.0.10/v4.9.80 SVIP版!

WiFi Master Key v5.0.10/v4.9.80 WIFI万[Nng]钥匙APP是一款专业的网络连接工具&#xff0c;设计宗旨在于为用户提供方便快捷的WiFi接入方案。本应用集成了覆盖全国的大量免费WiFi热点信息&#xff0c;确保用户能够在不同地区快速而稳定地连接到互联网。此外&#xff0c;该应用…

HackTheBox-Machines--Sense

Popcorn 测试过程 1 信息收集 服务器开启80、443端口 80端口 访问 80 跳转到 443 – https://10.129.196.51/ &#xff0c;该页面是 pfSense 登录界面&#xff0c;默认密码是&#xff1a; admin/pfSense&#xff0c;使用默认账号密码登录失败 目录扫描 ./gobuster dir -u htt…

【TB作品】MSP430F149单片机,广告牌,滚动显示

LCD1602滚动显示切换播放暂停字符串 显示Public Places 显示No Smoking 播放 暂停 部分代码 char zifu1[] "Public Places "; char zifu2[] "Class Now "; char zifu3[] "No admittance "; char *zifu[] { zifu1, zifu2, zifu3 }…

【Qt秘籍】[006]-Label实现Hello World程序-编程第一步

"Hello,World!" 中文意思是“你好&#xff0c;世界”。 因为 The C Programming Language 中使用它做为第一个演示程序&#xff0c;后来很多程序员在学习编程或进行设备调试时延续了这一习惯。 下面&#xff0c;我们也将演示利用Label显示Qt中的"Hello World!&q…

颠覆传统:探索Web3对传统计算机模式的冲击

随着Web3技术的崛起&#xff0c;传统计算机模式正面临着前所未有的冲击与挑战。Web3作为下一代互联网的代表&#xff0c;以其去中心化、安全可信的特性&#xff0c;正在颠覆着传统计算机模式的种种假设和局限性。本文将深入探讨Web3对传统计算机模式的冲击&#xff0c;并探索其…

imx6ull - 制作烧录SD卡

1、参考NXP官方的手册《i.MX_Linux_Users_Guide.pdf》的这一章节&#xff1a; 1、SD卡分区 提示&#xff1a;我们常用的SD卡一个扇区的大小是512字节。 先说一下i.MX6ULL使用SD卡启动时的分区情况&#xff0c;NXP官方给的镜像布局结构如下所示&#xff1a; 可以看到&#xff0c…

lua vm 二: 查看字节码、看懂字节码

本文讲一讲如何查看 lua 的字节码&#xff08;bytecode&#xff09;&#xff0c;以及如何看懂字节码。 以下分析基于 lua-5.4.6&#xff0c;下载地址&#xff1a;https://lua.org/ftp/ 。 1. 查看字节码 1.1 方法一&#xff1a;使用 luac luac 是 lua 自带的编译程序&#x…

SaaS 电商设计 (十一) 那些高并发电商系统的限流方案设计

目录 一.什么是限流二.怎么做限流呢2.1 有哪些常见的系统限流算法2.1.1 固定窗口2.1.1 滑动窗口2.1.2 令牌桶2.1.3 漏桶算法 2.2 常见的限流方式2.2.1 单机限流&集群限流2.2.2 前置限流&后置限流 2.3 实际落地是怎么做的2.3.1 流量链路2.3.2 各链路限流2.3.2.1 网关层2…

Maven 中的 classifier 属性用过没?

最近训练营有小伙伴问到松哥一个关于 Maven 依赖的问题&#xff0c;涉及到 classifier 属性&#xff0c;随机问了几个小伙伴&#xff0c;都说工作中没用到过&#xff0c;因此简单整篇文章和小伙伴们分享下。 Maven 大家日常开发应该都有使用&#xff0c;Maven 中有一个比较好玩…

图论(四)—最短路问题(Dijkstra)

一、最短路 概念&#xff1a;从某个点 A 到另一个点B的最短距离&#xff08;或路径&#xff09;。从点 A 到 B 可能有多条路线&#xff0c;多种距离&#xff0c;求其中最短的距离和相应路径。 最短路径分类&#xff1a; 单源最短路&#xff1a;图中的一个点到其余各点的最短路径…

【图像处理与机器视觉】频率域滤波

知识铺垫 复数 CRjI 可以看作复平面上的点&#xff0c;则该复数的坐标为&#xff08;R&#xff0c;I&#xff09; 欧拉公式 e j θ c o s θ j s i n θ e^{j\theta} cos \theta j sin \theta ejθcosθjsinθ 极坐标系中复数可以表示为&#xff1a; C ∣ C ∣ ( c o s…

15、matlab绘图汇总(图例、标题、坐标轴、线条格式、颜色和散点格式设置)

1、plot()函数默认格式画图 代码: x=0:0.1:20;%绘图默认格式 y=sin(x); plot(x,y) 2、X轴和Y轴显示范围/axis()函数 代码: x=0:0.1:20;%绘图默认格式 y=sin(x); plot(x,y) axis([0 21 -1.1 1.1])%设置范围 3、网格显示/grid on函数 代码: x=0:0.1:20;%绘图默认格式 …

拓展虚拟世界边界,云手机可以做到吗

虚拟世界&#xff0c;AI&#xff0c;VR等词汇是21世纪最为流行的词汇&#xff0c;在科技背后&#xff0c;这些词汇的影响变得越来越大&#xff0c;已经走进了人们的世界&#xff0c;比如之前APPLE发布的vision pro&#xff0c;使人们能够更加身临其境的体验到原生os系统&#x…

从MLP到卷积

1.从MLP到卷积层 最近要做多通道的实验&#xff0c;所以重新将处理图像的基础模型回顾一下&#xff0c;什么是卷积&#xff1f;卷积本质是是一种特殊的全连接层。 1.1怎么w的权重从一个值变成了4维呢?可以这样理解&#xff0c;在此举一个例子&#xff1a; 其实本质可以看成&…

安防综合管理系统EasyCVR平台GA/T1400视图库:基于XML的消息体格式

GA/T 1400标准的应用范围广泛&#xff0c;涵盖了公安系统的视频图像信息应用系统&#xff0c;如警务综合平台、治安防控系统、交通管理系统等。在视频监控系统中&#xff0c;GA/T 1400公安视图库的对接是实现视频图像信息传输、处理和管理的重要环节。 以视频汇聚EasyCVR视频监…

Flink中因java的泛型擦除导致的报错及解决

【报错】 Exception in thread "main" org.apache.flink.api.common.functions.InvalidTypesException: The return type of function Custom Source could not be determined automatically, due to type erasure. You can give type information hints by using th…

使用Xshell一键在多个会话中执行多个命令

背景 平时在工作中经常通过ssh远程操作Linux&#xff0c;由于我们负责的服务部署在超过5台服务器&#xff08;相同的代码及路径&#xff09;&#xff0c;每次发布后执行重启都得重复操作5次关闭、检查、启动、查看日志&#xff0c;特别繁琐。 后来发现Xshell 7可以录制脚本&am…