In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
This experiment consists of three small experiments, from simple to difficult, VLAN setup, Trunk trunk link setup, and finally layer 3 switch setup. VLAN settings (all PCs must be on the same network segment)
The Chinese name of VLAN (Virtual Local Area Network) is "Virtual local area network." Virtual local area network (VLAN) is a logical group of devices and users, these devices and users are not limited by physical location, they can be organized according to functions, departments and applications and other factors, communication between each other as if they are in the same network segment, hence the name virtual local area network.
In computer networks, a two-tier network can be divided into several different broadcast domains, one corresponding to a specific group of users, and these different broadcast domains are isolated from each other by default. Communication between different broadcast domains requires one or more routers. Such a broadcast domain is called VLAN.
1. Set up vlan experimental environment
Drag a router and three pcs through the icon bar on the left and connect them through the network cable
Right-click the route and select "configure" to modify settings,"change hostname" to modify hostname, and "change sympol" to modify symbols.
1-1 Select "configure" to modify the settings, and then enter the second and third tabs in turn. See the following figure for specific modification methods.
Note: In the second tab to add capacity must be never started, in case if started need to enter "erase flash" initialization disk in the default privileged mode, can read normally, otherwise it is unable to read
1-2 Select "change hostname" to change the hostname,
1-3"change sympol" modify symbol to change router to switch
2. Switch parameter settings 2-1 Use the Remarks button to add remarks to the equipment, which is convenient for later modification of parameters. Detailed remarks are shown in the figure.
2-2 Double-click sw switch, enter "configure terminal" to enter global mode, then enter "vlan 10, 20" to create two broadcast domains vlan10, 20, and finally enter "no ip routing" to turn off routing function (because this mirror was originally a routing mirror, but now it is changed to a switch, so it still has routing function and needs to be turned off)
2-3 After creating vlan10 and vlan 20, enter "do show vlan-switch brief" to check the existing vlan. At this time, vlan10 and vlan 20 do not contain any interfaces. We need to add them manually.
2-4 Enter "interface fastEthernet 10" to enter the f10 interface, then enter "switchport mode access" to set the interface as an access link, and finally enter "switchport access vlan 10" according to the previous remarks to classify f10 into vlan10.
2-5 Enter "interface range fastEthernet 1/1 -2" and enter f1/1 and f1/2 interfaces at the same time, and classify these two interfaces into vlan20 according to the remarks.
2-6 Enter end to return to privileged mode, and then enter "show vlan-switch brief" to check the vlan table to see if the three ports have been added separately.
3, PC ip address settings and interworking 3-1 into three PCs, according to the remarks ip address added
3-2 Interworking experiments were carried out, and the results were as shown in the figure.
Second, the Trunk link settings and actual use (all PCs need to be under the same network segment)
In the routing/switching world, VLAN trunk ports are called trunks. Trunk technology is used to interconnect switches, allowing different VLANs to communicate with the same VLAN in other switches over shared links. Trunks cannot communicate between different VLANs and need to be implemented through Layer 3 devices (routing/Layer 3 switches).
1. The settings of the second router and PC 1-1 ensure that the topology structure remains unchanged after the completion of the first experiment, and add a new router and two new PCs, as shown in the figure.
1-2 Change the symbol, name, and disk space for the second route (same as for the first route, so I won't go into more detail) and double-click sw2 to create vlan10, 20 in global mode
1-3 Divide interfaces into corresponding vlan broadcast domains according to comments
1-4 Finally, the Trunk link is set. Enter the interface of f1/3. Enter "switchport trunk encapsulation dot1q" to set the encapsulation mode to dot1q, then enter "switchport mode trunk" to set the interface as Trunk link, and enter "do show interface fastEthernet 1/3" to check whether the interface details are set correctly. Finally, return to sw1 to set the Trunk link on the same interface (the setting method is the same).
1-5 Enter the two new pc machines to set ip respectively
1-6 According to the previous remarks, pc1 and pc4 belong to different switches in the same network segment and broadcast domain, pc2, 3 and pc5 belong to different switches in the same network segment and broadcast domain, and the interworking experiment is conducted in turn.
Data interworking experiments under Layer 3 and Layer 3 switches (between different IP network segments and different VLANs)
A Layer 3 switch is a switch that has part of the router function and works at Layer 3 of the OSI network standard model: the network layer. The most important purpose of Layer 3 switch is to speed up the data exchange within large local area network. The routing function it has is also for this purpose, and it can be routed once and forwarded many times.
1. Settings of Layer 3 routers and other devices 1-1 Delete the previous topology, drag in two routers and two PCs again, change the symbol of one of them to Layer 3 switches according to the previous settings (the rest are the same as before)
1-2 Set the middle sw1 in turn, turn off the routing function for the first time (it needs to be turned off here), then divide the vlan domain, and finally set the Trunk link. The specific setting method is the same as the previous experiment, and the setting results are shown in the figure.
1-3 Enter sw2, where the routing function must not be turned off (originally it is a route mirror, which is a three-layer route). After entering global mode, create vlan and set f1/0 interface Trunk in turn.
1-4 Different from the previous layer 2 routing, the interface is not included in the vlan here, but the vlan is regarded as a virtual interface for which ip is set and used as a pc gateway. In global mode, enter "interface vlan 10" to enter vlan10 virtual port, and then enter "ip address" to specify ip for this virtual port. The same is true for vlan20.
1-5 Finally, in global mode, enter "do show ip interface brief" to view the interface ip table and check whether the entry is correct.
2. PC settings and cross-segment and cross-broadcast domain interworking experiments 2-1 Specify ip for two clients
2-2 Interworking experiments
All three experiments ended perfectly.
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.