Home>Article> What are the necessary knowledge about computer networks?

What are the necessary knowledge about computer networks?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼 Original
2019-07-20 14:20:35 20868browse

What are the necessary knowledge about computer networks?

##Summary of basic knowledge of computer network

1. Protocols at each layer

Layered OSI layered (7 layers): physical layer, data link layer, network layer, transport layer, session layer, presentation layer, application layer. TCP/IP layering (4 layers): network interface layer, Internet layer, transport layer, and application layer. Five-layer protocol (5 layers): physical layer, data link layer, network layer, transport layer, and application layer.

Each layer protocol is as follows: Physical layer: RJ45, CLOCK, IEEE802.3 (repeater, hub, gateway) Data link: PPP, FR, HDLC, VLAN, MAC (bridge, switch, virtual machine Bridge) Network layer: IP, ICMP, ARP, RARP, OSPF, IPX, RIP, IGRP, (router route, NAT mode in virtual machine) Transport layer: TCP, UDP, SPX Session layer: NFS, SQL, NETBIOS, RPC presentation layer: JPEG, MPEG, ASII application layer: FTP, DNS, Telnet, SMTP, HTTP, WWW, NFS

Each layer protocol function Physical layer: transmit bits through the media, determine mechanical and electrical specifications (Bit) Data link layer: Assembles bits into frames and point-to-point transmission (Frame) Network layer: Responsible for the transmission of data packets from source to destination and Internet interconnection (Packet) Transport layer: Provides end-to-end Reliable message delivery and error recovery at the end (Segment) Session layer: establish, manage and terminate sessions (Session Protocol Data Unit SPDU) Presentation layer: translate, encrypt and compress data (Presentation Protocol Data Unit PPDU) Application layer: allow Means of accessing the OSI environment (Application Protocol Data Unit APDU)

Commonly used network ports UDP: DNS(53) TFTP(69) SNMP(161)TCP: SMTP(25) TELNET(23) HTTP(80) FTP (20 21)

2. Principle of ARP-Address Resolution Protocol (network layer , conversion of IP address to hardware address)

1. First , each host will establish an ARP list in its own ARP buffer to represent the correspondence between the IP address and the MAC address

2. When the source host wants to send data, it first checks the ARP list Is there a MAC address of the destination host corresponding to the IP address? If so, the data is sent directly. If not, an ARP packet is sent to all hosts in this network segment. The contents of the packet include: source host IP address, source Host MAC address, destination host IP address

3. When all hosts in this network receive the ARP packet, they first check whether the IP address in the packet is their own IP address. If not, then Ignore the packet, if so, first take the IP and MAC address of the source host from the packet and write it into the ARP list. If it already exists, overwrite it, and then write your own MAC address into the ARP response packet, telling The source host itself is the MAC address it is looking for. 2.1. RARP Reverse Address Resolution Protocol RARP is a reverse address resolution protocol. Its function is to complete the mapping of hardware addresses to IP addresses. It is mainly used for diskless workstations because it is configured for diskless workstations. The IP address cannot be saved. Work flow: Configure a RARP server in the network, which stores the mapping relationship between IP addresses and MAC addresses. When the diskless workstation is started, it encapsulates a RARP packet containing its MAC address, and then broadcasts it to the network. When the server receives the request packet, it searches for the corresponding IP address of the MAC address and loads it into the response message and sends it back to the requester. Because a broadcast request message is required, RARP can only be used on networks with broadcast capabilities.

Related recommendations: "

FAQ"

3. The entire process of executing www.baidu.com after entering it in the browser

1. The client browser resolves to the IP address of www.baidu.com through DNS, which is A. Through this IP address A, find the path from the client to the server. The client browser initiates an http session to A, and then inputs the packet to the network layer through TCP.

2. At the client's transport layer, divide the HTTP session request into message segments, and add the source and destination ports. For example, the server uses port 80 to listen to the client's request, and the client randomly selects a port such as 5000 by the system. Exchange with the server, and the server returns the corresponding request to the client's 5000 port. Then use the IP address of the IP layer to find the destination.

3. The network layer of the client does not need to care about the application layer or transport layer. The main thing it does is to determine how to reach the server by looking up the routing table. During this period, it may pass through multiple routers, which are all done by the router. Work, by looking up the routing table to determine which path to reach the server, which uses the routing protocol

4. The link layer of the client, the packet is sent to the router through the link layer, and the given IP address is found through the neighbor protocol MAC address, and then send an ARP request to find the destination address. If you get a response, you can use the ARP request reply. The exchanged IP packet can now be transmitted, and then send the IP packet to the server's address

4. The process of DNS domain name resolution system

1. Enter the www.qq.com domain name in the browser. The operating system will first check whether its local hosts file has this URL mapping relationship. If so, call this IP address mapping first to complete domain name resolution.

2. If there is no mapping of this domain name in hosts, search the local DNS resolver cache to see if there is a mapping relationship for this URL. If so, return directly to complete the domain name resolution.

3. If there is no corresponding URL mapping relationship between hosts and the local DNS resolver cache, it will first find the preferred DNS server set in the TCP/ip parameters. Here we call it the local DNS server. This server receives When querying, if the domain name to be queried is included in the local configuration area resource, the resolution result will be returned to the client to complete the domain name resolution. This resolution is authoritative.

4. If the domain name to be queried is not resolved by the local DNS server zone, but the server has cached the URL mapping relationship, this IP address mapping will be called to complete the domain name resolution. This resolution is not authoritative.

5. If the local zone file and cache resolution of the local DNS server are invalid, the query will be carried out according to the settings of the local DNS server (whether a forwarder is set). If the forwarding mode is not used, the local DNS will send the request to 13 root DNS servers. After receiving the request, the root DNS server will determine who authorizes the management of this domain name (.com), and will return an IP responsible for the top-level domain name server. After the local DNS server receives the IP information, it will contact the server responsible for the .com domain. After the server responsible for the .com domain receives the request, if it cannot resolve it, it will find a lower-level DNS server address (qq.com) that manages the .com domain and give it to the local DNS server. When the local DNS server receives this address, it will find the qq.com domain server, repeat the above actions, and query until the www.qq.com host is found.

6. If forwarding mode is used, this DNS server will forward the request to the upper-level DNS server, which will resolve it. If the upper-level server cannot resolve it, it will either find the root DNS or Forward the request to the superior, and the cycle continues. Regardless of whether the local DNS server uses forwarding or root prompts, the result is finally returned to the local DNS server, and the DNS server returns it to the client.

The above is the detailed content of What are the necessary knowledge about computer networks?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:5g three characteristics Next article:5g three characteristics