当前位置:网站首页>Exchange VLAN experiment
Exchange VLAN experiment
2022-08-09 03:04:00 【turkey sauce】
实验题目:
Analyzing experiments requires creating a topology and planningVLAN区域:
实验拓扑图如下:
Configure the switch first,Then configure it on the router,最后完成pc上的IPacquisition and experimental verification
实验过程
sw1:
[Huawei]sysname sw1
[sw1]vlan batch 2 to 5 //创建vlanConfigure switch connectionspc之间的接口
[sw1-Ethernet0/0/1]port link-type access
[sw1-Ethernet0/0/1]port default vlan 2
[sw1-Ethernet0/0/2]port hybrid pvid vlan 3
[sw1-Ethernet0/0/2]port hybrid untagged vlan 3 to 5
[sw1-Ethernet0/0/2]qConfigure the interfaces connected between switches
[sw1]int g0/0/2
[sw1-GigabitEthernet0/0/2]port link-type trunk
[sw1-GigabitEthernet0/0/2]port trunk allow-pass vlan 2 to 5
[sw1-GigabitEthernet0/0/2]int g0/0/1Configure the interface that the switch connects to the router
[sw1-GigabitEthernet0/0/1]port hybrid tagged vlan 2
[sw1-GigabitEthernet0/0/1]port hybrid untagged
[sw1-GigabitEthernet0/0/1]port hybrid untagged vlan 3 to 5 //Stripping tags in promiscuous mode is allowedvlan3到vlan5流量进入
sw2:
[Huawei]sysname sw2
[sw2]vlan batch 2 to 5 //创建vlanConfigure switch connectionspc之间的接口
[sw2]int e0/0/1
[sw2-Ethernet0/0/1]port link-type access
[sw2-Ethernet0/0/1]port default vlan 2
[sw2-Ethernet0/0/1]in e0/0/2
[sw2-Ethernet0/0/2]port hybrid pvid vlan 4
[sw2-Ethernet0/0/2]port hybrid untagged vlan 3 to 4 //Stripping tags in promiscuous mode is allowedvlan3和vlan4流量进入Configure the interfaces connected between switches
[sw2-Ethernet0/0/2]int g0/0/2
[sw2-GigabitEthernet0/0/2]port link-type trunk
[sw2-GigabitEthernet0/0/2]port trunk allow-pass vlan 2 to 5
[sw2-GigabitEthernet0/0/2]int g0/0/1
[sw2-GigabitEthernet0/0/1]port hybrid tagged vlan 2 to 5
sw3:
[Huawei]sysname sw3
[sw3]vlan batch 2 to 5 //创建vlanConfigure switch connectionspc之间的接口
[sw3]int e0/0/1
[sw3-Ethernet0/0/1]port hybrid pvid vlan 4
[sw3-Ethernet0/0/1]port hybrid untagged vlan 3 to 4
[sw3-Ethernet0/0/1]int e0/0/2
[sw3-Ethernet0/0/2]port hybrid pvid vlan 5
[sw3-Ethernet0/0/2]port hybrid untagged vlan 3 5 //Stripping tags in promiscuous mode is allowedvlan3和vlan5流量进入Configure the interfaces connected between switches
[sw3-Ethernet0/0/2]int g0/0/1
[sw3-GigabitEthernet0/0/1]port link-type trunk
[sw3-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 to 5
Finally, configure and turn on the routerdhcp
[huawei]sysname r1
Create and configure sub-interfacesip和管理vlan,以及开启arp
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[r1-GigabitEthernet0/0/0]int g0/0/0.1
[r1-GigabitEthernet0/0/0.1]dot1q termination vid 2
[r1-GigabitEthernet0/0/0.1]ip add 192.168.2.1 24
[r1-GigabitEthernet0/0/0.1]arp broadcast enable
[r1-GigabitEthernet0/0/0.1]q配置物理接口ip,并开启接口dhcpand create ponds
[r1]dhcp enable[r1]ip pool v2
[r1-ip-pool-v2]network 192.168.2.0 mask 24
[r1-ip-pool-v2]gateway-list 192.168.2.1
[r1-ip-pool-v2]dns-list 114.114.114.114 8.8.8.8
[r1-ip-pool-v2]q
[r1]ip pool v3
[r1-ip-pool-v3]network 192.168.1.0 mask 24
[r1-ip-pool-v3]gateway-list 192.168.1.1
[r1-ip-pool-v3]dns-list 114.114.114.114 8.8.8.8在接口上开启dhcp!!!
[r1-ip-pool-v3]int g0/0/0
[r1-GigabitEthernet0/0/0]dhcp select global
[r1-GigabitEthernet0/0/0]int g0/0/0.1
[r1-GigabitEthernet0/0/0.1]dhcp select global
View the pond:
实验验证
pceach successfully obtainedip地址
pc1/3 分别ping 通 pc 2/4/5/6
pc1:
pc2:
实验结束!!!
边栏推荐
- redis集群详解
- Recently, I have seen a lot of people who want to study by themselves or enroll in classes but don’t know how to choose. I will tell you about it today.
- 【图像去噪】基于边缘增强扩散 (cEED) 和 Coherence Enhancing Diffusion (cCED) 滤波器实现图像去噪附matlab代码
- 【es6】教程 Symbol数据以及迭代器和生成器
- 20220529设计问题:二叉树的序列化与反序列化
- Postman interface test [official website] latest version installation and use tutorial
- Building PO layered architecture of automated testing framework from 0
- 评估深度学习模型的指标:混淆矩阵、准确率、精确率和召回率
- What are the most popular automated testing tools in 2022?The most complete and most detailed of the entire network is here
- C专家编程 第9章 再论数组 9.7 轻松一下---软件/硬件平衡
猜你喜欢
Solve the Final Fantasy 13-2 Clock Puzzle with DFS
评估深度学习模型的指标:混淆矩阵、准确率、精确率和召回率
7月更新速递 | 产品实验室N+1,EasyV For Unreal上线!
xml引配置文件
三箭资本濒临破产?市场陷入1907年恐慌之中?加密监管不可避免
开发工程师必备————【Day05】UDP协议;进程的并发与并行
Jenkins environment deployment, (packaging, publishing, deployment, automated testing)
手把手教你uniapp接入聊天IM即时通讯功能-源码分享
i18n 国际化
dice和iou
随机推荐
sql语句实现按顺序排序而不是拼音首字母排序
Linux安装Redis
【网络教程】IPtables官方教程--学习笔记3
普通人如何增加收入
What are the most popular automated testing tools in 2022?The most complete and most detailed of the entire network is here
独立机器连接cdh的spark集群,远程提交任务(绝对可以成功,亲测了n遍)
【es6】教程 Symbol数据以及迭代器和生成器
flatMap() :对每个元素执行映射函数并将结果展平
Doris从理论详解到千万级数据量场景使用
What aspects should we start with for interface security testing?
《独行月球》:独孤月的两次选择,让一个“中间人”成为大英雄
Jenkins environment deployment, (packaging, publishing, deployment, automated testing)
C语言力扣第56题之合并区间。排序+双指针
【机器学习】21天挑战赛学习笔记(三)
如何应对网络攻击?
智能计数器控制板的功能及应用有哪些?
C专家编程 第9章 再论数组 9.1 什么时候数组与指针相同
对线面试官实现去重和幂等
JavsScript系列-Promise的错误捕获
【面试整理】-- 多线程