Analysis of network terminology | routing, switch, hub, half/full duplex, DNS, LAN, WAN, port, MTU

insert image description here

Welcome to follow the blogger Mindtechnist or join [ Linux C/C++/Python Community ] to learn and share Linux, C, C++, Python, Matlab, robot motion control, multi-robot collaboration, intelligent optimization algorithm, filter estimation, multi-sensor information fusion, Knowledge and technology in machine learning, artificial intelligence and other related fields.



Column: "Network Programming"


route

  • Routing (noun)
    The path that a data packet passes from the source address to the destination address, consisting of a series of routing nodes.
  • Routing (verb)
    The routing process in which a routing node selects a delivery direction for a data packet.

How routers work

Router (Router) is a device connected to various LANs and WANs in the Internet. It will automatically select and set routes according to channel conditions, and send signals in the order of the best path.
Traditionally, a router works on the third layer of the OSI seven-layer protocol, and its main task is to receive a data packet from a network interface, and decide to forward it to the next destination address according to the destination address contained therein. Therefore, the router first has to look up its destination address in the forwarding routing table. If it finds the destination address, it adds the next MAC address before the frame of the data packet, and at the same time, the TTL (Time To Live) field of the IP data packet header also starts Subtract, and recalculate the checksum. When a packet is sent to an output port, it needs to wait in order to be delivered on the output link.
When the router is working, it can search the routing table in the device according to a certain routing communication protocol. If there is more than one path to a particular node, the basic predetermined routing criterion is to choose the optimal (or most economical) transmission path. Since various network segments and their interconnection conditions may change due to environmental changes, the information on routing conditions is generally updated regularly according to the provisions of the routing information protocol used.
In the network, the basic function of each router is to dynamically update the routing table it maintains according to certain rules, so as to maintain the validity of routing information. In order to facilitate the transmission of messages between networks, routers always decompose larger data into data packets of appropriate size according to predetermined rules, and then send these data packets through the same or different paths. When these data packets arrive at the destination in sequence, the decomposed data packets are packaged into the original message form in a certain order. The router's hierarchical addressing function is one of the important functions of the router. This function can help a network with many node stations to store addressing information, and at the same time, it can also intercept messages sent to remote network segments between networks and forward them. Function: Selecting the most reasonable route and guiding communication are also the basic functions of routers; multi-protocol routers can also connect network segments using different communication protocols and become a communication platform between network segments of different communication protocols.
The main difference between routing and switching is that switching occurs at layer 2 (data link layer) of the OSI reference model while routing occurs at layer 3, the network layer. This difference determines that routing and switching need to use different control information in the process of moving information, so the two implement their respective functions in different ways.

Routing Table

In computer networking, a routing table or routing domain information base (RIB) is a spreadsheet (file) or database-like stored on a router or networked computer. Routing tables store paths to specific network addresses.

routing entry

A row in the routing table, each entry is mainly composed of four parts: destination network address, subnet mask, next hop address, and sending interface. If the destination network address of the data packet to be sent matches a row in the routing table, it is Send to the next hop address according to the specified interface.

default route entry

The last line in the routing table is mainly composed of the next hop address and the sending interface. When the destination address does not match other lines in the routing table, it will be sent to the next hop address according to the interface specified in the default routing entry.

routing node

A host or router with routing capability maintains a routing table and determines which interface to send data packets to by querying the routing table.

How Ethernet Switches Work

The Ethernet switch is a switch based on Ethernet to transmit data, and Ethernet adopts a local area network in which a shared bus is used to transmit media. The structure of the Ethernet switch is that each port is directly connected to the host, and generally works in full-duplex mode. The switch can connect many pairs of ports at the same time, so that each pair of hosts that communicate with each other can transmit data without conflict as if they monopolize the communication medium.
The Ethernet switch works on the second layer of the OSI network reference model (that is, the data link layer). It is a network device based on MAC (Media Access Control, Media Access Control) address identification and Ethernet data frame forwarding.

working principle of the hub

A hub is actually a kind of repeater, the only difference is that the hub can provide more port services, so the hub is also called a multi-port repeater.
The function of the hub is to randomly select a device on a certain port and let it monopolize the entire bandwidth to communicate with the uplink device (switch, router or server, etc.) of the hub. It can be seen from the working method of the Hub that it only plays the role of signal amplification and retransmission in the network. Its purpose is to expand the transmission range of the network, but it does not have the ability of directional transmission of signals. It is a standard shared device. Secondly, the Hub only communicates with its uplink devices (such as upper-layer Hubs, switches or servers), and the ports on the same layer do not directly communicate with each other, but broadcast information to all ports through the uplink device. It can be seen that even if communication is performed between two different ports of the same Hub, it must go through two steps:

  • The first step is to upload the information to the uplink device;
  • The second step is to uplink the device and then broadcast the information to all ports.

half duplex/full duplex

Full-duplex (Full-duplex) Full-duplex is the ability to transmit data in both directions simultaneously in a channel.
Half-duplex (half-duplex) can only transmit data along one direction at the same time in the channel.

DNS server

DNS is the abbreviation of Domain Name System (Domain Name System), which is a core service of the Internet. As a distributed database that can map domain names and IP addresses to each other, it can make it easier for people to access the Internet without having to remember An IP address string that can be read directly by the machine.
It is composed of resolvers and domain name servers. A domain name server refers to a server that saves the domain names and corresponding IP addresses of all hosts in the network and has the function of converting domain names to IP addresses.

local area network (LAN)

Local area network, a small-scale computer network covering one or several buildings, a campus, or a factory area.

  • The geographical coverage is small, and it is only connected within a relatively independent local area, such as a building or a concentrated building complex.
  • Use specially laid transmission media for networking, high data transmission rate (10Mb/s~10Gb/s)
  • Short communication delay time and high reliability
  • LAN can support multiple transmission media

Wide Area Network (WAN)

Wide area network, a kind of interconnection of local area networks or metropolitan area networks in different regions, can provide remote computer networks for computer communication between different regions, cities and countries.
Coverage is wider than local area network (LAN) and metropolitan area network (MAN). The communication subnet of the wide area network mainly uses packet switching technology.
The communication subnet of the WAN can use the public packet switching network, satellite communication network and wireless packet switching network, which will interconnect the local area networks or computer systems distributed in different regions to achieve the purpose of resource sharing. Such as the Internet is the world's largest wide area network.

  • Adapt to the requirements of large capacity and sudden communication;
  • Adapt to the requirements of comprehensive business services;
  • Open device interface and standardized protocol;
  • Perfect communication service and network management.

port

A port in a logical sense generally refers to a port in the TCP/IP protocol, and the port number ranges from 0 to 65535, such as port 80 for web browsing services, port 21 for FTP services, and so on.

  • Port numbers less than 256 are defined as common ports, and servers are generally identified by common port numbers.
  • The client only needs to ensure that the port number is unique on this machine. The client port number is also called temporary port number because of its short existence time;
  • Most TCP/IP implementations assign ephemeral port numbers between 1024 and 5000. Port numbers greater than 5000 are reserved for other servers.

We should avoid using well-known ports when customizing ports. Such as: 80, 21 and so on.

PERSON

MTU: Communication term Maximum Transmission Unit (MTU).
It refers to the maximum packet size (in bytes) that can pass through a certain layer of a communication protocol. Maximum transmission unit This parameter is usually related to the communication interface (network interface card, serial port, etc.).
Here are the MTUs for some protocols:

- FDDI协议:4352字节
- 
- 以太网(Ethernet)协议:1500字节
- 
- PPPoE(ADSL)协议:1492字节
- 
- X.25协议(Dial Up/Modem):576字节
- 
- Point-to-Point:4470字节

insert image description here
insert image description here


Guess you like

Origin blog.csdn.net/qq_43471489/article/details/130342028