In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The basics of the network:
The concept of network
The network is composed of nodes and connections, representing many objects and their interconnections. In mathematics, the network is a kind of graph, which is generally considered to refer to the weighted graph. In addition to the mathematical definition, the network also has a specific physical meaning, that is, the network is a model abstracted from some kind of practical problems of the same type. In the computer domain, the network is a virtual platform for information transmission, reception and sharing, which connects the information of each point, surface and body together, so as to realize the sharing of these resources. The network is the most important invention in the history of human development, which improves the development of science and technology and human society.
Functions of the network:
Data communication
Resource sharing
Two models
ISO/OSI
TCP/IP
Characteristics of the network:
Speed
Cost
Security.
Availability: available time / total time
Expandability
Reliability.
Topologies: physical topology
Logical topology: the path of data transmission
The components of a network
Generally speaking, two or more computers can be called computer network by using any medium (cable, optical fiber or radio wave) and any network to connect, share resources and communicate.
Network protocol is a communication standard that must be obeyed by both parties who establish communication and transmit data on the network. it defines the rules that must be followed by the receiver and the sender to communicate, and the protocols at the same layer must be the same. otherwise, there can be no communication or data errors. In order to build a communication network, some special equipment is usually required. The following figure is a common network connection diagram:
Node (node): a node is mainly a device with a network address (IP).
Server host (server): a host that provides data in response to a user can be called a server.
Workstation (workstation) or client (client): the one who initiates the online request for data can be called a client.
Network card (Network Interface Card,NIC): a device that mainly provides network access.
Network interface: a task that provides a network address (IP). The host also has an internal network interface, that is, the loopback test interface!
Network form or topology: the connection mode of each node on the network, generally speaking, is the physical connection mode.
Route: a packet forwarding device that a router receives a packet from one interface, directs it according to the destination address of the packet and forwards it to another interface program, which works in the third layer of the OSI reference model-the network layer.
Gateway (gateway): also known as inter-network connector, protocol converter. The gateway implements network interconnection above the network layer and is the most complex network interconnection device, which is only used for the interconnection of two networks with different high-level protocols.
OSI Network Model and TCP/IP Network Model
OSI (Open System Interconnect, Open Systems Interconnection), a seven-layer network model defined by ISO, is an important milestone in network development. Its appearance provides a reference basis for various network technologies and devices, and plays a certain role in the design and unification of network protocols.
OSI: open systems interconnection is layered according to function
Why use a hierarchical network model?
Reduce complexity
Standardized interface
Modular design
Ensure interoperability of technology
Accelerate the speed of development
Simplify teaching
Each layer of OSI's seven-tier model has clear characteristics. Layers 7-4 deal with communication between data sources and data destinations, and layers 3-1 deal with communication between network devices. The functions of each layer are:
Physical layer: a standard specification for the characteristics of transmission media is defined. With electrical characteristics; mechanical characteristics; process characteristics; functional characteristics; binary transmission
Data link layer: physical links are not reliable and errors may occur. The data link layer divides the data into frames and transmits the data frames as the most basic unit. Through the reordering and arrangement of the received data frames, the unreliable physical links are transformed into reliable data links in the upper protocol of the network model. Define physical address; establish logical link; data check function
Network layer: data is grouped according to a certain length, and the addresses of the source and destination hosts are recorded in the header of each packet, and then the path from the source host to the destination host is determined according to these addresses. If there are multiple paths, it is also responsible for routing.
Transport layer: the functions of this layer include selecting error recovery protocol or error-free recovery protocol, multiplexing the input of data streams from different applications on the same host, and reordering packets received in the wrong order.
Session layer: establish, manage and terminate communication application service requests and response sessions between network entities.
Presentation layer: transcoding is performed to ensure that the data of the source host can also be identified on the destination host.
Application layer: the highest layer of the OSI model, which realizes the direct dialogue between the network and users.
The seven-layer model of OSI is a theoretical model, which has been criticized because it is too large and complex, while the TCP/IP protocol stack developed by technicians has been more widely used. Different from OSI's seven-tier model, TCP/IP model does not focus on strict hierarchical division, but focuses on data transmission between devices. The functions of each layer of the TCP/IP model:
Network interface layer (link layer): defines how to transfer data over existing physical network media, including Ethernet, token Ring, frame Relay, and asynchronous transfer modes.
Network layer: encapsulates data into IP (Internet Protocol) packets and sends them to the destination network or host. This layer contains IP,
ICMP, IGMP, and ARP protocols.
Transport layer: defines the quality of service and connection status used in data transmission, and realizes the session between the peer entity on the source host and the target host. There are two different protocols at the transport layer: TCP and UDP.
Application layer: the TCP/IP model combines the session layer and presentation layer of the OSI reference model into the application layer, which defines TCP/IP application communication protocols, including HTTP, FTP, DNS, SMTP and so on. Among them, the missing protocols all correspond to different network services, and they generally have special port numbers.
TCP/IP: layering according to protocol
Application layer
| |-Protocol port |
Transport layer
| |-Agreement number |
Internet layer
| |-Protocol type |
Network access layer
TCP/IP network layer
Internet layer:
Protocol characteristics:
Runs at the OSI network layer
Connectionless-oriented protocol
Process packets independently
Hierarchical addressing
Best-effort transmission
Countless data recovery function
Internet Protocol---IP
ARP protocol: address resolution protocol
Logical address-physical address
Obtain the corresponding physical address when the logical address is known
How to resolve:
1. Every function that participates in a network device has an ARP library
2.ARP cache, broadcast through ARP protocol, the specified target host responds, and the corresponding result information is cached locally.
RARP: reverse address Resolution Protocol
Physical address-"logical address"
Known local physical address to obtain legal logical address
For diskless workstations
For connectionless:
1. There is no need to establish a communication connection before communication, there is no need to maintain the stability of the connection, and there is no need to dismantle the connection at the end of the communication
two。 Unordered data transmission
3. Data recovery mechanism and data reliability guarantee
Flat addressing and hierarchical addressing:
Flat addressing: divide the resources to be managed into several cell according to fixed size from beginning to end, each cell is addressed independently
Features: easy to address, addressing needs to traverse
Hierarchical addressing: classify the resources to be managed and compile them according to the corresponding categories
Features: complex and convenient addressing
The IP address consists of two parts:
Network: used to describe the scope of the network in which the specified host is located
Host: used to describe the specific location of a specified host within a specific network scope
IP address: customized by IPv4 protocol
The whole address consists of 32 bits: network bits + host bits = 32
IP address classification:
Class A: the first binary bit must be 0 and the network bit must be 8 bits
Class B: the first two binary bits must be 10 and the network bits must be 16 bits
Class C: the first three binary bits must be 110 and the network bits must be 24 bits
Class D: the first four binary bits must be 1110 and the network bits must be 32 bits, usually used for multicast communication
Class E: the first four binary bits must be 1111, reserved unused, for scientific research
Dotted decimal representation of IP addresses:
1. The 32-bit IP address bits are divided into 4 groups with 8 bits.
two。 Between each group. For separation
3. Convert each 8-bit group to a decimal representation
Various ranges of ip addresses expressed in dotted decimal notation
Category A: 0.0.0.0-127.255.255.255
The first octet with all zeros is an invalid IP because it represents the entire IP stack
All but the first one in the first 8-bit group is called a loopback address.
Valid IP address: 1.0.0.0-126.255.255.255
Category B: 128.0.0.0-191.255.255.255
Class C: 192.0.0.0-223.255.255.255
Category D: 224.0.0.0-239.255.255.255
Category E: 240.0.0.0-255.255.255.255
6.4
IP address 2
Reserved address: you cannot select an IP address to be used by other hosts
0.0.0.0-0.255.255.255
127.0.0.0-127.255.255.255
Automatically assign addresses
169.254.0.0-169.254.255.255
Network address: an address with all zero host bits
1.0.0.0: represents a range name
Broadcast address: an address with all 1 host bits
1.255.255.255: represents all IP addresses in the entire network segment as the destination address
Directed broadcast address:
255.255.255.255: represents all IP addresses in the entire IP address stack as the destination address
Total IPv4 addresses: 400 million 94 million
Take out the IP address:
Class E: 500 million
Address of 0 and 127network segments: 35 million
169.254 network segment address: 65536
Network address: 126 "16384 + 2.09 million
Broadcast address: 126 "16384 + 2.09 million
The address that can be assigned to the host is about 3.6 billion
To solve the problem of IP address exhaustion:
Increase the number of IP address reuse
Private IP address: can be reused and cannot be routed by the Internet
ARV 10.0.0.0-- 10.255.255.255
BRV 172.16.0.0-172.31.255.255
192.168.0.0-192.168.255.255
Common IP address: can be used on the Internet, but must be unique
NAT:net address translation
SNET: source address translation, replacing private IP addresses in packets with public IP addresses
DNET: destination address translation, replacing the public IP address in the package with a private IP address
Study a larger address stack
IPv6:128bit
Colon points, hexadecimal
IPV4 IPV6 coexistence
1. Address translation
The 2.IPv6 address contains the IPv4 address: the rightmost 32 bits of the IPv6 address is the IPv4 address
Format of IP header:
Ver:version,4bit, protocol version information; ipv4:0100 ipv6:0110
IHL:Internet protocol Header Length,IP header length, 4bit 15 lines
20byte-- 60byte, which must be an integral multiple of 4
Type of service:
4bits: type of service
0000,0001,0010,0100,1000
Maximum bandwidth, minimum delay, maximum throughput, maximum reliability
1bit: reserved bit
3bits: priority
000001010011100101110111
Packet length: 16bit, 65536byte, including header; 64KB
Identity: 16bits, identifies the source of the data, and identifies the source data from which the specified data is shredded
Logo: 3bits
Number one: retention
Second: whether it is sliced or not. The unsliced data is 0 and the slicing is 1.
Third: whether there are more fragments, indicating whether the data is the last one.
000010011
Slice offset: the sequence number after the packet is sliced by the 13bitsDifferent IP protocol
Time to Live (TTL): 8bits, counter
Each packet gets an initial TTL value, which is subtracted by 1 each time it passes a routing device.
0 indicates that the packet is unavailable data, and the next time the routing device acquires it, it will be discarded directly, which is valid.
Prevent the transmission of packets in an infinite loop
Initial value of TTL: 255pm 128je 64
Protocol number: 8bits, the direct communication interface between the Internet layer and the transport layer. After receiving the data correctly according to the content indicated by the protocol number, it is handed up to which protocol of the transport layer for further unblocking.
TCP:6
UDP:17
OSPE:89
EIGRP:88
First checksum: 16bits, carry out the first check reliability check
Source address: 32bits
Destination address: 32bits
How computers use IP addresses
Source IPv4 address: the IP address configured on the host that sent the data
How to configure the source IPv4:
Manual configuration: fill in the configuration file of the network card directly with the IPv4 address that we consider to be valid
Features: the address assignment is accurate, but the repeated workload of the administrator is heavy, which is easy to cause the host to be unable to access the network.
Automatic configuration: computers without IP addresses communicate with other computers that can provide IP addresses through specific protocols
And get the IP address.
Agreement:
BOOTP: startup protocol
The need to obtain IP addresses to the whole network broadcast using the RARP protocol; the BOOTP server will choose from other address pools
An ip address that is permanently used by this host
DHCP: dynamic host configuration protocol
Address lease planning
Each address has its corresponding lease term.
Rules for renewal of lease:
When the lease term is halfway past, the client contacts the server to renew the lease; if the renewal is unsuccessful, the client will try three times in a row, if all three times are unsuccessful
When 87.5% of the lease term has passed, the client will give up the IP address; rebroadcast whether there are other servers that can continue to use the previous IP address
Until the client IP address is completely released, the client will try to obtain another IP address from another server to link to the network
DHCP client address leasing process: four-line session
1. Client broadcasts send DHCP Discover messages to determine whether there is a DHCP server in the network that provides the local IP address
two。 When the server receives the DHCP Discover message, it checks its own address pool and, if it still has an IP address, chooses one of them to send the DHCP OFFER message to the client broadcast
3. The client receives the IP address in the first DHCP OFFER message as the optional IP address, broadcasts the DHCP Request message to the network, notifies the server, and drills the IP address as the IP address for this communication.
4. After receiving the DHCP Request message, the server providing the IP address temporarily binds the IP address with the physical address of the corresponding host; and starts the lease timing and sends the DHCP ACK message to the client. The server that does not provide the IP address receives the DHCP Request, puts the IP address just provided into the address pool, and sends a DHCP NAK message to the client
How to give the destination IP address:
Specify manually:
Manually write the IP address of the target host directly in the address bar
Automatic resolution:
DNS protocol: Domain Name System
The mapping relationship between the specific domain name and IP address is saved on the DNS server; the address resolution task can be completed.
Address resolution:
Forward address resolution:
The process of obtaining its corresponding IP address through a domain name
Reverse address resolution:
The process of resolving its domain name through an IP address
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.