Computer network

About the author

  • The authors introduce

🍓 blog home page: author’s home page 🍓 Introduction: JAVA quality creator 🥇, a junior student 🎓, participated in various provincial and national competitions during school, and won a series of honors


VLAN division for a single switch

This chapter focuses on

1. Understand the concept of virtual LAN VLAN

2. Know how to configure vlans for switches

3. Verify the broadcast domain before and after VLAN division

4. Verify that terminals on the same VLAN can communicate with each other

5. Verify that terminals on different vlans cannot communicate with each other.

Specific operation

1. Start the Packet Tracer software and place and connect devices in the logical workspace according to the experimental topology. The following table lists the IP addresses of terminals and ports connected to the switch. Configure the IP address and subnet mask of each PC based on this table.

2. View the broadcast range of broadcast packets when no VLAN is assigned

Without vlans, all ports on the switch belong to the same VLAN1 (the default VLAN of the switch) by default. Therefore, all ports on the switch belong to the same broadcast domain.

(1) Select the Inspect tool in the right toolbar, move to switch Switch0, click the left mouse button, select “Port Status Summary Table” in the popup menu, and you can see the Port Status information Table of the switch.

(2) Enter the simulation mode and set Edit Filters to display only ICMP packets

(3) Click PC0, select Traffic Generator in the Desktop panel, and set as shown in the following figure to generate a broadcast packet.

(4) Click Capture/Forward to watch the ICMP packet sent from PC0 to Switch0.

(5) Click the Capture/Forward button and observe that the packets are broadcast to all terminals except PC0 by Switch0, as shown below

3. Create vlans on the switch

Create three vlans, VLAN10, VLAN20, and VLAN30, so that PC0 and PC1 belong to VLAN10, PC2 and PC3 belong to VLAN20, and PC4 and PC5 belong to VLAN30, as shown in the following figure.

4. Assign ports to corresponding vlans.

(1) In the Config TAB of Switch0, click Fastethernet0/1 under INTERFACE in the left configuration list, and keep the port mode unchanged as Access in the right configuration area. Click the drop-down button on the right to check VLAN0, as shown in the figure below.

(2) Divide the ports on Switch0 into different vlans according to the following table.

5. View VLAN information

On the CLI of Switch0, run the “show vlan brief” command to view the VLAN configuration information. As shown in the following figure, the VLAN ID, name, and interface configurations are correct.

6. Connectivity testing

(1) On the CLI of PC0, run ping 192.168.1.11 to test the connectivity between PC0 and PC2. The result is timeout because PC0 and PC2 are on different vlans.

(2) On the CLI of PC0, run ping 192.168.1.2 to test the connectivity between PC0 and PC1. The command output is displayed because the connectivity between PC0 and PC1 is in the same VLAN. Therefore, after vlans are divided, hosts in different vlans cannot directly communicate with each other, but hosts in the same VLAN can directly communicate with each other. The test results are shown in the figure below.

conclusion

Through this simulation, we have mastered the VLAN division method of a single switch, understood the PRINCIPLE of VLAN, verified that each VLAN is an independent broadcast domain and verified that two terminals belonging to different VLANS cannot communicate. A VLAN forms a logical subnet, allowing users in different geographical locations to join the same logical subnet. Network users on the same VLAN can communicate with each other. Vlans are divided based on ports and MAC addresses (nic addresses). First, a switch is a device that provides direct, fast, and accurate point-to-point connections between source ports and target ports. All ports on the switch occupy a specified bandwidth separately, and each device connected to the switch can enjoy its own dedicated channel without interference. This experiment uses a DLink-3624 switch with 20 ports. The second is port-based VLAN division, which is based on IEEE802.1Q(LOCAL area Network standard) VLAN division. The ports on one or more switches are divided into a logical subnet. This is the simplest and most effective division method. In this method, the network administrator only needs to reassign the switch port of the network device.

After the language

The original intention of the director to write blog is very simple, I hope everyone in the process of learning less detours, learn more things, to their own help to leave your praise 👍 or pay attention to ➕ are the biggest support for me, your attention and praise to the director every day more power.

If you don’t understand one part of the article, you can reply to me in the comment section. Let’s discuss, learn and progress together!

Wechat (Z613500) or QQ (1016942589) for detailed communication.