当前位置:网站首页>VLAN experiment
VLAN experiment
2022-06-29 05:42:00 【love_ by】
One 、 Experimental content
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;PC4 You can visit PC5, Cannot access PC6;PC5 Cannot access PC6
3、PC1/3 And PC2/4/5/6 Not in a segment
4、 all PC adopt DHCP obtain ip Address , And PC1/3 Normal access PC2/4/5/6
Two 、 Topology design

3、 ... and 、 The implementation of
1、 establish VLAN, Divide interfaces ;PC1/3 by VLAN2;PC4/5 by VLAN3;PC6 by VLAN4
The switch corresponds to PC1/3 The interface for access type ; Corresponding to the rest PC The interface type of is hybrid
Configuration command :
LSW1 For example
[LSW1]vlan batch 2 to 4 establish VLAN
[LSW1]int Ethernet 0/0/3
[LSW1-Ethernet0/0/3]port link-type access Define the interface type
[LSW1-Ethernet0/0/3]port default vlan 2 Divide the interface to VLAN2
2、 Configure Allow List ;PC2 allow VLAN1/3/4 Of traffic ;PC4/5 allow VLAN1/3;PC6 allow VLAN1/4
Configuration command (PC2 For example ):
[LSW1-Ethernet0/0/4]port hybrid untagged vlan 1 3 4
3、 Configure Division LSW1 Of Eth0/0/1 Outside the interface trunk main rd
[LSW1]int Ethernet 0/0/2 Access interface
[LSW1-Ethernet0/0/2]port link-type trunk Define the interface type
[LSW1-Ethernet0/0/2]port trunk allow-pass vlan all Discharge all flow
Be careful :trunk Will only let go of the existing vlan Traffic , So even if there is no need to divide interfaces on the switch , You also need to create an empty VLAN
such as ,PC6 Belong to VLAN4, Traffic wants to reach PC2, Need to go through LSW2, If LSW2 There is no counterpart VLAN4, that LSW2 Forwarding is not possible
4、 Configure address pool
Configuration command
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.2.254 24 Set up the gateway
[r1-GigabitEthernet0/0/0]q
[r1]dhcp enable Turn on DHCP service
[r1]ip pool a Create an address pool
[r1-ip-pool-a]network 192.168.2.0 mask 24 Write address
[r1-ip-pool-a]gateway-list 192.168.2.254
[r1-ip-pool-a]dns-list 114.114.114.114 8.8.8.8 Tell the gateway 、 Domain name resolution server
[r1-ip-pool-a]q
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]dhcp select global Interface call
[r1]int g 0/0/0.1
[r1-GigabitEthernet0/0/0.1]ip add 192.168.1.254 24
[r1-GigabitEthernet0/0/0.1]q
[r1]ip pool VLAN2
[r1-ip-pool-VLAN2]network 192.168.1.0 mask 24
[r1-ip-pool-VLAN2]gateway-list 192.168.1.254
[r1-ip-pool-VLAN2]dns-list 114.114.114.114 8.8.8.8
[r1-ip-pool-VLAN2]q
[r1]int g 0/0/0.1
[r1-GigabitEthernet0/0/0.1]dhcp select global
[r1-GigabitEthernet0/0/0.1]dot1q termination vid 2 Distribution management VLAN
[r1-GigabitEthernet0/0/0.1]arp broadcast enable Turn on ARP radio broadcast
5、 To configure LSW1 Of Eth0/0/1 Interface
[LSW1]int Eth0/0/1
[LSW1-Ethernet0/0/1]port hybrid untagged vlan 1 3 4
[LSW1-Ethernet0/0/1]port hybrid tagged vlan 2
6、 test


PC1、PC2 Successfully obtained the addresses of different network segments

rest PC Also through DHCP Learn the corresponding IP Address


PC1 Access to all PC

PC2 You can visit PC4/5/6

PC4 You can visit PC5, No access PC6
PC5 Cannot access PC6
All requirements are completed
边栏推荐
- JS messagechannel transport
- D Author: import C programming in D
- 2022 recommended quantum industry research industry development planning prospect investment market analysis report (the attachment is a link to the online disk, and the report is continuously updated
- innography
- Résultats D - exam de Qinhuangdao au cours des 20 dernières années
- Set column width in jitter - set column width in jitter
- It turns out that the joys and sorrows of programmers are not interlinked
- 2022 recommended property management industry research report industry development prospect market investment analysis (the attachment is the link to the online disk, and the report is continuously up
- 2022-2028 global and Chinese industrial digital electronic blasting detonator Market Status and future development trend
- Parsing rshub document auto generation API
猜你喜欢

Analysis report on the investment market situation of the development planning prospect of the recommended chip industry research industry in 2022 (the attachment is a link to the network disk, and th

Mvcc principle in MySQL
![[IOT] description of renaming the official account](/img/54/43189f34b81a7441cd46d5c2066970.png)
[IOT] description of renaming the official account "Jianyi commerce" to "product renweipeng"

2022 community group buying industry research industry development planning prospect investment market analysis report (the attachment is the online disk link, and the report is continuously updated)

ICLR is going to have a big discussion on the deep generation model. Max welling and the winner of the AAAI million dollar award are here. Bengio is one of the organizers

How to use thread stack location

HTTP Caching Protocol practice

Analysis report on the investment market of the development planning prospect of the recommended wind power industry research industry in 2022 (the attachment is a link to the network disk, and the re

Software architecture experiment summary

5000+ word interpretation | Product Manager: how to do a good job in component selection?
随机推荐
In 2022, I haven't found a job yet. I have been unemployed for more than one year. What is the "old tester" for eight years?
Analysis report on the investment market of the development planning prospect of the recommended rare earth industry research industry in 2022 (the attachment is a link to the online disk, and the rep
嵌入式RTOS
The win11 file resource manager has an explicit Caton, and Microsoft promises to improve the performance in 2022
机器人强化学习——第一人称 VS 第三人称
Domain name hack
2022 recommended cloud computing industry research report investment strategy industry development prospect market analysis (the attachment is a link to the online disk, and the report is continuously
2022-2028 global and Chinese industrial electronic detonator Market Status and future development trend
Kubernetes backup disaster recovery service product experience tutorial
What has urbanization brought to our mental health and behavior?
51 single chip microcomputer learning notes 7 -- Ultrasonic Ranging
(practice C language every day) matrix
2-nitro-5,10,15,20-tetra (3,5-dimethoxyphenyl) porphyrin (no2tdmpp) H2) /5,10,15,20-tetra (4-methylphenyl) porphyrin (TMPP) H2) Qiyue porphyrin products
IDENTITY
Notebook access desktop shared disk
5000+ word interpretation | Product Manager: how to do a good job in component selection?
ES6 Modularization: export /import
Service grid ASM year end summary: how do end users use the service grid?
Tcapulusdb Jun · industry news collection (VI)
Collection of common terms used in satellite navigation