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

VLAN, VLAN, VLAN (this is the only criterion for testing truth)

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

Share

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

Today, I will work with all of you here to carry out the actual operation of vlan and find out the matters needing attention.

First drag out a switch and configure it:

Then we will add a layer 2 veneer to it, and then configure it with a certain amount of disk space (disk space is used to store the broadcast domain divided by vlan and its port number). Here we give it 100Mib (the most important thing is not to configure it now. Later, you need to enter the command to clear the disk to configure it again):

Then drag three pc hosts from the instrument list, connect them to the switch, display the port number, and click run:

Secondly, here, we draw up three ip addresses of the same network segment for the three hosts, which are 192.168.20.10, 192.168.20.20, 192.168.20.30, respectively, from left to right, and configure them:

Since the three hosts are on the same network segment and connected to the switch, in theory, all three hosts can communicate with each other. Let's test whether hosts 1 and 2 can communicate with each other first:

It is found that hosts 1 and 2 can communicate normally, now test whether 1 and 3 can communicate:

It is found that hosts 1 and 3 can communicate normally, now test whether 2 and 3 can communicate:

It is found that hosts 1 and 3 can communicate normally, that is, the three hosts can communicate with each other. This is the switch communication principle we have learned before, and it has been consolidated here again.

Then divide the vlan area, we divide host 1 into VLAN 10, host 2 and host 3 into VLAN 20. As follows:

First, enter the global mode of sw and turn off the routing feature (remember to turn it off every time you use the switch, because we are using a routing image):

Second, configure the vlan 10 domain, name it zicaibu, and type exit:

Third, enter do show vlan-switch brief and you can see that vlan 10 has been configured and named successfully. In the figure, this is an abbreviation for the command:

Fourth, we can configure the vlan 20 domain in the same way and name it shengchanbu. After the configuration is completed, the view shows that the configuration is successful:

Fifth, first enter port 1amp 0, and then enter sw mode access to define the mode of layer 2 port (this link is defined as the access link, usually the link between the host and the switch); divide the sw port 1max 0 into the vlan 10 domain, and the command is sw access vlan 10; finally, exit and view, vlan 10 shows the existing 1max 0 port:

Sixth, if you divide the port of 1Charger 1Magazure 1 into vlan 20 at the same time, you need to use the command int range f1max 1 (a space)-2 in global mode, with special attention to adding a space between port 1max 1 and 1ram 2. Next, you can enter the two ports, which can be divided into the vlan 20 domain at the same time. The division steps are the same as above, and you can follow the following steps:

Seventh, all three hosts have been divided into the Vlan domain. We tried to get host 1 and host 2 to communicate with each other, but found that they could not communicate properly:

Eighth, we tried to get host 2 and host 3 to communicate with each other, but found that they could communicate normally:

In-depth analysis: hosts 1 and 2 cannot communicate because they are in different vlan domains, even if they are on the same network segment, including 1 and 3. Because the two domains of vlan are two different broadcast domains, the ARP broadcast of host 1 cannot be sent to another broadcast domain, so the MAC address of the host in the other broadcast domain cannot be obtained, so the data cannot be sent.

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