English
 找回密码
 立即注册

Eth-trunk configuration

Vitalik 2025-11-24 11:32 43670人围观 ETH

Objective: To achieve link redundancy and bandwidth superposition through Eth-Trunk, and at the same time, PC1 and PC2 can communicate across switches. 2. Detailed configuration steps 1. Configure Huawei system-view sysname S1# on switch S1. Step 1: Creat


Goal: To achieve link redundancy and bandwidth overlay through Eth-Trunk, and at the same time, PC1 and PC2 can communicate across switches.

2. Detailed configuration steps

1. Switch S1 configuration

<Huawei> system-view

[Huawei] sysname S1

# Step 1: Create Eth-Trunk 1 and join the physical interface

[S1] interface Eth-Trunk 1

[S1-Eth-Trunk1] port link-type trunk # Configure the link type as Trunk

[S1-Eth-Trunk1] port trunk allow-pass vlan all # Allow all VLANs to pass

[S1-Eth-Trunk1] quit

[S1] interface GigabitEthernet0/0/1

[S1-GigabitEthernet0/0/1] eth-trunk 1 # Add the interface to Eth-Trunk 1

[S1-GigabitEthernet0/0/1] quit

[S1] interface GigabitEthernet0/0/2

[S1-GigabitEthernet0/0/2] eth-trunk 1

[S1-GigabitEthernet0/0/2] quit

[S1] interface GigabitEthernet0/0/5

[S1-GigabitEthernet0/0/5] eth-trunk 1

[S1-GigabitEthernet0/0/5] quit

# Step 2: Configure the access port of PC1 (Access mode)

[S1] vlan batch 10 # Create VLAN 10

[S1] interface Ethernet0/0/1

[S1-Ethernet0/0/1] port link-type access

[S1-Ethernet0/0/1] port default vlan 10

[S1-Ethernet0/0/1] quit

# Step 3: Configure the VLANIF interface (to achieve cross-switch interoperability)

[S1] interface Vlanif 10

[S1-Vlanif10] ip address 10.0.1.254 24 # Configure the gateway of VLAN 10

[S1-Vlanif10] quit

----------------------------------------------------

2. Switch S2 configuration

<Huawei> system-view

[Huawei] sysname S2

# Step 1: Create Eth-Trunk 1 and join the physical interface

[S2] interface Eth-Trunk 1

[S2-Eth-Trunk1] port link-type trunk

[S2-Eth-Trunk1] port trunk allow-pass vlan all

[S2-Eth-Trunk1] quit

[S2] interface GigabitEthernet0/0/1

[S2-GigabitEthernet0/0/1] eth-trunk 1

[S2-GigabitEthernet0/0/1] quit

[S2] interface GigabitEthernet0/0/2

[S2-GigabitEthernet0/0/2] eth-trunk 1

[S2-GigabitEthernet0/0/2] quit

[S2] interface GigabitEthernet0/0/5

[S2-GigabitEthernet0/0/5] eth-trunk 1

[S2-GigabitEthernet0/0/5] quit

# Step 2: Configure the access port of PC2 (Access mode)

[S2] vlan batch 10

[S2] interface Ethernet0/0/1

[S2-Ethernet0/0/1] port link-type access

[S2-Ethernet0/0/1] port default vlan 10

[S2-Ethernet0/0/1] quit

# Step 3: Configure the VLANIF interface (in the same network segment as S1 to achieve intercommunication)

[S2] interface Vlanif 10

[S2-Vlanif10] ip address 10.0.1.253 24 # Configure the same network segment IP (optional, if only PC communication is required, the gateway can only be configured with S1)

[S2-Vlanif10] quit

3. PC configuration

PC1: IP 10.0.1.1, subnet mask 255.255.255.0, gateway 10.0.1.254 (Vlanif10 of S1).

PC2: IP 10.0.1.2, subnet mask 255.255.255.0, gateway 10.0.1.254 (Vlanif10 of S1).

4. Verify configuration

Eth-Trunk status verification:

Run display eth-trunk 1 on S1 or S2 to confirm that the physical interfaces have been added and the status is Up.

PC interoperability verification:

Execute ping 10.0.1.2 on PC1 and PC2 should be successfully connected.

Through the above configuration, the three links between S1 and S2 have been aggregated into Eth-Trunk, achieving link redundancy and bandwidth overlay. At the same time, PC1 and PC2 can communicate across switches.


精彩评论0
我有话说......
TA还没有介绍自己。