当前位置:网站首页>Switch basic experiment
Switch basic experiment
2022-07-01 12:12:00 【Caker】
The experimental requirements
According to the title requirements
1、pc1 and PC3 The interface is access,pvlan vlan2;
pc2/4/5/6 In the same network segment ; among pc2 You can visit pc4/5/6;
but pc4 You can visit pc5, Cannot access pc6.
2、pc5 Cannot access pc6
So divide 4 individual vlan
PC1 and PC3 stay VLAN2, Use access Interface
PC2 stay VLAN3, Use hybrid Interface
PC4/5 stay VLAN4, Use hybrid Interface
PC6 stay VLAN5, Use hybrid Interface
The planning is completed as shown in the figure
The experimental steps
1、 Create... On the switch vlan
stay SW1 On
[sw1]vlan batch 2 to 5
stay SW2 On
[sw1]vlan batch 2 to 5
stay SW3 On
[sw1]vlan batch 2 to 5
2、 Each interface on the switch is divided into corresponding interfaces vlan in
stay SW1 On
[sw1]int e0/0/3
[sw1-Ethernet0/0/3]port link-type access
[sw1-Ethernet0/0/3]port default vlan 2
[sw1]int e0/0/4
[sw1-Ethernet0/0/4]port hybrid pvid vlan 3
[sw1-Ethernet0/0/4]port hybrid untagged vlan 3 to 5
stay SW2 On
[sw2]int e0/0/3
[sw2-Ethernet0/0/3]port link-type access
[sw2-Ethernet0/0/3]port default vlan 2
[sw2]int e0/0/4
[sw2-Ethernet0/0/4]port hybrid pvid vlan 4
[sw2-Ethernet0/0/4]port hybrid untagged vlan 3 to 4
stay SW3 On
[sw3]int e0/0/2
[sw3-Ethernet0/0/2]port hybrid pvid vlan 4
[sw3-Ethernet0/0/2]port hybrid untagged vlan 3 to 4
[sw3]int e0/0/3
[sw3-Ethernet0/0/3]port hybrid pvid vlan 5
[sw3-Ethernet0/0/3]port default vlan 3 5
3、 trunk main rd
stay SW1 On
[sw1]int e0/0/2
[sw1-Ethernet0/0/2]port link-type trunk
[sw1-Ethernet0/0/2]port trunk allow-pass vlan all
stay SW2 On
[sw2]int e0/0/1
[sw2-Ethernet0/0/1]port link-type trunk
[sw2-Ethernet0/0/1]port trunk allow-pass vlan all
[sw2]int e0/0/2
[sw2-Ethernet0/0/2]port link-type trunk
[sw2-Ethernet0/0/2]port trunk allow-pass vlan all
stay SW3 On
[sw3]int e0/0/1
[sw3-Ethernet0/0/1]port link-type trunk
[sw3-Ethernet0/0/1]port trunk allow-pass vlan all
4、 DHCP obtain IP
route DHCP The pool is built , stay g0/0/0 Interface matching VLAN3/4/5,g0/0/0.1 matching vlan2
To configure DHCP pond
[r2]dhcp enable
[r2]ip pool v2
[r2-ip-pool-v2]gateway-list 192.168.1.1
[r2-ip-pool-v2]network 192.168.1.0 mask 24
[r2]ip pool v345
[r2-ip-pool-v345]gateway-list 192.168.2.1
[r2-ip-pool-v345]network 192.168.2.0 mask 24
although vlan3/4/5 Of vlan Different , But they 3 Is the same broadcast domain , So match directly with a physical interface
vlan2 Directly use sub interface to identify tag matching
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.2.1 255.255.255.0
[r2-GigabitEthernet0/0/0]dhcp select global
[r2]int g0/0/0.1
[r2-GigabitEthernet0/0/0.1]dot1q termination vid 2
[r2-GigabitEthernet0/0/0.1]arp broadcast enable
[r2-GigabitEthernet0/0/0.1]dhcp select global
stay SW1 The hybrid interface used on is vlan2 tagging
[sw1]int e0/0/1
[sw1-Ethernet0/0/1]port hybrid tagged vlan 2
[sw1-Ethernet0/0/1]port hybrid untagged vlan 3 to 5
adopt ipconfig
Command view ip
With PC2 For example
5. Test connectivity
PC2 visit PC1
PC2 visit PC3
PC2 visit PC4
PC2 visit PC5
PC2 visit PC6
PC4 You can visit PC5, Cannot access PC6
PC4 visit PC5
PC4 visit PC6
边栏推荐
- 想问问,证券开户有优惠吗手机开户是安全么?
- Force button homepage introduction animation
- Machine learning - Data Science Library - day two
- Personnaliser le plug - in GRPC
- 【语音信号处理】3语音信号可视化——prosody
- Mechanism and type of CPU context switch
- The operation process of using sugar to make a large data visualization screen
- Computer graduation project asp Net attendance management system vs developing SQLSERVER database web structure c programming computer web page source code project
- Summary of JFrame knowledge points 2
- 【20211129】Jupyter Notebook远程服务器配置
猜你喜欢
Onenet Internet of things platform - mqtts product equipment connected to the platform
强大、好用、适合程序员/软件开发者的专业编辑器/笔记软件综合评测和全面推荐
Leetcode force buckle (Sword finger offer 31-35) 31 Stack push pop-up sequence 32i II. 3. Print binary tree from top to bottom 33 Post order traversal sequence 34 of binary search tree The path with a
About keil compiler, "file has been changed outside the editor, reload?" Solutions for
Onenet Internet of things platform - create mqtts products and devices
Machine learning - Data Science Library - day two
C summary of knowledge points 1
Computer graduation project asp Net hotel room management system VS development SQLSERVER database web structure c programming computer web page source code project
【20211129】Jupyter Notebook遠程服務器配置
二叉堆(一) - 原理与C实现
随机推荐
Joint Time-Frequency and Time Domain Learning for Speech Enhancement
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 4
研发效能度量框架解读
力扣首页简介动画
C summary of knowledge points 1
C#依赖注入(直白明了)讲解 一看就会系列
Golang introduces the implementation method of the corresponding configuration file according to the parameters
如何看懂开发的查询语句
Powerful, easy-to-use, professional editor / notebook software suitable for programmers / software developers, comprehensive evaluation and comprehensive recommendation
91. (cesium chapter) cesium rocket launch simulation
构建外部模块(Building External Modules)
Interpretation of R & D effectiveness measurement framework
Implementation of address book management system with C language
Uniapp uses uni upgrade Center
Explore the contour detection function findcontours() of OpenCV in detail with practical examples, and thoroughly understand the real role and meaning of each parameter and mode
Use set_ Handler filters out specific SystemC wrapping & error messages
Acly and metabolic diseases
Leetcode (Sword finger offer) - 58 - ii Rotate string left
[classic example] classic list questions @ list
Mysql database knowledge collation