当前位置:网站首页>VLAN experiment
VLAN experiment
2022-07-02 10:14:00 【wuqing_ five thousand four hundred and fifty】
Their thinking :
1. establish vlan2, take pc1 and pc3 Transfer in to vlan 2 in , And set the interface to access
2. Add a sub interface on the router to put vlan 2, Easy to give vlan 2 The distribution of IP Address , Switch can be 1 Medium 0/0/4 The interface is set to trunk, Allow all to pass
3. stay sw1 and sw2 Connected online settings vlan 2 Can pass , Need to label
4. modify pc4/5 Of PVID, Transfer in separately vlan 4 and vlan 5 in , At the switch 2/3 Set between vlan 4 Label your , At the switch 1/2/3 Set between vlan 5 Do not label , Switch to pc4/5 The interface of needs to be set without labels , Switch to pc6 At the interface of 4 and 5 Label when entering
To configure :
[sw1]int g0/0/1
[sw1-GigabitEthernet0/0/1]port link-
[sw1-GigabitEthernet0/0/1]port link-t
[sw1-GigabitEthernet0/0/1]port link-type a
[sw1-GigabitEthernet0/0/1]port link-type access
[sw1-GigabitEthernet0/0/1]port de
[sw1-GigabitEthernet0/0/1]port default v
[sw1-GigabitEthernet0/0/1]port default vlan
[sw1]int g 0/0/4
[sw1-GigabitEthernet0/0/4]port link-type trunk
[sw1-GigabitEthernet0/0/4]port trunk allow-pass vlan all
[sw1-GigabitEthernet0/0/4]int g 0/0/3
[sw1-GigabitEthernet0/0/3]port hybrid untagged vlan 2[sw1]int g 0/0/3
[sw1-GigabitEthernet0/0/3]port hybrid untagged vlan 4[sw1]int g 0/0/3
[sw1-GigabitEthernet0/0/3]port hybrid untagged vlan 5
[sw2-GigabitEthernet0/0/1]port link-t
[sw2-GigabitEthernet0/0/1]port link-type ac
[sw2-GigabitEthernet0/0/1]port link-type access
[sw2-GigabitEthernet0/0/1]port de
[sw2-GigabitEthernet0/0/1]port default v
[sw2-GigabitEthernet0/0/1]port default vlan 2
[sw2]int g 0/0/3
[sw2-GigabitEthernet0/0/3]port hybrid untagged vlan 2[sw2]int g 0/0/2
[sw2-GigabitEthernet0/0/2]port hybrid pvid vlan 4
[sw2-GigabitEthernet0/0/2]port hybrid untagged vlan 4
[sw2-GigabitEthernet0/0/2]q
[sw2]int g 0/0/3
[sw2-GigabitEthernet0/0/3]port hybrid untagged vlan 4
[sw2]int g 0/0/4
[sw2-GigabitEthernet0/0/4]port hybrid tagged vlan 4
[sw2]int g 0/0/4
[sw2-GigabitEthernet0/0/4]port hybrid untagged vlan 5
[sw2-GigabitEthernet0/0/4]int g 0/0/3
[sw2-GigabitEthernet0/0/3]port hybrid untagged vlan 5
[sw3]int g 0/0/3
[sw3-GigabitEthernet0/0/3]port hybrid tagged vlan 4
[sw3-GigabitEthernet0/0/3]int g 0/0/1
[sw3-GigabitEthernet0/0/1]port hybrid untagged vlan 4
[sw3-GigabitEthernet0/0/1]int g 0/0/2
[sw3-GigabitEthernet0/0/2]port hybrid tagged vlan 4
[sw3]int g 0/0/1
[sw3-GigabitEthernet0/0/1]port hybrid pvid vlan 5
[sw3-GigabitEthernet0/0/1]port hybrid untagged vlan 5
[sw3-GigabitEthernet0/0/1]int g 0/0/3
[sw3-GigabitEthernet0/0/3]port hybrid untagged vlan 5
[sw3-GigabitEthernet0/0/3]int g 0/0/2
[sw3-GigabitEthernet0/0/2]port hybrid tagged vlan 5
[r1]int g 0/0/0.1
[r1-GigabitEthernet0/0/0.1]ip add 192.168.1.1 24
[r1-GigabitEthernet0/0/0.1]dot1q termination vid 2
[r1-GigabitEthernet0/0/0.1]arp broadcast enable
[r1-GigabitEthernet0/0/0.1]q
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.2.1 24
[r1]dhcp enable
[r1]ip pool v2
[r1-ip-pool-v2]network 192.168.1.0 mask 24
[r1-ip-pool-v2]gateway-list 192.168.1.1
[r1-ip-pool-v2]dns-list 114.114.114.114 8.8.8.8
[r1-ip-pool-v2]q
[r1]ip pool v1
[r1-ip-pool-v1]network 192.168.2.0 mask 24
[r1-ip-pool-v1]gateway-list 192.168.2.1
[r1-ip-pool-v1]dns-list 114.114.114.114 8.8.8.8
[r1]int g 0/0/0.1
[r1-GigabitEthernet0/0/0.1]dhcp select global
[r1-GigabitEthernet0/0/0.1]q
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]dhcp select global
边栏推荐
- 2837xd 代码生成——补充(3)
- Project practice, redis cluster technology learning (10)
- It is the most difficult to teach AI to play iron fist frame by frame. Now arcade game lovers have something
- 滲透測試的介紹和防範
- JDBC review
- 【虚幻】自动门蓝图笔记
- Project practice, redis cluster technology learning (6)
- Matlab代码生成之SIL/PIL测试
- XA Transaction SQL Statements
- Bookmark collection management software suspension reading and data migration between knowledge base and browser bookmarks
猜你喜欢
Memories of a chat
Sil/pil test of matlab code generation
Image recognition - data annotation
The latest progress and development trend of 2022 intelligent voice technology
Remember the use of add method once
What wires are suitable for wiring on bread board?
PI control of three-phase grid connected inverter - off grid mode
2837xd code generation - stateflow (1)
2837xd代码生成模块学习(4)——idle_task、Simulink Coder
Matlab generates DSP program -- official routine learning (6)
随机推荐
2837xd Code Generation - Supplement (1)
How to judge the quality of primary market projects when the market is depressed?
阿里云短信服务
Matlab generates DSP program -- official routine learning (6)
Blender多鏡頭(多機比特)切換
The latest progress and development trend of 2022 intelligent voice technology
PI control of three-phase grid connected inverter - off grid mode
XA Transaction SQL Statements
Project practice, redis cluster technology learning (11)
[200 Shengxin literatures] 95 multiomics exploration TNBC
[ue5] blueprint making simple mine tutorial
2.14 is it Valentine's day or Valentine's day when the mainstream market continues to fluctuate and wait for changes?
Project practice, redis cluster technology learning (VIII)
Attack and defense world web advanced area unserialize3
Web security and defense
Skywalking theory and Practice
阿里云ack介绍
2837xd 代码生成——StateFlow(1)
Kinect DK obtains color RGB images in cv:: mat format (used in openpose)
2837xd code generation - stateflow (4)