In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
one。 Lab Topology:
Use the GNS3 simulator
2. Experimental requirements:
1. PC1,PC3 belongs to the same VLAN 10 Magi PC2 Magi PC4 belongs to the same VLAN 20 and PC1 and PC3 can communicate normally, PC2 and PC4 can communicate normally.
2.R1 is set to be routed on a stick, and the IP address of PC1,PC2,PC3,PC4 is automatically obtained through DHCP.
3. PC1, Magi PC2, PC3, and PC4 can communicate with each other.
III. Benefits of dividing VLAN:
1. Split broadcast domain
two。 Enhance network security
3. Can be used to isolate business.
four。 The steps of the experiment:
1.IP Planning:
PC1:192.168.1.10 PC2:192.168.1.20
PC3:192.168.1.30 PC4:192.168.1.40
After the IP address is planned, the communication between the PC is OK, as shown in the figure:
two。 Divide VLAN.
Enter the global configuration mode of SW1,SW2 to add VLAN10,VLAN20 respectively. After dividing the VLAN under the global configuration of SW1, add interface Fa1/1 to VLAN 10, interface Fa1/2 to VLAN 20, and do the same operation on SW2. (note: because the GNS3 emulator does not support the switch, the switch is emulated with a router. Therefore, when entering the switch to configure, first execute the command no ip routing. ) as shown in the figure
You can view the members of the VLAN with the command show vlan-s b, as shown in the figure:
Before the VLAN partition, the communication between the PC can be normal, after the VLAN partition, the PC can not communicate with each other, this is because different VLAN members can not communicate. But this is only a physical separation, not a logical separation, because the PC still belong to the same network segment. If PC1 and PC3 are divided into the same network segment, they are also on the same VLAN,PC2 and PC4 on the same network segment, and they are also on the same VLAN. Then PC1 and PC3 can communicate, and PC2 and PC4 can also communicate. (note: after the VLAN is partitioned, in order for members of the same VLAN to communicate, you need to set fa1/15 as the trunk port. )
Three. Configure router on a single arm
How can PC1,PC2,PC3,PC4 communicate with each other? We need to set up router-on-a-stick routing with the help of layer 3 device routers. What needs to be considered is: how to configure multiple gateways when a layer 3 device router has only one physical interface? We need to divide a physical interface into several subinterfaces, dividing as many VLAN as there are. The specific configuration is as follows (Note: the first step in entering the physical interface is to activate the physical interface):
After entering the subinterface, you need to encapsulate the subinterface, and then configure IP. After setting up, go to the fa1/14 interface on SW1 and set it as a trunk interface.
4. Set DHCP
In the real network, we also need to configure DNS and other related configurations. After DHCP is configured, let's test it with PC to see if we can get the address automatically. As shown in the figure:
Use clear ip to clear the previously set ip and use ip dhcp to obtain the address automatically.
The IP address has been obtained automatically through DHCP, so let's test the communication between PC. As shown in the figure:
Pc can communicate with each other.
The configuration is complete, thank you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.