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

The Construction of Virtual Local area Network for small and medium-sized Enterprises

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Network construction of small and medium-sized enterprises

I. Overview of VLAN

1. What is VLAN?

-- Virtual LAN (Virtual Local area Network) is a logical group of users connected to physical devices that are not limited by physical location.

2. Why introduce VLAN?

-- the switch divides the collision domain, but cannot split the broadcast domain

With the increase in the number of switches, the number of broadcasts in the network increases, which reduces the efficiency of the network.

In order to split the broadcast domain, VLAN is introduced.

3. The function of VLAN

-broadcast control

-- Security

-Broadband utilization

-delay (reduced)

4. Types of VLAN

Static Vlan based on Port Partition

Dynamic Vlan based on MAC address Partition

5. VLAN frame format

Different Vlan can be distinguished by Tag

6 、 PVID

-- PVID indicates the Vlan to which the port belongs

By default, the PVID for all ports on the switch is 1

7. Access port

-- when the Access port receives the data, it will add the same PVID as the Vlan Tag,Vlan ID and port.

-- Vlan Tag will be deleted when the Access port sends data again

8. Configuration of static Vlan

(1) steps to configure Vlan

-- create a Vlan

① creates Vlan system-view [Huawei] Vlan + Vlan number

② batch creates Vlan system-view [Huawei] Vlan batch 10 to 20

-- Delete vlan

① deletes vlan [Huawei] undo vlan 10

② batch delete [Huawei] undo vlan batch 10 20 30

-- add ports to vlan

[Huawei] interface Ethernet 0/0/1

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

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

-- add ports to vlan in batch

[Huawei] port-group 1

[Huawei-port-group-1] group-member Ethernet + port Ethernet + port or

[Huawei-port-group-1] group-member Ethernet + Port to Ethernet + Port

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

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

-- verify the configuration of vlan

Id of [Huawei] display vlan or [Huawei] display vlan + vlan

II. Trunk principle

1. VLAN communication between switches

-one link between each Vlan

-- the switch marks each data frame destined for another switch with a Vlan logo.

2. Link type

-- usually there is an access link between the host and the switch, and a trunk link between the switch and the switch.

3. Trunk port

-- when the Trunk port receives a data frame, if the data frame does not carry Tag, it will hit the PVID of the port. If it carries Tag, it will not change it.

When sending data frames on the Trunk port, if it is the same as the port PVID, it will be sent after removing the Tag, and if it is different from the port PVID, it will be sent directly.

4. Configuration of Trunk

(1) exit the current Access window first

[Huawei-Ethernet0/0/1] undo port default vlan 10

[Huawei-Ethernet0/0/1] undo port link-type access

(2) modify the port link type after entering the port

System-view

[Huawei] interface Ethernet 0/0/1

[Huawei-Ethernet0/0/1] port link-type trunk

(3) add allowed VLAN for ports that have been modified to Trunk mode

[Huawei-Ethernet0/0/1] port trunk allow-pass vlan 10

(4) set the PVID of the port in Trunk mode

[Huawei-Ethernet0/0/1] port trunk pvid vlan 2

(5) commands for emptying port configuration

Clear configuration interface Ethernet + port

Third, Hybrid mode

1. More flexible control of VLAN tags

-- data frames sent by the Access port are not tagged

-- the Trunk port only issues untagged frame (untagged) in one specific case, otherwise it is Tagged.

Frame (tagged)

-if you want to flexibly control the addition or removal of VLAN tags under special circumstances, you can use the Hybrid port.

2. Configuration of Hybrid port

-set to Hybrid mode in the port

Configuring PVID for Hybrid ports to allow tagging and untagging is equivalent to Access

System-view

[Huawei] interface Ethernet 0/0/1

[Huawei-Ethernet0/0/1] port link-type Hybrid

[Huawei-Ethernet0/0/1] port Hybrid pvid vlan 10

-set Tagged or untagged in the port to determine which data frames are allowed to pass through

[Huawei-Ethernet0/0/1] port Hybrid tagged vlan 10 or

[Huawei-Ethernet0/0/1] port Hybrid untagged vlan 10

IV. The concept and function of GARP and GVRP

1. What is GARP?

-- GARP (Generic Attribute Registration Protocol) generic attribute Registration Protocol.

2. The function of GARP

① protocol is mainly used to establish a mechanism of attribute transfer and diffusion.

② provides a means of distribution, transmission and registration (VLAN attributes, multicast addresses, etc.) between switches in the same switching network.

3. What is GVRP?

-- GVRP (Generic VLAN Registration Protocol) is a specific application of GARP

4. The function of GVRP

① is used to register and unregister VLAN properties

② through the GVRP protocol, VLAN information on one device will quickly spread to the entire switching network.

③ GVRP implements the dynamic distribution, registration and dissemination of VLAN attributes, thus reducing the amount of manual configuration of network administrators and ensuring the correct configuration of VLAN.

5. The application of GVRP

-- GVRP can automatically register and unregister VLAN attributes.

6. Registration and cancellation of VLAN

(1) Registration of VLAN-refers to the addition of ports to VLAN

(2) logout of VLAN-refers to the exit of the port from the VLAN

7. Configure GVRP

(1) GVRP one-way registration

Create a static VLAN on one switch, and other switches learn the static VLAN through one-way registration of the VLAN attribute.

(2) one-way logout of GVRP

-- when the switch no longer needs a static VLAN, the VLAN can be deleted through the logout process of the VLAN attribute.

8. Registration mode

(1) Normal mode

The switch port defaults to Normal mode, allows static and dynamic VLAN registration, and sends declaration messages for both static VLAN and dynamic VLAN.

(2) Fixed mode

When the switch port is in this mode, dynamic VLAN registration and logout are not allowed, and only static VLAN declaration messages are sent.

(3) Forbidden mode

When the switch port is in this mode, dynamic VLAN is not allowed to register on the port, and all VLAN except VLAN1 on the port is deleted, only the declaration message of VLAN1 is sent.

9. Configure GVRP function

(1) execute the command GVRP in the system view

-- enable the GVRP function globally

(2) enter the interface view and execute the command port link-type trunk.

-- configure the interface to be Trunk

(3) execute the command port Trunk allow-pass VLAN all in the interface view

-- configure the interface to allow all VLAN to pass

(4) execute the command GVRP in the interface view

-- enable CVRP for the API

(5) execute the command interface interface-type interface-number

-- enter the interface view

(6) execute the command GVRP registration {fixed | forbidden | normal}

-- configure GVRP interface registration mode

(7) by default, the registration mode of GVRP interface is normal

10. GVRP configuration command

System-view

[SW1] gvrp

[SW1] interface GigabitEthernet0/0/1

[SW1-GigabitEthernet0/0/1] port link-type trunk

[SW1-GigabitEthernet0/0/1] port Trunk allow-pass VLAN all

[SW1-GigabitEthernet0/0/1] gvrp

[SW1-GigabitEthernet0/0/1] gvrp registration normal

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: 0

*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

Servers

Wechat

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

12
Report