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 creation of Vlan and some related knowledge (Darnay)

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

Share

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

1. Create a VLAN

[sw1] vlan 10 / / create a VLAN and enter VLAN 10

[sw1-vlan10] description AAA / / configure a name for vlan

2. Configure port mode

[sw1] interface gi0/0/1

[sw1-gi0/0/1] port link-type access / / designated port is in access mode

3. Put the port into the specified VLAN

[sw1] interface gi0/0/1

[sw1-gi0/0/1] port default vlan10 / / put the port into the vlan10

4. Verify, test, save

Delete VLAN:

After [sw1] undo vlan 10 / / is deleted, the member port will automatically return to vlan1.

Batch create / delete VLAN:

[sw1] vlan batch 10 20 30 40 50 Universe / create vlan 10 Leng 20 Jing 20 Jing 30 Jing 40 Ji 50

[sw1] vlan batch 10 to 20 / / create vlan 10, 11, 12, and 12.

[sw1] undo vlan batch 10 to 20 / / batch deletion of 10pc11 to 12meme 20

Link Typ

Trunk:

To be able to transmit multiple VLAN data on the same link at the same time

The mode of the link must be configured to trunk mode.

The data on this type of link needs to carry a vlan tag.

The link tags data in two ways:

1. ISL: inter-switch link, the link protocol between switches, Cisco's proprietary protocol; now many switches no longer support it.

The total length of the label is 30 bytes, of which the ISL header is 26 bytes and the ISL tail is 4 bytes

2. 802.1q: it is a public standard, and devices of any manufacturer can use this protocol to tag layer 2 data.

The label is 4 bytes long; it is commonly used to link "switch" devices.

Access:

This type of link can only belong to one VLAN at a time.

There is no label for the data transmitted.

Generally used to connect "non-switch" devices!

The above is the link mode commonly used in the link, of course, many Huawei devices support Hybrid mode, which is more flexible, not only to achieve Access function, but also to achieve Trunk function.

Note:

In a switched network, you must ensure that the VLAN information on all switches is complete

Consistent. Otherwise, the switching network will be blocked.

At this time, Gvrp can be used to automatically synchronize VLAN information between different switches, and the device can learn Vlan by itself, so as to avoid mistakes.

VLAN learned through GVRP is called dynamic VLAN

For dynamic VLAN, access ports cannot be added directly.

Access ports can only be added to static VLAN (manually created locally), and trunk ports can be added automatically, so gvrp can only synchronize Vlan information, but cannot add ports directly. If you need to join ports, you still need to enter Vlan manually.

Enable gvrp:

1. Start the GVRP function globally:

[SW] gvrp

2. Start GVRP on the trunk link

[sw] interface gi0/0/24

[sw-gi0/0/24] gvrp

3. Verify GVRP

Display gvrp status

Display vlan-- > you will see the vlan of type dynamic in the display result.

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