当前位置:网站首页>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
边栏推荐
- Personnaliser le plug - in GRPC
- Talk about biological live broadcast - genovis Zhang Hongyan antibody specific enzyme digestion technology helps to characterize the structure of antibody drugs
- Summary of JFrame knowledge points 1
- 研发效能度量框架解读
- [Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 2
- 用实际例子详细探究OpenCV的轮廓检测函数findContours(),彻底搞清每个参数、每种模式的真正作用与含义
- 91. (chapitre Cesium) simulation de lancement de fusées cesium
- LeetCode 454. 四数相加 II
- Custom grpc plug-in
- Use of easyexcel
猜你喜欢

Virtualenv+pipenv virtual environment management

邻接矩阵无向图(一) - 基本概念与C语言

Indefinite integral

【20211129】Jupyter Notebook遠程服務器配置

Summary of JFrame knowledge points 1

LeetCode力扣(剑指offer 31-35)31. 栈的压入弹出序列32I.II.III.从上到下打印二叉树33. 二叉搜索树的后序遍历序列34. 二叉树中和为某一值的路径35. 复杂链表的复制
![[classic example] classic list questions @ list](/img/d8/a259e5f9d08eacbef31254d1bc3304.jpg)
[classic example] classic list questions @ list

uniapp 使用 uni-upgrade-center

基于IMDB评论数据集的情感分析
![[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 7](/img/41/e3ecbd49e4bfeab6c6e7d8733fe33a.jpg)
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 7
随机推荐
Technology sharing | MySQL: how about copying half a transaction from the database?
强大、好用、适合程序员/软件开发者的专业编辑器/笔记软件综合评测和全面推荐
MQ-防止消息丢失及重复消费
Sum of factor numbers of interval product -- prefix sum idea + fixed one shift two
比特熊直播间一周年,英雄集结令!邀你来合影!
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 2
Exposure: a white box photo post processing framework reading notes
基于IMDB评论数据集的情感分析
伸展树(一) - 概念和C实现
GID: open vision proposes a comprehensive detection model knowledge distillation | CVPR 2021
Want to ask, is there a discount for opening a securities account? Is it safe to open a mobile account?
LeetCode 454. Add four numbers II
力扣首页简介动画
uniapp 使用 uni-upgrade-center
对于mvvm和mvc的理解
C serialization simple experiment
技术分享 | MySQL:从库复制半个事务会怎么样?
leetcode 406. Queue reconstruction by height
消息队列之监控退款任务批处理过程
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 4