当前位置:网站首页>VLAN experiment
VLAN experiment
2022-07-02 12:36:00 【Confused classmate Z】

The experimental requirements :
1/pc1 and pc3 The interface is access; pvlan vlan2;
2/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
3、PC1/3 And PC2/4/5/6 be not in - - Net segment
4、 all PC adopt DHCP obtain ip Address , And PC1/3 Normal access

SW1 To configure
[sw1]vlan batch 2 to 5
[sw1]int g0/0/2
[sw1-GigabitEthernet0/0/2]port link-type access
[sw1-GigabitEthernet0/0/2]port default vlan 2
[sw1-GigabitEthernet0/0/2]int g0/0/3
[sw1-GigabitEthernet0/0/3]port hybrid pvid vlan 3
[sw1-GigabitEthernet0/0/3]port hybrid untagged vlan 3 to 5
[sw1-GigabitEthernet0/0/3]int g0/0/4
[sw1-GigabitEthernet0/0/4]port link-type trunk
[sw1-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 to 5
[sw1-GigabitEthernet0/0/4]int g0/0/1
[sw1-GigabitEthernet0/0/1]port hybrid tagged vlan 2
[sw1-GigabitEthernet0/0/1]port hybrid untagged vlan 3 to 5
SW2 To configure
[sw2]vlan batch 2 to 5
[sw2]int g0/0/1
[sw2-GigabitEthernet0/0/1]port link-type trunk
[sw2-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 to 5
[sw2-GigabitEthernet0/0/1]int g0/0/2
[sw2-GigabitEthernet0/0/2]port link-type access
[sw2-GigabitEthernet0/0/2]port default vlan 2
[sw2-GigabitEthernet0/0/2]int g0/0/3
[sw2-GigabitEthernet0/0/3]port hybrid pvid vlan 4
[sw2-GigabitEthernet0/0/3]port hybrid untagged vlan 3 to 4
[sw2-GigabitEthernet0/0/3]int g0/0/4
[sw2-GigabitEthernet0/0/4]port link-type trunk
[sw2-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 to 5
SW3 To configure
[sw3]vlan batch 2 to 5
[sw3]int g0/0/1
[sw3-GigabitEthernet0/0/1]port link-type trunk
[sw3-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 to 5
[sw3-GigabitEthernet0/0/1]int g0/0/2
[sw3-GigabitEthernet0/0/2]port hybrid pvid vlan 4
[sw3-GigabitEthernet0/0/2]port hybrid untagged vlan 3 to 4
[sw3-GigabitEthernet0/0/2]int g0/0/3
[sw3-GigabitEthernet0/0/3]port hybrid pvid vlan 5
[sw3-GigabitEthernet0/0/3]port hybrid untagged vlan 3 to 5
Router configuration
[r1]dhcp enable
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[r1-GigabitEthernet0/0/0]dhcp select global
[r1-GigabitEthernet0/0/0]int g0/0/0.1
[r1-GigabitEthernet0/0/0.1]ip add 192.168.2.1 24
[r1-GigabitEthernet0/0/0.1]dot1q termination vid 2
[r1-GigabitEthernet0/0/0.1]arp broadcast enable
[r1-GigabitEthernet0/0/0.1]dhcp select global
[r1]ip pool p1
[r1-ip-pool-p1]network 192.168.1.0 mask 24
[r1-ip-pool-p1]gateway-list 192.168.1.1
[r1-ip-pool-p1]q
[r1]ip pool p2
[r1-ip-pool-p2]network 192.168.2.0 mask 24
[r1-ip-pool-p2]gateway-list 192.168.2.1
pc1 To 6 Get the address
PC1:192.168.2.254
PC2: 192.168.1.254
PC3:192.168.2.253
PC4:192.168.1.253
PC5:192.168.1.252
PC6:192.168.1.251
PC2 Sure ping through PC4/5/6


PC4 Access to PC5 Cannot access PC6

The experiment is finished !
边栏推荐
- Leetcode - Sword finger offer 37, 38
- "As a junior college student, I found out how difficult it is to counter attack after graduation."
- LeetCode—剑指 Offer 51. 数组中的逆序对
- CV2 in OpenCV VideoWriter_ Fourcc() function and cv2 Combined use of videowriter() function
- CDA数据分析——Excel数据处理的常见知识点归纳
- (C language) octal conversion decimal
- Shuttle encapsulated AppBar
- Maximum profit of jz63 shares
- Addition, deletion, modification and query of MySQL table (Advanced)
- Initial JDBC programming
猜你喜欢

Distributed machine learning framework and high-dimensional real-time recommendation system

In development, why do you find someone who is paid more than you but doesn't write any code?

Deep understanding of P-R curve, ROC and AUC

包管理工具

浏览器存储方案

Go学习笔记—多线程
![[old horse of industrial control] detailed explanation of Siemens PLC TCP protocol](/img/13/9002244555ebe8a61660c2506993fa.png)
[old horse of industrial control] detailed explanation of Siemens PLC TCP protocol

AI中台技术调研

Differences between nodes and sharding in ES cluster

Deep Copy Event bus
随机推荐
BOM DOM
Programmers can't find jobs after the age of 35? After reading this article, you may be able to find the answer
CDA data analysis -- common knowledge points induction of Excel data processing
drools中then部分的写法
Map和Set
深拷贝 事件总线
Deep Copy Event bus
排序---
Embedded Software Engineer career planning
Is the neural network (pinn) with embedded physical knowledge a pit?
Simple use of drools decision table
趣味 面试题
arcgis js 4.x 地图中加入图片
CDA数据分析——AARRR增长模型的介绍、使用
Record the range of data that MySQL update will lock
防抖 节流
堆(优先级队列)
async/await 异步函数
China traffic sign detection data set
1380. Lucky numbers in the matrix [two-dimensional array, matrix]