当前位置:网站首页>Switching routing (VLAN) experiment
Switching routing (VLAN) experiment
2022-06-30 18:07:00 【Kenneth~ Xiao Xiao】

step 1: analysis
1、 It can be seen from the picture that pc1 and pc3 The interface is access Interface , And divided into VLAN2 in , Given a network segment 192.168.1.0/24, Router r1 Set sub interface management pc1 and pc3, And set... For the sub interface dhcp send ip Automatic access to
2、pc2、4、5、6 In the same network segment , among pc2 Divide VLAN3,pc4、5 Divide VLAN4,pc6 Divide vlan5, Use hybrid mode to configure pc With the switch VLAN
3、pc2 The interface connecting the switch allows VLAN3 Up ,VLAN3、4、5 Peel off the label and come down
4、pc4 The interface connecting the switch allows VLAN4 Up ,VLAN3、4 Peel the label off
5、pc5 The interface connecting the switch allows VLAN4 Up ,VLAN3、4 Peel the label off
6、pc6 The interface connecting the switch allows VLAN5 Up ,VLAN3、5 Peel the label off
7、sw1 and sw2 Configuration between trunk main rd ,sw2 and sw3 Mixed trunk roads are arranged between
8、r1 and sw1 You can put pc2、4、5、6 as VLAN1, Therefore, mixed trunk roads are provided
step 2: Build simulation diagram

step 3: Create... On the switch VLAN, And switch the interface to VLAN
lsw1:
system-view
[Huawei]sys lsw1
[lsw1]vlan batch 2 to 5
[lsw1]int g0/0/1
[lsw1-GigabitEthernet0/0/1]port hybrid tagged vlan 2
[lsw1-GigabitEthernet0/0/1]port hybrid untagged vlan 3 to 5
[lsw1-GigabitEthernet0/0/1]int g0/0/2
[lsw1-GigabitEthernet0/0/2]port link-type access
[lsw1-GigabitEthernet0/0/2]port default vlan 2
[lsw1]int g0/0/3
[lsw1-GigabitEthernet0/0/3]port hybrid pvid vlan 3
[lsw1-GigabitEthernet0/0/3]port hybrid untagged vlan 3 to 5
[lsw1]int g0/0/4
[lsw1-GigabitEthernet0/0/4]port link-type trunk
[lsw1-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 to 5

lsw2:
system-view
[Huawei]sysname lsw2
[lsw2]vlan batch 2 to 5
[lsw2]int g0/0/1
[lsw2-GigabitEthernet0/0/1]port hybrid tagged vlan 2 to 5
[lsw2-GigabitEthernet0/0/1]int g0/0/2
[lsw2-GigabitEthernet0/0/2]port link-type access
[lsw2-GigabitEthernet0/0/2]port default vlan 2
[lsw2-GigabitEthernet0/0/2]int g0/0/3
[lsw2-GigabitEthernet0/0/3]port hybrid pvid vlan 4
[lsw2-GigabitEthernet0/0/3]port hybrid untagged vlan 3 4
[lsw2-GigabitEthernet0/0/3]int g0/0/4
[lsw2-GigabitEthernet0/0/4]port hybrid tagged vlan 2 to 5

lsw3:
[Huawei]sysname lsw3
[lsw3]vlan batch 2 to 5
[lsw3]int g0/0/1
[lsw3-GigabitEthernet0/0/1]port hybrid tagged vlan 2 to 5
[lsw3-GigabitEthernet0/0/1]int g0/0/2
[lsw3-GigabitEthernet0/0/2]port hybrid pvid vlan 4
[lsw3-GigabitEthernet0/0/2]port hybrid untagged vlan 3 4
[lsw3-GigabitEthernet0/0/2]int g0/0/3
[lsw3-GigabitEthernet0/0/3]port hybrid pvid vlan 5
[lsw3-GigabitEthernet0/0/3]port hybrid untagged vlan 3 5

step 4: Configure router r1, And configuration dhcp service
[Huawei]sys
[Huawei]sys r1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip address 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 address 192.168.2.1 24
[r1-GigabitEthernet0/0/0.1]arp broadcast enable
[r1]dhcp enable
[r1]ip pool a
[r1-ip-pool-a]network 192.168.1.0 mask 24
[r1-ip-pool-a]gateway-list 192.168.1.1
[r1-ip-pool-a]dns-list 114.114.114.114
[r1]ip pool b
[r1-ip-pool-b]network 192.168.2.0 mask 24
[r1-ip-pool-b]gateway-list 192.168.2.1
[r1-ip-pool-b]dns-list 114.114.114.114
[r1-ip-pool-b]q
[r1]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
step 5:pc End automatic access ip Address






step 6: test
1、pc1 You can visit pc2、3、4、5、6


2、pc2 You can visit pc4、5、6

3、pc4 You can visit pc5, Cannot access pc6

4、pc5 Cannot access pc6

边栏推荐
- 编译生成busybox文件系统
- IEEE TBD SCI impact factor increased to 4.271, ranking Q1!
- 零基础也能做Apple大片!这款免费工具帮你渲染、做特效、丝滑展示
- 同济、阿里的CVPR 2022最佳学生论文奖研究了什么?这是一作的解读
- Babbitt | yuanuniverse daily must read: minors ask for a refund after a reward. The virtual anchor says he is a big wrongdoer. How do you think of this regulatory loophole
- Exch:exchange server 2013 is about to end support
- MySQL reports that the column timestamp field cannot be null
- Canvas mouse control gravity JS effect
- 流批一体在京东的探索与实践
- 后渗透之文件系统+上传下载文件
猜你喜欢

Redis (V) - advanced data types

Flutter custom component

Deep understanding of JVM (II) - memory structure (II)

6 张图带你搞懂 TCP 为什么是三次握手?

Small tools (3) integration knife4j3.0.3 interface document

分享 5 大常用的特征选择方法,机器学习入门必看!!!

基于SSM的新闻管理系统

Alexnet of CNN classic network (Theory)

Compile and generate busybox file system

Mo Tianlun salon | Tsinghua qiaojialin: Apache iotdb, originated from Tsinghua, is building an open source ecological road
随机推荐
ABAP publish restful service
基于SSH的客户关系CRM管理系统
Redis (V) - advanced data types
港科大&MSRA新研究:关于图像到图像转换,Finetuning is all you need
Deep understanding of JVM (IV) - garbage collection (I)
【剑指Offer】52. 两个链表的第一个公共节点
分布式机器学习:模型平均MA与弹性平均EASGD(PySpark)
Importing alicloud ECS locally to solve deployment problems
.NET ORM框架HiSql实战-第一章-集成HiSql
Apache 解析漏洞(CVE-2017-15715)_漏洞复现
MySQL之零碎知识点
[Architecture] 1366- how to draw an excellent architecture diagram
Flutter custom component
Php8.0 environment detailed installation tutorial
Canvas cloud shape animation
MIT science and Technology Review released the list of innovators under the age of 35 in 2022, including alphafold authors, etc
[BJDCTF2020]The mystery of ip|[CISCN2019 华东南赛区]Web11|SSTI注入
Course design for the end of the semester: product sales management system based on SSM
巴比特 | 元宇宙每日必读:未成年人打赏后要求退款,虚拟主播称自己是大冤种,怎么看待这个监管漏洞?...
Taishan Office Technology Lecture: how to align and draw words of different sizes on the same line