In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
First of all, to understand the knowledge of Layer 3 switches, we need to understand the relevant knowledge of (Layer 2 devices) switches (data link layer) and (Layer 3 devices) routers (network layer). On the basis of understanding the principles of Layer 2 (data frame) forwarding and Layer 3 (data packet) forwarding, we need to understand the relevant knowledge of MAC address table, ARP cache table and routing table.
If we talk about Layer 3 switches, we must understand VLAN division and Trunk links. Simply put, the purpose of VLAN division is mainly to solve the generation of broadcast storms in the network. As a result, hosts belonging to the same network segment and different VLANs cannot communicate normally. The origin of Trunk links is to realize communication between hosts of the same VLAN between different switches. Then we will consider such a problem: After the local area network is divided into VLANs, how do hosts of different VLANs in the local area network communicate with each other?
This requires three-layer switching technology to help us solve such problems.
When it comes to Layer 3 switching, we have to talk about its predecessor: router-on-a-stick refers to the interconnection between different VLANs (virtual local area network) that were originally isolated by configuring sub-interfaces (or "logical interfaces" without real physical interfaces) on an interface of the router.
The concept of logical sub-interfaces: The physical interface of a router can be divided into multiple logical interfaces (or considered virtual interfaces), and these divided logical interfaces are visually called sub-interfaces. Note that these logical subinterfaces cannot be turned on or off individually, that is, when a physical interface is turned on or off, all of the subinterfaces of that interface are turned on or off as well.
So what is the principle of single-arm routing?
Objective: To realize communication between two different VLANs
Experimental environment:
GNS3 software
2.2 PC hosts initialized +1 switch initialized +1 router initialized
3. If the host uses a virtual machine, then all firewalls of the virtual machine need to be turned off, otherwise data transmission will be affected later.
Experimental process:
GNS3 software, 2 PC hosts +1 switch +1 router ready
2. We use the network cable to connect all of them, according to personal preference to define each IP address, PC2 and PC3 in the same VLAN, written next to the port, then enter their own IP address and check.
3 Configure the switch: Create VLAN, Trunk link construction
Enter View VLAN Info to see if VLAN is generated (command: show vlan-sw b)
Building Trunk Links
4. configure the router
If you directly configure the routing address, you can't match it, because directly configuring the address, there is only one physical interface, you can't directly configure 2 addresses, we have to do
Encapsulation of Trunk
f0/0.2 192.168.20.1/24 is set the same way!~! (f0/0.2 encapsulated to VLAN20)
The logical subinterface we are doing now is still invalid because there is no real physical interface to support it, so we have to enter the f0/0 interface again.
5. Configure the IP address of the PC, and use PC1 to connect PC2 to see if the experiment is successful.
6. PC1 and PC2 interworking successfully
Summary: The above experiment focuses on understanding what is a logical sub-interface, and then understanding the principle of single-arm routing through packet capture. In fact, in single-arm routing, switches are mainly responsible for encapsulation and label removal, while routers are mainly responsible for routing forwarding and VLAN conversion.
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.