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

边栏推荐
- 2022上半年盘点:20+主流数据库重大更新及技术要点汇总
- Canvas cloud shape animation
- Deep understanding of JVM (III) - memory structure (III)
- [Netease Yunxin] playback demo build: unable to convert parameter 1 from "asyncmodalrunner *" to "std:: nullptr\u T"**
- Login box tricks
- Development details of NFT casting trading platform
- MIT science and Technology Review released the list of innovators under the age of 35 in 2022, including alphafold authors, etc
- MySQL之零碎知识点
- Distributed machine learning: model average Ma and elastic average easgd (pyspark)
- Map集合
猜你喜欢

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

Servlet operation principle_ API details_ Advanced path of request response construction (servlet_2)

5g has been in business for three years. Where will innovation go in the future?

基于SSH的网上商城设计

基于eNSP的校园网设计的仿真模拟

Small tools (3) integration knife4j3.0.3 interface document

. Net ORM framework hisql practice - Chapter 1 - integrating hisql

Tubes响应性数据系统的设计与原理

News management system based on SSM

Splitting. JS text title slow loading JS effect
随机推荐
Word中添加代码块(转载)
.NET ORM框架HiSql实战-第一章-集成HiSql
5g business is officially commercial. What are the opportunities for radio and television?
Send the injured baby for emergency medical treatment. Didi's driver ran five red lights in a row
[binary tree] preorder traversal to construct binary search tree
【架构】1366- 如何画出一张优秀的架构图
Redis (II) -- persistence
墨天轮沙龙 | 清华乔嘉林:Apache IoTDB,源于清华,建设开源生态之路
Elastic 8.0: opening a new era of speed, scale, relevance and simplicity
Apache parsing vulnerability (cve-2017-15715)_ Vulnerability recurrence
元宇宙带来的游戏变革会是怎样的?
[sword finger offer] 53 - I. find the number I in the sorted array
The gates of Europe
腾讯云安装mysql数据库
Mo Tianlun salon | Tsinghua qiaojialin: Apache iotdb, originated from Tsinghua, is building an open source ecological road
AnimeSR:可学习的降质算子与新的真实世界动漫VSR数据集
Several points in MySQL that are easy to ignore and forget
联想“双平台”运维解决方案 助力智慧医疗行业智慧管理能力全面提升
Cloud practice of key business migration of Internet of things by well-known Internet housing rental service companies
4 years of working experience, and you can't tell the five communication modes between multithreads. Can you believe it?