当前位置:网站首页>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:


实验结束!!!
边栏推荐
猜你喜欢
随机推荐
Jenkins configuration nail notification
01| 数据类型
C专家编程 第9章 再论数组 9.3 为什么C语言把数组形参当做指针
智能计数器控制板的功能及应用有哪些?
渗透测试-域环境下的信息收集
条件变量condition_variable实现线程同步
【21天学习挑战赛】二分查找题目之寻找峰值
20220526动态规划:不同路径
【信号去噪】基于Sage-Husa自适应卡尔曼滤波器实现海浪磁场噪声抑制及海浪磁场噪声的产生附matlab代码
sql语句实现按顺序排序而不是拼音首字母排序
Solve the Final Fantasy 13-2 Clock Puzzle with DFS
2022微服务面试题 最新50道题(含答案解析)
MySQL相关知识 和 数据的存储相关知识
SQLserver重新累计问题
20220527动态规划:零钱兑换
C专家编程 第10章 再论指针 10.1 多维数组的内存布局
Financial Industry Software Testing Interview Questions (with Answers) | Getting Started Guide
powershell 执行策略
二分搜索法和二叉搜索树
ros入门(安装)









