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

 实验要求如下:

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

我这里以学号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分配表

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

(四)VLAN端口分配表

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

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

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

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

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

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
exit
 
int 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 shutdown
 
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
 
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
 
Router(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 up
 
Router(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 up
 
Router(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 shutdown
 
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
 
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
 
Router(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 up
 
Router(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 up
 
Router(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 shutdown
 
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
 
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
 
Router(config-if)#

三、交换机配置图

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

show vlan brief

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

2、交换机2的VLAN配置图

小型企业网络组网与配置仿真实验
(二)TRUNK配置
1、交换机1接口的TRUNK状态图

show interface trunk

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

2、交换机2的VLAN配置图

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

四、路由器配置图

(一)路由器1
1、路由器1端口配置图
show ip interface brief
小型企业网络组网与配置仿真实验

2、路由器1的静态路由表项

show ip route

小型企业网络组网与配置仿真实验
(二)路由器2
1、路由器2端口配置图
小型企业网络组网与配置仿真实验

2、路由器2的静态路由表项

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

五、Ping通图

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

文章来源:https://www.cnaaa.net,转载请注明出处:https://www.cnaaa.net/archives/12243

(0)
凯影的头像凯影
上一篇 2024年7月3日 下午4:49
下一篇 2024年7月4日 下午4:51

相关推荐

  • ip address与ifconfig以及网卡配置文件的总结

    为什么在network -scripts 中配置了网卡文件,nmcli connection show里面看都没有生效 可能是因为NetworkManager和network -scripts产生了冲突,导致配置文件未能生效。您可以尝试手动停止NetworkManager服务,并重启网络服务来使配置文件生效: 如果你想要永久停止NetworkManager服…

    2023年3月22日
    1.1K00
  • ELK日志系统之使用Rsyslog快速方便的收集Nginx日志

    Rsyslog Rsyslog是高速的日志收集处理服务,它具有高性能、安全可靠和模块化设计的特点,能够接收来自各种来源的日志输入(例如:file,tcp,udp,uxsock等),并通过处理后将结果输出的不同的目的地(例如:mysql,mongodb,elasticsearch,kafka等),每秒处理日志量能够超过百万条。 Rsyslog作为syslog的…

    2023年5月24日
    1.1K00
  • 如何在 Kubernetes 下轻松抓取应用网络包

    #1. 宿主机上捕获 我们知道应用其实是运行在 Pod 内的 Container 里的,所以只要定位到 Container 被调度到了哪个 Node 上,在相应的 Node 里,对容器进行抓包即可。 0) 先决条件 需要有宿主机的访问权限 1) 定位 Pod 的 containerID 以及它所运行的宿主机 IP 在 Kubernetes 集群内执行下面这个…

    2023年8月16日
    1.2K00
  • TCP的几个状态 (SYN, FIN, ACK, PSH, RST, URG)

    在TCP层,有个FLAGS字段,这个字段有以下几个标识:SYN, FIN, ACK, PSH, RST, URG。 其中,对于我们日常的分析有用的就是前面的五个字段。 它们的含义是: SYN表示建立连接, FIN表示关闭连接, ACK表示响应, PSH表示有 DATA数据传输, RST表示连接重置。 其中,ACK是可能与SYN,FIN等同时使用的,比如SYN…

    2022年11月19日
    1.4K00
  • 临时的解决防火墙上网不稳定

    某客户的华为防火墙已经工作了十几年,最近有点不正常,每个月总有那么几次断网,接口会自动down,而且每次只能重启了事,但是防火墙重启时间长,次数多了总觉得影响办公。 由于体制原因,申请采购的时间周期会比较长,尤其是在如今这个形势下。 客户问我要个临时的解决方案,于是我就出了个歪招,被客户好好地夸了一番,嘿嘿,本着分享的精神,这事儿也不私藏,说穿了,也很简单。…

    2024年5月20日
    67800

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

在线咨询: QQ交谈

邮件:712342017@qq.com

工作时间:周一至周五,8:30-17:30,节假日休息

关注微信