当前位置:网站首页>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 !
边栏推荐
- Drools dynamically add, modify, and delete rules
- MySQL indexes and transactions
- Leetcode - Sword finger offer 51 Reverse pairs in an array
- What is the relationship between NFT and metauniverse? How to view the market? The future market trend of NFT
- post请求体内容无法重复获取
- Drools executes the specified rule
- ThreadLocal的简单理解
- Leetcode14 longest public prefix
- 中国交通标志检测数据集
- Error in kubeadm join: [error port-10250]: port 10250 is in use [error fileavailable--etc kubernetes PKI
猜你喜欢
Deep copy event bus
mysql索引和事务
CDA数据分析——AARRR增长模型的介绍、使用
Heap (priority queue)
AAAI 2022 | Peking University & Ali Dharma Institute: pruning and compression of pre training language model based on comparative learning
浏览器node事件循环
CDH存在隐患 : 该角色的进程使用的交换内存为xx兆字节。警告阈值:200字节
寻找二叉树中任意两个数的公共祖先
Deep Copy Event bus
JSON序列化 与 解析
随机推荐
浏览器存储方案
ThreadLocal的简单理解
Leetcode14 longest public prefix
Those logs in MySQL
初始JDBC 编程
In development, why do you find someone who is paid more than you but doesn't write any code?
Interview with meituan, a 34 year old programmer, was rejected: only those under the age of 30 who work hard and earn little overtime
堆(优先级队列)
AAAI 2022 | Peking University & Ali Dharma Institute: pruning and compression of pre training language model based on comparative learning
CDA data analysis -- Introduction and use of aarrr growth model
Sse/avx instruction set and API of SIMD
Thesis translation: 2022_ PACDNN: A phase-aware composite deep neural network for speech enhancement
怎样写一篇赏心悦目的英文数学论文
倍增 LCA(最近公共祖先)
Brush questions --- binary tree --2
浏览器node事件循环
BOM DOM
Deep copy event bus
CDH存在隐患 : 该角色的进程使用的交换内存为xx兆字节。警告阈值:200字节
Leetcode922 sort array by parity II