- 在做单台交换机下实现VLAN实验时要注意哪些问题
- 华为交换机VLAN怎么配置?
- 计算机网络实验的实验报告 包括实验2Mac帧、IP包格式分析试验 3交换机 VLAN 划分实验4路由器静态路由配置
- 任务4-1:配置跨交换机实现 VLAN方式操作
计算机网络vlan配置实验(计算机网络vlan配置实验报告)
大家好!今天让创意岭的小编来大家介绍下关于计算机网络vlan配置实验的问题,以下是小编对此问题的归纳整理,让我们一起来看看吧。
开始之前先推荐一个非常厉害的Ai人工智能工具,一键生成原创文章、方案、文案、工作计划、工作报告、论文、代码、作文、做题和对话答疑等等
只需要输入关键词,就能返回你想要的内容,有小程序、在线网页版、PC客户端和批量生成器
问友Ai官网:https://ai.de1919.com。
本文目录:
在做单台交换机下实现VLAN实验时要注意哪些问题
注意:以下实例中的IP地址需要根据实际情况自行更改。一、创建vlan,将端口加入vlan
<Quidway> system-view
[Quidway] vlan 20
[Quidway-vlan20]port e0/2 to e0/12
[Quidway] vlan 30
[Quidway-vlan30]port e0/13 to e0/24
二、配置vlan间路由,S5700是三层交换机,给vlan接口配IP即可实现vlan间通信。所有加入vlan的计算机使用本vlan接口的IP作为网关地址。
[Quidway]interface vlan 20
[Quidway-Vlan-interface20]ip address 192.168.20.1 255.255.255.0
[Quidway]interface vlan 30
[Quidway-Vlan-interface30]ip address 192.168.30.1 255.255.255.0
三、配置路由器和交换机的联通性。
[Quidway]interface vlan 1
[Quidway-Vlan-interface1]ip address 192.168.1.2 255.255.255.0
路由器连接交换机的接口配置IP为192.168.1.1
在S5700上配置默认路由,指向地址为路由器和交换机互联的接口
[Quidway]ip route-static 0.0.0.0 0.0.0.0 192.168.1.1
在路由器上配置两条静态路由,指明vlan20和vlan30网络的位置
[Quidway]ip route-static 192.168.20.0 255.255.255. 0 192.168.1.2
[Quidway]ip route-static 192.168.30.0 255.255.255. 0 192.168.1.2
华为交换机VLAN怎么配置?
华为交换机VLAN配置:system veiw (进入系统视图)
vlan 10(创建vlan 10)
vlan batch 10 to 12 (创建vlan 10 11 12)
interface vlan 10 (进入VLAN 10)
ip address 172.16.10.1 24(设置VLAN 10的IP为172.16.10.1,掩码为24位)
undo vlan 10 (删除vlan 10)
VLAN(Virtual Local Area Network)的中文名为"虚拟局域网"。
虚拟局域网(VLAN)是一组逻辑上的设备和用户,这些设备和用户并不受物理位置的限制,可以根据功能、部门及应用等因素将它们组织起来,相互之间的通信就好像它们在同一个网段中一样,由此得名虚拟局域网。VLAN是一种比较新的技术,工作在OSI参考模型的第2层和第3层,一个VLAN就是一个广播域,VLAN之间的通信是通过第3层的路由器来完成的。与传统的局域网技术相比较,VLAN技术更加灵活,它具有以下优点: 网络设备的移动、添加和修改的管理开销减少;可以控制广播活动;可提高网络的安全性。
在计算机网络中,一个二层网络可以被划分为多个不同的广播域,一个广播域对应了一个特定的用户组,默认情况下这些不同的广播域是相互隔离的。不同的广播域之间想要通信,需要通过一个或多个路由器。这样的一个广播域就称为VLAN。
计算机网络实验的实验报告 包括实验2Mac帧、IP包格式分析试验 3交换机 VLAN 划分实验4路由器静态路由配置
交换机VLAN的划分一.实验目的
通过本次实验,掌握交换机VLAN的配置方法,理解VLAN的作用。(以D-LINK交换机DES-3526为例)
二. 实验环境
1.软硬件要求
· DES-3526一台
· PC机两台
· RS-232 线一条
· 双绞线若干
2. 环境示意图,如图9-16所示:
图9-15
三.实验步骤
(1).把交换机的控制口和PC的串口相连,通过超级终端进入交换机的配置界面,如图9-16所示:
图9-16
这时,输入用户名和密码,如果没有用户名和密码,则按两下回车,进入可配置模式,如图9-17所示:
图9-17
在此模式下,我们可以对交换机进行各种配置,由于是命令行模式,需要掌握一些常用命令,输入“?”,敲回车键,能看到交换机所有的命令, 如图9-18所示
图9-18
2)通过以下命令创建VLAN10和VLAN20,如图9-19所示
图9-19
3)配置完成后,可以用show vlan命令查看配置情况,如图9-20所示:
图9-20
4)把两台PC分别连到VLAN10和VLAN20,用Ping命令进行连通性测试,两台PC不能通讯。
5)把两台PC连到同一VLAN中,用Ping命令进行连通性测试,两台PC能通讯。
六、实验完毕
任务4-1:配置跨交换机实现 VLAN方式操作
一、实验环境:
1、两台CISCO WS-C2960X-24TS-L交换机,交换机名称分别为L2-SW、L3-SW,其中L2-SW作为网关使用。
2、三台安装windows 7电脑,计算机名分别为PC1、PC2、PC3,且微软防火墙关闭。
3、网络拓扑:L2-SW Fa0/1光纤连接L3-SW Fa0/1,PC1网线连接L3-SW Fa0/6,PC2网线连接L3-SW Fa0/11,PC3网线连接L2-SW Fa0/6。
4、VLAN:VLAN 10、VLAN20
5、ACL:VLAN10、VLAN20
6、IP地址规划:
7、一台安装windows 7电脑,计算机名为PC-T,且带COM接口的电脑(或USB转COM线,且安装好驱动)
二、实验步骤:
1、用PC-T通过Console线连接到L2-SW,打开超级终端,建立连线。
2、修改交换机名、设置密码
Switch>enable ? ? ? ? ? ?#进特权模式
Switch#configure ? ? ? ?#进入全局配置模式
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. ?End with CNTL/Z.
Switch(config)#hostname L2-SW ? ? ? #设置交换机名为L2-SW
L2-SW(config)#enable password cisco
L2-SW(config)#exit ? ? ? ? ? ? ? ? ? ? ? ? ? ? #退出全局配置模式,返回上一层
L2-SW#exit ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #退出特权模式
L2-SW>enable ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#输入指令enable进入特权模式,提示输入密码
Password:?
L2-SW#
3、开启Telnet服务
L2-SW>enable
L2-SW#configure
L2-SW(config)#user cisco password cisco ? ? ?#设置用户名和密码
L2-SW(config)#enable password cisco ? ? ? ? ? #设置特权密码,与用户密码是不同的
L2-SW(config)#line vty 0 4 ? ? ? ? ? ? ? ? ? ? ? ? ? ? #进入vty接口
L2-SW(config-line)#login local ? ? ? ? ? ? ? ? ? ? ?#配置vty接口,使用本地数据库用户密码登入
L2-SW(config-line)#end ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #返回全局配置模式
L2-SW#
4、开启Web服务
L2-SW>enable
L2-SW#configure
L2-SW#ip http server ? ? ? #启用Web管理(ip http secure-server启用HTTPS安全连线)
L2-SW#ip http authentication local ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#设置口令验证方式是本地验证
L2-SW#username cisco privilege 15 password 0 cisco ? ? ?#在本地添加用户名和密码
L2-SW(config-line)#end ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #返回全局配置模式
L2-SW#
5、建立VLAN10、20
L2-SW>enable
L2-SW#vlan database ? ? ? ? ? ? ? ? ? ? ? ?#进入vlan配置模式
L2-SW(vlan)#vlan 10 name VLAN10 ? ? ? ? ?#划分vlan 10,名字为VLAN10
VLAN 10 added:
Name: VLAN10
L2-SW(vlan)#vlan 20 name VLAN20 ? ? ? ? ?#划分vlan 20,名字为VLAN20
VLAN 20 added:
Name: VLAN20
L2-SW(vlan)#exit ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#返回特权模式
L2-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L2-SW(config)#interface vlan 10 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#进入VLAN10配置界面
L2-SW(config-if)#ip address 192.168.10.254 255.255.255.0 ? ? ? ? ? ? ?#配置VLAN10管理IP地址
L2-SW(config-if)#exit
L2-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L2-SW(config)#interface vlan 20 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#进入VLAN10配置界面
L2-SW(config-if)#ip address 192.168.20.254 255.255.255.0 ? ? ? ? ? ? ?#配置VLAN10管理IP地址
L2-SW(config-if)#end
6、划分端口至对应VLAN
L2-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L2-SW(config)#interface fastEthernet 0/1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #进入FA0/1端口配置界面
L2-SW(config-if)#switchport trunk allowed vlan all
#将FA0/1端口工作模式改为Trunk,且允许所有VLAN数据
L2-SW(config-if)#no shutdown ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #启用Fa0/1端口
L2-SW(config-if)#exit ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#返回全局配置模式
L2-SW(config)#interface range fastEthernet 0/2-10 ? ? ? ? ? ? ? ? ? ?#进入Fa0/2-10端口配置界面
L2-SW(config-if-range)#switchport access vlan 10 ? ? ? ? ? ? ? ? ? ? #将端口Fa0/2-10划分到VLAN10
L2-SW(config-if-range)#no shutdow ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #启用端口Fa0/2-10
L2-SW(config-if-range)#exit
L2-SW(config)#interface range fastEthernet 0/11-20 ? ? ? ? ? ? ? ? ? ?#进入Fa0/11-20端口配置界面
L2-SW(config-if-range)#switchport access vlan 20 ? ? ? ? ? ? ? ? ? ? ?#将端口Fa0/11-20划分到VLAN20
L2-SW(config-if-range)#no shutdow ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #启用端口Fa0/11-20
L2-SW(config-if-range)#end
L2-SW#write memory ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #保存配置信息
Building configuration...
[OK]
L2-SW# ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #至此,L2-SW配置完成
7、配置L3-SW,参照以上步骤,配置L3-SW相关参数(帐号密码、VLAN、端口归属),IP地址与默认网关配置如下
L3-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L3-SW(config)#interface vlan 10
L3-SW(config-if)#ip address 192.168.10.253 255.255.255.0 ? ? ? ? ? #配置VLAN10管理IP地址
L3-SW(config-if)#exit
L3-SW(config)#interface vlan 20
L3-SW(config-if)#ip address 192.168.20.253 255.255.255.0 ? ? ? ? ? #配置VLAN20管理IP地址
L3-SW(config-if)#exit
L3-SW(config)#ip default-gateway 192.168.10.254 ? ? ? ? ? ? ? ? ? ? ? #配置默认网关
L3-SW(config)#end
L3-SW#write memory ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #保存配置信息
Building configuration...
[OK]
L3-SW# ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #至此,L3-SW配置完成
8、在L2-SW交换机上建立ACL控制列表
L2-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L2-SW(config)#ip access-list extended VLAN10 ? ? ? ? ? ? ? ? ? ? ? ? ?#建立ACL列表,名字VLAN10
L2-SW(config-ext-nacl)#permit ip any 192.168.10.0 0.0.0.255 ? #允许所有IP访问VLAN10网段的IP
L2-SW(config-ext-nacl)#deny ip any 192.168.20.0 0.0.0.255 ? ? ?#禁止所有IP访问VLAN20网段的IP
L2-SW(config-ext-nacl)#exit
L2-SW(config)#ip access-list extended VLAN20 ? ? ? ? ? ? ? ? ? ? ? ? ?#建立ACL列表,名字VLAN20
L2-SW(config-ext-nacl)#permit ip any 192.168.20.0 0.0.0.255 ? #允许所有IP访问VLAN20网段的IP
L2-SW(config-ext-nacl)#deny ip any 192.168.10.0 0.0.0.255 ? ? ?#禁止所有IP访问VLAN10网段的IP
L2-SW(config-ext-nacl)#end
9、应用控制列表到VLAN10、20
L2-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L2-SW(config)#interface vlan 10
L2-SW(config-if)#ip access-group VLAN10 in ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #套用VLAN10控制列表到VLAN10
L2-SW(config-if)#exit
L2-SW(config)#interface vlan 20
L2-SW(config-if)#ip access-group VLAN20 in?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #套用VLAN20控制列表到VLAN20
L2-SW(config-if)#exit
10、至此,交换机配置完成,依题目要求测试,跨交换机同VLAN之间可正常通讯,由于设定了ACL控制列表,不同VLAN之间,无法正常通讯,ACL控制列表基于VLAN,因此,电脑移动到哪个VLAN,都无法与其他VLAN的电脑通讯。
以上就是关于计算机网络vlan配置实验相关问题的回答。希望能帮到你,如有更多相关问题,您也可以联系我们的客服进行咨询,客服也会为您讲解更多精彩的知识和内容。
推荐阅读: