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

How to analyze vlan, layer 3 switch, gateway, DNS, subnet mask and MAC address

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

In this issue, the editor will bring you about how to analyze vlan, layer 3 switch, gateway, DNS, subnet mask and MAC address. The article is rich and analyzed and described from a professional point of view. I hope you can get something after reading this article.

What is VLAN

VLAN is "virtual local area network" in Chinese. LAN can be a network of a few home computers or an enterprise network of hundreds of computers. The LAN that VLAN refers to specifically refers to a network that is divided by a router-- that is, a broadcast domain. Listen to the above concept, there must be a lot of friends are confused, what is a virtual local area network? All right, why divide vlan? Here is an example: a popular understanding of a high school, the new semester enrollment of 800 students, if these 800 students, if put in a class, it must be unable to manage, in the face of 800 people, the teacher also had a headache, here is teaching, there is no hearing, the teacher assigned any task, there will be some can not convey, if the teacher wants to find a student's message, to find from 800 messages, extremely troublesome A waste of time In practice, it is the same. If computer A wants to communicate with computer B, computer A needs to send an arp request, and there are many computers in the network, and eventually the ARP request will be forwarded to all computers in the same network before computer B can be found. In this way, in order to find computer B, it consumes the overall bandwidth of the network, and the computer that receives the broadcast message also takes part of the CPU time to process it. It results in a large amount of unnecessary consumption of network bandwidth and CPU computing power. So what should I do? For these 800 students, the school is divided into 10 classes, each with 80 students, named Class 1 (1) and Class 2 (2) respectively. In Class 10, Grade one, everyone gets a class number. 1101 means student number 01 in class one.

1102 means students in Class 02.

1201 means student number 01 in Class 2. The Mantissa of the student number in the same class is different, but all the others are the same. Then it will be much easier for the teacher to manage it again. He can properly manage the 80 people in the first class. Class 2 and Class 3 next door will be messed up into a pot of porridge. I just want 80 people in this class to have a good class. This is vlan, each class is equivalent to a vlan, and the name of each class is equivalent to the name of vlan, and the number of each student is the ip address; classmates (ip of the same vlan), because the same classroom, get along day and night, and can communicate with each other, students in different classes, if they do not do other work, it is difficult to communicate. Therefore, the same vlan can communicate with each other; different vlan, if not configured, cannot communicate with each other. So how do different vlan communicate? One-arm routing and layer 3 switches are needed. Single-arm routing and layer 3 switch We know that in order to achieve communication between different vlan, we must have routing function, and there are two ways for different VLAN to communicate with each other (single-arm routing and layer 3 switch). What is router on a single arm? In fact, the implementation of single-arm routing is an ordinary layer 2 switch and router, so that different vlan can communicate with each other.

So what is a layer 3 switch? For small networks, single-arm routing can handle, but with the continuous increase of traffic between VLAN, the router is likely to become the bottleneck of the entire network, packet loss, or traffic congestion. In order to solve the above problems, layer 3 switch came into being. Layer 3 switch is essentially a "layer 2 switch with routing function". Routing belongs to the function of layer 3 network layer in the OSI reference model, so the switch with layer 3 routing function is called layer 3 switch. For the internal structure of the layer 3 switch, you can refer to the following diagram.

4. How does the gateway communicate?

Without a router, there is no TCP/IP communication between two different networks. Even if the two networks are connected to the same switch (or hub), the TCP/IP protocol will determine that the hosts in the two networks are in different networks according to the subnet mask (255.255.255.0). In order to realize the communication between the two networks, it must be through the gateway.

If the host in network A finds that the destination host of the packet is not in the local network, it forwards the packet to its own gateway, which forwards it to the gateway of network B. the gateway of network B then forwards it to a host of network B (as shown in the attached figure). The process by which network B forwards packets to network A.

Therefore, only by setting the IP address of the gateway can TCP/IP protocol realize the communication between different networks.

5. What is the default gateway?

If you find out what a gateway is, the default gateway will be easy to understand. Just as a room can have multiple doors, a host can have multiple gateways. The default gateway means that if a host cannot find an available gateway, it sends the packet to the default designated gateway, which processes the packet. The gateway used by the host now generally refers to the default gateway.

What is DNS

DNS is a domain name resolution server (Domain Name System), which turns a URL into an IP address.

To put it bluntly, DNS is used to translate domain names into IP addresses, which is easy for everyone to understand by giving an example.

For example, when we enter www.baidu.com in the browser, the machine communicates with Baidu, and the machine sends data packets to the outside. The IP address of Baidu server is written inside the data packet. We don't know what the IP address is, so we need the host to ask the DNS server, and the DNS server automatically translates the www.baidu.com domain name into the IP address 61.135.169.105 for us. Then write it to the destination IP address of the packet and communicate.

Just like we write a letter, you have to write the address of the recipient before the post office can send it to you. You write a letter abroad, you write a Chinese address and the post office does not know it. You need this person to translate it into English for you. This is what DNS is for, so you can browse the web normally if you write DNS in the local connection. If you don't set up DNS, you can't visit the web page properly.

5. MAC address when it comes to MAC address, you have to mention ip address. By the way, ip address is also mentioned here. IP and MAC

Although it is ipv6 now, most of us basically use the ipv4 protocol. The so-called ip is the number of your computer's entire network. Other computers need this number if they want to access the computer. But this number changes all the time in many cases. The only thing that remains the same is your MAC address: the physical address.

MAC is the only network address used to identify network card devices in the network. Assigned uniformly by the relevant hardware manufacturers, the MAC address of each computer is unique.

To make an analogy, you often move, you do not move every time there is an address, XX community XX unit XX number, this is IP. But your name remains the same, this is MAC, the difference is that our MAC does not allow duplicate names.

Our IP is divided into two parts: the above figure is divided into the network part and the host part. The network part is like you are in XX Town, XX City, XX Province, which is fixed by the state. But the XX number of the XX unit in XX district is set by the developer himself. The two numbers add up to your ip. The difference is that in reality, the length of the two numbers is fixed, but the ip addresses of A, B, C and D change on the network, which was discussed in detail the day before yesterday.

VI. Subnet mask

The subnet mask is used to distinguish between network bits and host bits. As mentioned above, an ip address is made up of the network part and the host part. Just as a person's first name consists of a surname and a first name.

So we can compare the IP address to a person's name, then the subnet mask is like a list, you can quickly know who has the same last name, those who have different last names, put people with the same surname into a group, so that they can communicate with each other before.

For example, there is a network segment 192.168.1.0-192.1.254, this network segment is like a village, called it Security Village, this network segment has an ip address of 192.168.1.1, we call him Security one, another person is called Security two, and its ip address is 192.168.1.2. As soon as we look at them, we know that they are from the same village. There is another network segment, 192.168.0.0While 192.168.255.254, we call it an Village. There is also a village with two ip addresses of 92.168.1.1 and 192.168.1.2, also known as Security one and Security two, so what's the problem? At this time, how to distinguish which village they belong to? At this time, you need a subnet mask to determine which network segment they belong to. You need to take Security one and Security two to the village to recognize them, and you will know that they belong to that village. The network segment of Security Village is 255.255.255.0, and that of an Village is 255.255.0.0. Ip addresses similar to "the same name" and "the same surname" will also appear in the network. How to distinguish which network segment they belong to depends on the subnet mask. The above is how to analyze vlan, layer 3 switch, gateway, DNS, subnet mask and MAC address. If you happen to have similar doubts, please refer to the above analysis. If you want to know more about it, you are welcome to follow the industry information channel.

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

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report