In-depth understanding of routers and switches

router

switch

The main difference between routers and switches

It is reflected in the following aspects:
(1) Different working levels The
original switch works at the data link layer, while the router is designed to work at the network layer from the beginning. Since the switch works at the data link layer, its working principle is relatively simple, while the router works at the network layer, which can get more protocol information, and the router can make more intelligent forwarding decisions.
(2) The data forwarding is based on different objects. The
switch uses the physical address or MAC address to determine the destination address of the forwarded data. The router uses the IP address to determine the address for data forwarding. The IP address is implemented in software and describes the network where the device is located. The MAC address is usually built-in hardware, assigned by the network card manufacturer, and has been solidified into the network card, and generally cannot be changed. The IP address is usually automatically assigned by the network administrator or system.
(3) The traditional switch can only divide the conflict domain, not the broadcast domain; while the router can divide the broadcast domain
. The network segment connected by the switch still belongs to the same broadcast domain, and the broadcast data packet will be transmitted on all network segments connected to the switch. In some cases, it will lead to communication congestion and security breaches. The network segments connected to the router will be assigned to different broadcast domains, and broadcast data will not pass through the router. Although the switches above the third layer have VLAN functions, broadcast domains can also be divided, but communication between sub-broadcast domains cannot be communicated, and a router is still needed for communication between them.
(4) The router provides the service of a firewall. The
router only forwards data packets with specific addresses, and does not transmit data packets that do not support routing protocols and unknown target network data packets, which can prevent broadcast storms.

Physical address

In computer science, physical address (English: physical address), also called real address (real address), binary address (binary address), it exists in electronic form on the address bus, so that the data bus can access the main memory The memory address of a specific storage unit.

Mac address

MAC address (English: Media Access Control Address), literally translated as media access control address, also known as LAN address, MAC address, Ethernet address or physical address, it It is an address used to confirm the location of network devices.
In the OSI model, the third layer of the network layer is responsible for the IP address, and the second layer of the data link layer is responsible for the MAC address

IP address

The IP address is like our home address. If you want to write to a person, you need to know his (her) address so that the postman can deliver the letter. The computer sending information is like a postman, it must know the only "home address" in order not to send the letter to the wrong person. It's just that our address is expressed in words, and the computer address is expressed in binary numbers.

Switch hub

First of all, let's talk about HUB, which is the hub . Its function can be simply understood as connecting some machines to form a local area network .

And the switch (also known as the switching hub) is basically the same as the hub. But there is a difference in performance between the two:

The hub uses a shared bandwidth working mode, while the switch is exclusive bandwidth. In this way, when there are many machines or a large amount of data, the two will be more obvious.

The router is obviously different from the above two. Its function is to connect different network segments and find the most suitable path for data transmission in the network. The router is generated after the switch, just like the switch is generated after the hub, so the router and the switch are also connected to a certain extent, not two completely independent devices. The router mainly overcomes the shortcomings that the switch cannot route and forward data packets.

Hub

The English name of the hub is "Hub". "Hub" means "center". The main function of the hub is to regenerate, reshape, and amplify the received signal to expand the transmission distance of the network while concentrating all nodes on the node centered on it. It works on the first layer of the OSI (Open Systems Interconnection Reference Model) reference model, the "physical layer". The hub is the same as the network card, network cable and other transmission media, and belongs to the basic equipment in the LAN

node

In a telecommunications network, a node (English: node, Latin: nodus) is a connection point, which represents a redistribution point or a communication endpoint (some terminal devices). The definition of a node depends on the network and protocol layer mentioned.
A physical network node is an active electronic device connected to the network, capable of sending, receiving or forwarding information through a communication channel. Therefore, passive distribution points (such as patch panels or patch panels) are not nodes.

In data communication, a physical network node can be a data circuit termination equipment (DCE), such as a modem, hub, bridge or switch; or a data terminal equipment (DTE), such as a digital mobile phone, printer or host (such as Router, workstation or server).

switch

The switch is a network device based on MAC address identification and capable of encapsulating and forwarding data packets.

Switch means "switch" is a network device used to forward electrical (optical) signals . It can provide an exclusive electrical signal path for any two network nodes connected to the switch .

The most common switch is an Ethernet switch. Other common ones include telephone voice switches, optical fiber switches, etc.

Exchange is a general term for technologies that send the information to be transmitted to the corresponding route that meets the requirements in accordance with the needs of the two ends of the communication to transmit information, manually or automatically by equipment .

routing

Routing refers to the process of determining the network scope of the end-to-end path when a packet travels from the source to the destination. Routing works at the third layer of the OSI reference model-the packet forwarding device at the network layer.

The router realizes network interconnection by forwarding data packets.

The internet

In the computer field, the
network uses physical links to connect isolated workstations or hosts together to form a data link , so as to achieve the purpose of resource sharing and communication.
The network is a virtual platform for information transmission , reception, and sharing. Through it, the information of various points, areas, and bodies are connected together to realize the sharing of these resources.

Classified by coverage:
local area network LAN (the range of action is generally from a few meters to tens of kilometers).
Metropolitan area network MAN (between WAN and LAN).
Wide area network WAN (the range of action is generally tens to thousands of kilometers).

wan connected to cmu (wide area network)
lan connected to computer or wmsu (local area network)

Why is there a network?

The Internet is the Chinese translation of the Internet. Its predecessor was ARPAnet developed by the Advanced Research Projects Agency (ARPA) of the US Department of Defense.
At the end of the 1960s, it was in the cold war period. At that time, when the US military was attacked on its computer network, even if part of the network was destroyed, the rest could still maintain communication. So the Advanced Research Projects Agency (ARPA) of the US Department of Defense built a military network called "Ah "ARPAnet" (ARPAnet). Arpanet was officially launched in 1969, when only four computers were connected for scientists to conduct computer networking experiments. This is the predecessor of the Internet.
By the 1970s, ARPAnet had dozens of computer networks, but each network could only interconnect and communicate between computers within the network, and different computer networks still could not communicate with each other. To this end, ARPA has set up new research projects to support the academic and industrial circles to conduct related research. The main content of the research is to use a new method to interconnect different computer local area networks to form the "Internet". Researchers call it "internetwork", or "Internet" for short. This term has been used until now.
In the process of research and realization of interconnection, computer software has played a major role. In 1974, protocols for connecting packet networks appeared , including TCP/IP-the famous Internet Protocol IP and Transmission Control Protocol TCP . These two protocols cooperate with each other. Among them, IP is the basic communication protocol, and TCP is the protocol that helps IP realize reliable transmission.

Packet switching network interconnection

Packet switching network interconnection refers to the interconnection of packet switching networks according to specific requirements. The purpose is to enable different online users (DTE) to achieve cross-network communication and resource sharing. The main interconnected devices are: gateways, routers, bridges and repeaters

The key issue of interconnection is to carry out the necessary protocol exchange, and requires the least impact on the original network. The former International Telegraph and Telephone Consultative Committee (ccnr)) c75 recommendation is a standard for the interconnection of international packet switching networks: the same standard Internet packet format is used between Internet roads, and only the packet switch at the connection point is required to implement it. No modification will be made to the agreement in the original network.

Internet Protocol IP

Transmission Control Protocol TCP

Transmission Control Protocol (TCP, Transmission Control Protocol) is a connection-oriented, reliable, byte stream-based transport layer communication protocol

link

A link refers to a passive point-to-point physical connection.

In wired communication, a link refers to a physical line between two nodes, such as cables or optical fibers.
In radio communication, the link refers to the path space of electromagnetic waves propagating between the base station and the terminal.
In underwater acoustic communication, the link refers to the path space of the propagating sound wave between the transducer and the hydrophone.

Physical link

Data link

local area network

Local area network (local area network) is usually abbreviated as "local area network", abbreviated as LAN.
A local area network is just a group of computers connected together via a network at the same place.

Wan

WAN consists of two or more LANs, and the connection between these LANs can traverse a distance of more than 30mile*.
A large WAN can be composed of many LANs and MANs on all continents.
The most widely known WAN is the Internet, which consists of thousands of LANs and WANs worldwide

The birth of the network

In the more than ten years since the world’s first electronic computer came out in 1946, it was very expensive. The number of computers is extremely small, and the so-called computer network in the early days was mainly created to solve this contradiction. Its form is to directly connect a computer to a number of terminals via a communication line. We can also regard this method as the simplest prototype of a local area network.

The earliest network was established by the Advanced Research Projects Agency (ARPA) of the US Department of Defense. Many concepts and methods of modern computer networks, such as packet switching technology , come from ARPAnet. ARPAnet not only conducted research on packet switching technology for leased line interconnection, but also on packet switching technology for wireless and satellite networks-the result of which led to the advent of the network protocol TCP/IP.

Packet switching technology

Packet switching technology, also known as packet switching technology, is a technology that divides the data transmitted by users into certain lengths, each part is called a packet, and transmits information by means of packets. It is a kind of exchange technology that realizes the communication between the computer and the computer through the computer and the terminal, when the quality of the transmission line is not high, and the network technology is still relatively simple. There is a packet header in front of each packet to indicate the address to which the packet is sent, and then the switch forwards them to the destination according to the address flag of each packet. This process is called packet switching.

Network node

A network node refers to a computer or other device connected to a network with an independent address and the function of transmitting or receiving data. Nodes can be workstations, clients, network users, or personal computers. They can also be servers, printers, and other network-connected devices. Every workstation, server, terminal device, network device, that is, a device with its own unique network address, is a network node. The entire network is composed of these many network nodes, which are connected by communication lines to form a certain geometric relationship. This is the computer network topology.

Node address

Each network node obtains a unique address through the network card . Each card in a factory when a cure will be the world's only manufacturer of media media access layer (Media Access Control) address, the user is unlikely to change this address. This address arrangement is just like our daily home address, it is used to distinguish each person's identity. Your network must be able to distinguish this address from other addresses. There are many data packets in the network that will be transmitted from one network node to another. At the same time, it is necessary to make sure that the packet will be correctly transmitted to the destination, and this destination must be identified by the network card address.

Information transfer

Information transmission includes time and space transmission.
The transmission of time can also be understood as the storage of information. For example, the thought of Confucius has been spread through books to the present. It breaks through the limitation of time and is transmitted from ancient to modern times.
Spatial transmission, which is what we usually call information transmission, for example, we use language to communicate face-to-face, use the phone or social tools to chat, send e-mails, etc. It breaks through the limitations of space and is transmitted from one terminal to another. .

Have time to take a look at Zhihu: What are the differences between routers and switches?
The difference between switches and routers (recommended) in-depth article

Two IP addresses cannot be in the same network segment?

Of course, it can’t be on the same network segment. This is determined by the routing principle. The principle of
routers is to enable devices with IP addresses in different network segments to communicate with each other . A router can have multiple network interfaces, and each interface has an IP address. , As the IP address of the gateway connecting different network segments.
If your PC or other network equipment has multiple network interfaces, it is equivalent to a router, so it cannot be on the same network segment. Unless it is run by a special software to support setting the same network segment or even the same IP address, such as IP hot backup, IP address drift and other special applications

What are "different network segments"

Different network segments: Devices that work at the data link layer or higher, such as bridges, switches, routers, etc., are connected by the two groups of devices that are still at their own independent physical layers , so there are two network segments, divided into Computer networks belonging to two different network segments are different network segments.

What are different network segments of the same LAN

1 If a computer connected to a switch is configured with IP addresses of different network segments, it is called different network segments of the same LAN;
2 If one computer is configured with 192.168.1.1/24, and the other computer is configured with 192.168.2.1/24, then Their IP addresses are known to be not in the same network segment;
3 Although computers on different network segments of the same LAN are on a switch, they cannot communicate unless they are divided into different VLANs and there are routes between VLANs to communicate.

Basic principles of switches

Who said that the IPs of dual network cards cannot be in the same network segment?
Your laptop has both an Ethernet card and a wireless network card. You connect the network cable and wireless at the same time. Isn't it the same IP segment for the two network cards?

What is a network card

A network card is a piece of computer hardware designed to allow computers to communicate on a computer network . Because it has a MAC address , it belongs to the second layer of the OSI model . It allows users to connect to each other via cable or wirelessly .

The communication between the network card and the local area network is carried out in a serial transmission mode through a cable or a twisted pair . The communication between the network card and the computer is carried out in parallel transmission through the I/O bus on the computer motherboard .

When installing the network card, the device driver for the management network card must be installed in the computer's operating system. This driver will later tell the network card where in the memory the data blocks transferred from the LAN should be stored.

When the network card receives an error frame, it discards the frame without notifying the computer it is inserted into. When the network card receives a correct frame, it uses an interrupt to notify the computer and deliver it to the network layer in the protocol stack. When the computer wants to send an IP data packet, it is sent to the local area network after being assembled into a frame by the protocol stack to the network card.

frame

›The physical memory is divided into fixed-size blocks, called frames. In contrast,
›divide the logical memory into blocks of the same size, called pages

Data is transmitted on the network in very small units called Frames

Frames are shaped by a specific software called a network driver, and then sent to the network cable through the network card, and reach their destination machine through the network cable. The opposite process is performed on the end of the destination machine. The Ethernet card of the receiving machine captures these frames, tells the operating system that the frames have arrived, and then stores them.

The communication protocol used by the Internet is referred to as IP, which is the Internet Protocol

computer network

Computer network refers to the connection of multiple computers with independent functions in different geographical locations and their peripheral equipment through communication lines, and realizes resource sharing and information under the management and coordination of network operating systems, network management software and network communication protocols Delivery computer system.
The simplest definition of Baidu Baike is: a collection of interconnected, autonomous computers for the purpose of sharing resources.

protocol

Protocol, short for network protocol, network protocol is a set of agreements that must be complied with by both parties of the communication computer. Such as how to establish a connection, how to identify each other, etc.

Protocol layering

communication device

The English abbreviation is ICD, and the full name is Industrial Communication Device. Wired communication equipment and wireless communication equipment for industrial control environment.

What is an Ethernet card and how much is an Ethernet card

In order to better surf the Internet and ensure the speed and quality of the network, people invented the Ethernet card.

What is Ethernet and what is Ethernet card.

Let’s put it this way, the desktop computers we use now use the network card in the computer to connect to the network. Some people call the network card a network adapter, which is named because the network must cooperate with the network card. The network card is a desktop hardware device and one of the most basic components in a local area network. Whether it is optical fiber connection network or coaxial cable connection network, we usually use the help of network card.

Guess you like

Origin blog.csdn.net/fengtingYan/article/details/106237591