[Xin H3C] How does network engineer H3C configure VLAN-trunk Layer 2 isolation technology

New H3C VLAN-TRUNK networking experiment

Experiment 1 Layer 2 service isolation (VLAN and Trunk)

1.1.1 Network topology

20200330102752452.png

1.1.2. Experimental tasks

(1) Realize the intercommunication of hosts in the same Vlan and isolation of hosts between different Vlans.
VLAN 10: PC1, PC3;
VLAN 20: PC2, PC4;

(2) Broadcast domain and connectivity analysis
The reach of the broadcast frames sent by PC1, PC2, PC3, PC4, and PC5 are analyzed .

1.1.3. Basic information configuration

system-view
[H3C]hostname SW1

1.1.4. VLAN configuration

SW1 configuration
[SW1]vlan 10 // Create vlan 10
[SW1-vlan10]port GigabitEthernet 1/0/2 // Add interface to vlan 10
[SW1]interface GigabitEthernet 1/0/2 // Enter interface 1/0/2
[SW1-GigabitEthernet1/0/2]port link-type access // Configure to access mode

[SW1]interface GigabitEthernet 1/0/3 // create vlan 20
[SW1]interface GigabitEthernet 1/0/3 // enter interface
1/0/3 [SW1-GigabitEthernet1/0/2]port link-type access // Configure to access mode

SW2 configuration
[SW2]vlan 10 // Create vlan 10
[SW2-vlan10]port GigabitEthernet 1/0/2 // Add interface to vlan 10
[SW2]interface GigabitEthernet 1/0/2 // Enter interface 1/0/2
[SW2-GigabitEthernet1/0/2]port link-type access // Configure to access mode
[SW2]vlan 20 // Create vlan 20
[SW2]interface GigabitEthernet 1/0/3 // Enter interface 1/0/3
[ SW2-GigabitEthernet1/0/3]port link-type access // Configure to access mode

View interface information operation
[SW1]display interface g1/0/2 // View interface information

GigabitEthernet1/0/2
Current state: DOWN
Line protocol state: DOWN
IP packet frame type: Ethernet II, hardware address: aa05-b369-0100
Description: GigabitEthernet1/0/2 Interface
Bandwidth: 1000000 kbps
Loopback is not set
Unknown-speed mode, unknown-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 9216
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
PVID: 10
MDI type: Automdix
Port link-type: Access
Tagged VLANs: None
Untagged VLANs: 10
Port priority: 2
Last link flaPCing: Never
Last clearing of counters: Never

View switch VLAN information
[SW1]display vlan brief
Brief information about all VLANs:
SuPCorted Minimum VLAN ID: 1
SuPCorted Maximum VLAN ID: 4094
Default VLAN ID: 1
VLAN ID Name Port
1 VLAN 0001 FGE1/0/53 FGE1/0/54 GE1/0/1
GE1/0/4 GE1/0/5 GE1/0/6 GE1/0/7
GE1/0/8 GE1/0/9 GE1/0/10
GE1/0/11 GE1/0/12 GE1/0/13
GE1/0/14 GE1/0/15 GE1/0/16
GE1/0/17 GE1/0/18 GE1/0/19
GE1/0/20 GE1/0/21 GE1/0/22
GE1/0/23 GE1/0/24 GE1/0/25
GE1/0/26 GE1/0/27 GE1/0/28
GE1/0/29 GE1/0/30 GE1/0/31
GE1/0/32 GE1/0/33 GE1/0/34
GE1/0/35 GE1/0/36 GE1/0/37
GE1/0/38 GE1/0/39 GE1/0/40
GE1/0/41 GE1/0/42 GE1/0/43
GE1/0/44 GE1/0/45 GE1/0/46
GE1/0/47 GE1/0/48 XGE1/0/49
XGE1/0/50 XGE1/0/51 XGE1/0/52
10 VLAN 0010 GE1/0/2
20 VLAN 0020 GE1/0/3

1.1.5. Trunk configuration

(1) SW3-SW4 Trunk link commissioning

SW1配置
[SW1]interface GigabitEthernet 1/0/1
[SW1-GigabitEthernet1/0/1]port link-type trunk
[SW1-GigabitEthernet1/0/1]port trunk permit vlan all

SW2配置
[SW2]interface GigabitEthernet 1/0/1
[SW2-GigabitEthernet1/0/1]port link-type trunk
[SW2-GigabitEthernet1/0/1]port trunk permit vlan all

查看 Trunk 信息
[SW1]display interface GigabitEthernet 1/0/1
GigabitEthernet1/0/1
Current state: UP
Line protocol state: UP
IP packet frame type: Ethernet II, hardware address: aa05-b369-0100
Description: GigabitEthernet1/0/1 Interface
Bandwidth: 1000000 kbps
Loopback is not set
1000Mbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 9216
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
PVID: 1
MDI type: Automdix
Port link-type: Trunk
VLAN Passing: 1(default vlan), 10, 20
VLAN permitted: 1(default vlan), 2-4094
Trunk port encapsulation: IEEE 802.1q
Port priority: 2
Last link flaPCing: 0 hours 28 minutes 18 seconds
Last clearing of counters: Never

1.1.6. Host IP address configuration

(1) PC1 network card IP address configuration: 192.168.10.10/24
(2) PC2 network card IP address configuration: 192.168.11.20/24
(3) PC3 network card IP address configuration: 192.168.10.30/24
(4) PC4 network card IP address configuration : 192.168.11.40/24
Step 1
Right-click on PC1 and click Configure

20200330103334747.png

Step 2

Insert picture description here


Guess you like

Origin blog.51cto.com/15039035/2559534