Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[primary article] the configuration of Huawei layer 3 switching

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

SW2 configuration:

[Huawei] sysname SW2

[SW2] vlan batch 10 20

[SW2] port-group 1

[SW2-port-group-1] group-member e0amp 1e0Accord 2 / / 2 interfaces are put into vlan at the same time.

[SW2-port-group-1] port link-type access

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

[SW2-Ethernet0/0/2] port link-type access

[SW2-port-group-1] port default vlan 10

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

[SW2-Ethernet0/0/2] port default vlan 10

[SW2] port-group 2

[SW2-port-group-2] group-member e0/0/3 e0/0/4

[SW2-port-group-2] port hybrid pvid vlan 20

[SW2-Ethernet0/0/3] port hybrid pvid vlan 20

[SW2-Ethernet0/0/4] port hybrid pvid vlan 20

[SW2-port-group-2] port hybrid untagged vlan 20

[SW2-Ethernet0/0/3] port hybrid untagged vlan 20

[SW2-Ethernet0/0/4] port hybrid untagged vlan 20

[SW2] int g0amp 0 / / the uplink port is a relay port

[SW2-GigabitEthernet0/0/1] port hybrid tagged vlan 10 20

SW1 configuration: (layer 3 switch, let it terminate vlan)

[Huawei] sysname SW1

[SW1] vlan batch 10 20

[SW1] int Vlan 10

[SW1-Vlanif10] Gateway of ip add 192.168.10.1 24 / / vlan

[SW1] dhcp enable / / enable DHCP

[SW1] int Vlan 10

[SW1-Vlanif10] dhcp select interface

[SW1-Vlanif10] dhcp server dns-list 2.2.2.2

[SW1-Vlanif10] int vlan 20

[SW1-Vlanif20] ip add 192.168.20.1 24

[SW1-Vlanif20] dhcp select interface

In this way, SW1 can not only serve as a gateway for all members of the following vlan, but also provide IP addresses for each of the following vlan members, and the method of using the address pool here is the same.

Use DHCP to automatically obtain the IP address:

At this time, the IP address cannot be received for two reasons, one is that there is no VLAN, and the other is that there are no members in the VLAN. We have already added vlan here.

[SW1-Vlanif20] int g0/0/1

[SW1-GigabitEthernet0/0/1] port hybrid tagged vlan 10 20 / / add this interface to vlan 10 20

R1 configuration:

[R1] int g0/0/2

[R1-GigabitEthernet0/0/2] ip add 12.0.0.2 24

Whether Huawei is a layer 2 switch or a layer 3 switch, their ports are layer 2 ports, which cannot be equipped with IP. They are interconnected with VLAN, which is the characteristic of Huawei.

SW1 configuration:

[SW1-GigabitEthernet0/0/1] int g0/0/2

[SW1] vlan 100 / / Uplink VLAN

[SW1-vlan100] int vlan100

[SW1-Vlanif100] int g0/0/2

[SW1-GigabitEthernet0/0/2] port hybrid pvid vlan 100

[SW1-GigabitEthernet0/0/2] port hybrid untagged vlan 100

At this point, you should be able to communicate with ping R1.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 225

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report