当前位置:网站首页>Serial of H3CNE experiment column - VLAN configuration experiment, access and trunk
Serial of H3CNE experiment column - VLAN configuration experiment, access and trunk
2022-06-24 16:26:00 【Network technology alliance station】
What I bring to you today is h3cne The most basic in the experiment vlan experiment , Please look at the catalogue :
- One 、 Experiment contents and objectives
- Two 、 Experimental networking diagram
- 3、 ... and 、 Experimental process
- 3、 ... and 、 List of commands in the experiment
- Four 、VLAN Interview technical questions
One 、 Experiment contents and objectives
Complete this experiment , You should be able to :
- master VLAN How it works
- master Access Link ports and Trunk Basic configuration of link ports
Two 、 Experimental networking diagram
VLAN Experimental environment diagram
3、 ... and 、 Experimental process
3.1 Experiment task one : To configure Access Link port
The task of this experiment is to configure Access Link port PC In a different place VLAN, Isolation PC between The interview of , So that we can deepen our understanding of Access Link port understanding .
Step one : Establish a physical connection
according to VLAN Connect the experimental environment diagram , Check the software version and configuration information of the equipment , Ensure that the software version of each device meets the requirements , All configurations are in the initial state . If the configuration does not meet the requirements , Please erase the configuration file in the device in user mode , Then restart the device to initialize the system with default configuration parameters .
The above steps may use the following commands :
<SWA> display version <SWA> reset saved-configuration <SWA> reboot
Step two : Observe the default VLAN
Check on the switch VLAN, As shown below :
[SWA]display vlan The following VLANs exist: 1(default) [SWA]display vlan 1 VLAN ID: 1 VLAN Type: static Route Interface: not configured Description: VLAN 0001 Tagged Ports: none Untagged Ports: GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/4 GigabitEthernet1/0/5 GigabitEthernet1/0/6 GigabitEthernet1/0/7 GigabitEthernet1/0/8 GigabitEthernet1/0/9 GigabitEthernet1/0/10 GigabitEthernet1/0/11 GigabitEthernet1/0/12 GigabitEthernet1/0/13 GigabitEthernet1/0/14 GigabitEthernet1/0/15 GigabitEthernet1/0/16 GigabitEthernet1/0/17 GigabitEthernet1/0/18 GigabitEthernet1/0/19 GigabitEthernet1/0/20 GigabitEthernet1/0/21 GigabitEthernet1/0/22 GigabitEthernet1/0/23 GigabitEthernet1/0/24 GigabitGigabitEthernet1/1/1 GigabitGigabitEthernet1/1/2 GigabitGigabitEthernet1/1/3 GigabitGigabitEthernet1/1/4 [SWA]display interface GigabitEthernet 1/0/1 …… PVID: 1 Mdi type: auto Port link-type: access Tagged VLAN ID : none Untagged VLAN ID : 1 Port priority: 0 ……
From the above output , The default on the switch VLAN yes VLAN 1, All ports are in VLAN 1 in ; Port of PVID yes 1, And is Access Link port type .
Step three : To configure VLAN And add ports
Respectively in SWA and SWB To create a VLAN 2, And will PCA and PCC Connected port GigabitEthernet1/0/1 Add to VLAN 2 in .
To configure SWA:
[SWA]vlan 2 [SWA-vlan2]port GigabitEthernet 1/0/1
To configure SWB:
[SWB]vlan 2 [SWB-vlan2]port GigabitEthernet 1/0/1
View information about... On the switch VLAN 2 Information about , As shown below :
[SWA]display vlan The following VLANs exist: 1(default), 2 [SWA]display vlan 2 VLAN ID: 2 VLAN type: Static Route interface: Not configured Description: VLAN 0002 Name: VLAN 0002 Tagged Ports: none Untagged Ports: GigabitEthernet1/0/1 [SWB]display vlan The following VLANs exist: 1(default), 2 [SWB]display vlan 2 VLAN ID: 2 VLAN type: Static Route interface: Not configured Description: VLAN 0002 Name: VLAN 0002 Tagged ports: None Untagged Ports: GigabitEthernet1/0/1
Step four : test VLAN The isolation between them
We are PC On the configuration IP Address , adopt Ping Command to test in different VLAN Between the PC Can we communicate .
IP Address list :
Equipment name | IP Address | gateway |
|---|---|---|
PCA | 172.16.0.1/24 | -- |
PCB | 172.16.0.2/24 | -- |
PCC | 172.16.0.3/24 | -- |
PCD | 172.16.0.4/24 | -- |
As shown in the above table PC On the configuration IP Address .
When the configuration is complete , stay PCA On the use of Ping Command to test to other PC The interoperability of . The result should be PCA And PCB Can't communicate with each other ,PCC and PCD Can't communicate with each other . Prove different VLAN We can't communicate with each other , Connected to the same switch PC Isolated .
3.2 Task two : To configure Trunk Link port
The task of this experiment is to configure Trunk Link port , Make the same VLAN Medium PC Ability to access across switches ask . Through this experiment , Students should be able to master Trunk Configuration and function of link ports .
Step one : Cross switch VLAN Interworking test
In the last experiment ,PCA and PCC All belong to VLAN 2. stay PCA On the use of Ping Command to test and PCC Can we communicate . The result should not be , As shown below :
C:\Documents and Settings\Administrator>ping 172.16.0.3 Pinging 172.16.0.3 with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 172.16.0.3: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PCA And PCC We can't communicate with each other . Because the ports between switches GigabitEthernet 1/0/24 yes Access Link port , And belongs to VLAN 1, Don't allow VLAN 2 The data frame passes through .
Want to let VLAN 2 The data frame passes through the port GigabitEthernet 1/0/24, You need to set the port to Trunk Link port .
Step two : To configure Trunk Link port
stay SWA and SWB Configure ports on GigabitEthernet 1/0/24 by Trunk Link port .
To configure SWA:
[SWA]interface GigabitEthernet 1/0/24 [SWA-GigabitEthernet1/0/24]port link-type trunk [SWA-GigabitEthernet1/0/24]port trunk permit vlan all
To configure SWB:
[SWB]interface GigabitEthernet 1/0/24 [SWB-GigabitEthernet1/0/24]port link-type trunk [SWB-GigabitEthernet1/0/24]port trunk permit vlan all
When the configuration is complete , see VLAN 2 Information :
<SWA>display vlan 2 VLAN ID: 2 VLAN type: Static Route interface: Not configured Description: VLAN 0002 Name: VLAN 0002 Tagged Ports: GigabitEthernet1/0/24 Untagged Ports: GigabitEthernet1/0/1
You can see ,VLAN 2 Port is included in GigabitEthernet 1/0/24, And the data frame is labeled (Tagged) Through the port .
Then check the port GigabitEthernet 1/0/24 Information :
<SWA>display interface GigabitEthernet 1/0/24 ……. PVID: 1 Mdi type: auto Port link-type: trunk VLAN passing : 1(default vlan), 2 VLAN permitted: 1(default vlan), 2-4094 Trunk port encapsulation: IEEE 802.1q ……
From the above information , Port of PVID The value is 1, The port type is Trunk, Allow all VLAN(1-4094) adopt , But it's actually VLAN 1 and VLAN 2 Through this port ( Because there are only VLAN 1 and VLAN 2).
SWB On VLAN And port GigabitEthernet 1/0/24 The information is similar to this , I won't repeat .
Step three : Cross switch VLAN Interworking test
stay PCA On the use of Ping Command to test and PCC Can we communicate . The result should be interoperability , As shown below :
C:\Documents and Settings\Administrator>ping 172.16.0.3 Pinging 172.16.0.3 with 32 bytes of data: Reply from 172.16.0.3: bytes=32 time<1ms TTL=128 Reply from 172.16.0.3: bytes=32 time<1ms TTL=128 Reply from 172.16.0.3: bytes=32 time<1ms TTL=128 Reply from 172.16.0.3: bytes=32 time<1ms TTL=128 Ping statistics for 172.16.0.3: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 1ms, Maximum = 1ms, Average = 1ms
Description cross switch VLAN Can communicate with each other .
3、 ... and 、 List of commands in the experiment
VLAN List of experimental commands :
command | describe |
|---|---|
display vlan | Show... On the switch VLAN Information |
display interface [ interface-type [ interface-number ] ] | Displays the current running status and related information of the specified interface |
display vlan vlan-id | Displays the specified on the switch VLAN Information |
vlan vlan-id | establish VLAN And enter VLAN View |
port interface-list | towards VLAN Add one or a group Access port |
port link-type{ access | hybrid |
port trunk permit vlan { vlan-id-list | all } |
Four 、VLAN Interview technical questions
1. In experiment task 2 , Which link port type can also be used to make the switch port G1/0/24 allow VLAN 2 The data frame passes through ?
answer : have access to Hybrid Link port .
2. In experiment task 2 , If configured SWA The port of G1/0/24 by Trunk type ,PVID by 1,SWB The port of G1/0/24 by Access type ,PVID Also for the 1, be PCB And PCD Can we communicate with each other ?
answer : Sure . The link port type only defines the behavior when data frames enter and leave the port . The switch does not know or care about the link type of the opposite port .
边栏推荐
- Tencent releases the full platform version of reasoning framework TNN, and supports mobile terminal, desktop terminal and server terminal at the same time
- What is the difference between get and post? After reading it, you won't be confused and forced, and you won't have to fight with your friends anymore
- Little red book, hovering on the edge of listing
- 基于STM32的MD5校验
- Use Google search like a professional
- What is browser fingerprint recognition?
- Go deep into the implementation principle of go language defer
- Some adventurer hybrid versions with potential safety hazards will be recalled
- Pytorch 转置卷积
- CDs view permission check
猜你喜欢

【附下载】汉化版Awvs安装与简单使用

Applet wxss

Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)

My network relationship with "apifox"
MySQL Advanced Series: Locks - Locks in InnoDB

Wechat official account debugging and natapp environment building

C. Three displays codeforces round 485 (Div. 2)
![[download attached] installation and simple use of Chinese version of awvs](/img/3b/f26617383690c86edff465c9a1099e.png)
[download attached] installation and simple use of Chinese version of awvs

Problems encountered in the work of product manager
![[cloud native | kubernetes chapter] Introduction to kubernetes Foundation (III)](/img/21/503ed54a2fa14fbfd67f75a55ec286.png)
[cloud native | kubernetes chapter] Introduction to kubernetes Foundation (III)
随机推荐
Global and Chinese market for commercial barbecue smokers 2022-2028: Research Report on technology, participants, trends, market size and share
B. Terry sequence (thinking + greed) codeforces round 665 (Div. 2)
企业安全攻击面分析工具
Ps\ai and other design software pondering notes
Global and Chinese market of music synthesizer 2022-2028: Research Report on technology, participants, trends, market size and share
Applet wxss
Istio FAQ: virtualservice route matching sequence
April 30, 2021: there are residential areas on a straight line, and the post office can only be built on residential areas. Given an ordered positive array arr
Greenplum role-based fine-grained permission control
Wechat official account debugging and natapp environment building
Inter thread communication of embedded development foundation
期货怎么开户安全些?哪些期货公司靠谱些?
Problems encountered in the work of product manager
Build go command line program tool chain
[tke] analysis of CLB loopback in Intranet under IPVS forwarding mode
C. K-th Not Divisible by n(数学+思维) Codeforces Round #640 (Div. 4)
Using oasis to develop a hop by hop (I) -- Scene Building
Customized Tile Map cut - based on Tencent map
Pageadmin CMS solution for redundant attachments in website construction
Handling of communication failure between kuberbetes pod