当前位置:网站首页>Summary of common interview questions on computer network, including answers
Summary of common interview questions on computer network, including answers
2022-07-26 21:24:00 【Xiao Liang said code】
Write it at the front
These problems are in the process of preparing for the operating system , Detailed summary of common interview questions and answers . Search one by one and record , It took a lot of energy ! If you want to get the source file , Can follow my WeChat public number : Xiao Liang said code , Get hey hey . Thank you for attention .
TCP and UDP The difference between
1、udp It's disconnected ,tcp It's connection-oriented
2、udp It's an unreliable transmission ,tcp It's a reliable transmission
3、udp It is message oriented ,tcp It is oriented to byte stream transmission
OSI Seven layer model
application layer
Interfaces between various applications and networks , Google, for example , firefox . These applications do not reside in the application layer , But they use various network protocols at the application layer
The presentation layer
The presentation layer receives data from the application layer . These data are in the form of characters and numbers , The presentation layer converts this data into a binary format that can be understood by the machine , Functions include translation 、 Compress 、 Encryption and decryption
The session layer
Provides the presentation layer of two entities with a way to establish and use connections . The connection of presentation layer between different entities is called session . Therefore, the task of the session layer is to organize and coordinate the communication between two session processes , And manage data exchange
Transport layer
Complete the communication between ports , The transport layer involves segmentation 、 flow control 、 Error control 、 Connection oriented and connectionless transmission (TCP and UDP)
The network layer
Complete host to host communication , It is divided into data plane and control plane , Complete forwarding and routing functions
The link layer
Complete the communication between adjacent nodes , From the network layer IP Datagram assembly into frame , Provide services for network layer
The physical layer
Transmit bits on media
IPV4 and IPV6 The difference between
IPv6 Address from 32 position (4B) Expand to 128 position (16B), Larger address space .
IPv6 take IPv4 The validation and field are completely deleted , To reduce the processing time per hop .
IPv6 Supports plug and play ( Automatic configuration ), Unwanted DHCP agreement .
IPv6 The length of the head must be 8B Integer multiple ,IPv4 The first is 4B Integer multiple .
IPv6 take IPv4 The optional fields of are moved out of the header , Became the first expansion , Become a flexible header format , Routers usually do not check the extension header , It greatly improves the processing efficiency of the router .
IPv6 The total length field is cancelled , Use the payload length field instead .
IPv6 Only on the host ,IPv4 You can dispose of chips in routers and hosts .
IPv6 The protocol field... Was cancelled , Change to the next header field .
HTTP get and post The difference between
| get | post | |
|---|---|---|
| Parameter placement position | url Inside | In the head of the request |
| Security | Bad | good |
| Length limit | 2048 character | unlimited |
| Cached by browser | With cache | No buffer |
| Browser access | Sure , Support refresh and rollback | Can not be |
HTTP and HTTPS The difference between
origin :https It's solved http Transmission security of , because http It's plain text , Simply speaking https=http+ssl Encrypted transmission ,https Network protocol for identity authentication
https Two functions :1. Establishing information security channels 2. Authenticity of website
| http | https | |
|---|---|---|
| certificate | Unwanted | need ca certificate , It costs money |
| Information transmission mode | Plaintext | Ciphertext |
| How to connect | 80 port | 443 port |
Why? TCP Three handshakes , Not twice
In fact, this is caused by TCP Its own characteristics are determined by reliable transmission . The client and server should transmit reliably , Then we need to confirm The two sides Of Receiving and sending capabilities , Otherwise, it is easy to lose packets
- The first handshake : You can confirm the sending ability of the customer service terminal
- The second handshake : You can confirm the receiving capacity of the server and Sending capability
- The third handshake : You can confirm the receiving capacity of the client .
If the client sends a connection request , However, due to the loss of the connection request message, no acknowledgement was received , So the client retransmits the connection request . Confirmation was later received , It establishes the connection . After data transmission , It releases the connection , The client sends two connection request message segments , The first one is missing , The second one arrived at the server , But the first lost segment is only detained in some network nodes for a long time , Delay to a certain time after the connection is released before reaching the server , At this time, the server mistakenly thinks that the client sends a new connection request , Then send the confirmation message segment to the client , Agree to establish a connection , No three handshakes , As long as the server sends a confirmation , To establish a new connection , At this time, the client ignores the confirmation sent by the server , And don't send data , Then the server waits for the client to send data , Waste resources .
Why? TCP Four waves , Not three times
This is because the first wave means that the client sent a fin My bag , Indicates that the client has sent data , But at this time, the server may not have finished sending data , First send it to the client ask My bag , Wait for your data to be sent before sending one to the client fin My bag , Indicates that your data has also been sent . In this way, it must be sent twice ask and fin.
The difference between distance vector and link state
Distance vector algorithm It is to calculate the best outbound route to the destination address through the information between yourself and adjacent nodes , Then forward a kind of Algorithm
The characteristic of distance vector algorithm is :
- The distribution of the Each node receives routing information from its immediate neighbors , And perform route calculation , Send the calculation results back to the directly adjacent nodes
- Iterative The calculation process circulates , Until the adjacent nodes have no exchangeable routing information
- Asynchronous All nodes are not required to lock step operation
Link state algorithm in , Each node has a complete network topology , That is, complete link information ( Distance vector method only knows the distance between adjacent routes ), Nodes broadcast information about themselves and their neighbors to adjacent networks , Whenever I also receive this message , Just use dijkstra Algorithm to recalculate the routing table
Expand :
Internal gateway protocol :
rip It is realized by distance vector , most 15 jump .iBGP Is the enhanced distance vector ,OSPF Running on the AS In each internal area is the link state algorithm ,IS-IS and OSPF similar , It is also a link state algorithm , It can run between Networks
External gateway protocol :
eBGP The algorithm is distance vector algorithm
When did you use grouping / Assembly technology ?
Datagrams are transferred from one host to another , Message bytes are too long , More than the MTU, We need to group , Then assemble at the destination host
边栏推荐
- Line detection based on Hough transform (matlab)
- [MySQL series] - how much do you know about the index
- Is it safe for Huishang futures to open an account? What should Huishang futures pay attention to when opening an account?
- Serial port communication failure
- PointPillars: Fast Encoders for Object Detection from Point Clouds 阅读笔记
- idea中设置核心配置文件的模板
- 有关无线通信的相关内容
- LiveDatade的基本使用
- Why does it system need observability?
- ROS2节点通信实现零拷贝
猜你喜欢

Apaas low code platform (I) | leave complexity to yourself and simplicity to users

Interceptors

一些意想不到的bug记录

ECCV 2022 | 同时完成四项跟踪任务!Unicorn: 迈向目标跟踪的大统一

牛客刷题——Mysql系列

LeetCode 练习——剑指 Offer II 005. 单词长度的最大乘积

【MySQL系列】-索引知多少
![[JVM series] JVM tuning](/img/6b/f7c402b2ff5fc4f11f9656a7a59873.png)
[JVM series] JVM tuning
![[virtual machine data recovery] data recovery of XenServer virtual machine unavailable due to unexpected power failure](/img/c4/88f8927df02513eea4caffc4215850.png)
[virtual machine data recovery] data recovery of XenServer virtual machine unavailable due to unexpected power failure

Redis interview questions
随机推荐
Is it safe for Huishang futures to open an account? What should Huishang futures pay attention to when opening an account?
[HCIA security] user authentication
Line detection based on Hough transform (matlab)
JDBC的引入
Redis hash和string的区别
串口通信失败
flask 源码梗概
SSM integration example
游览器——游览器游览器缓存
详解西部数据SMR叠瓦式硬盘的190二级编译器(译码表)模块
修改excel默认编码
Go+mysql+redis+vue3 simple chat room, the sixth bullet: use vue3 and element plus to call the interface
LiveDatade的基本使用
Mysql -count :count(1)、count(*)、count(列名)的区别
There are six ways to help you deal with the simpledateformat class, which is not a thread safety problem
SprinBoot面试题
除了「加机器」,其实你的微服务还能这样优化
2022开放原子全球开源峰会议程速递 | 7 月 27 日分论坛议程一览
[hero planet July training leetcode problem solving daily] 26th and check the collection
MySQL -count: the difference between count (1), count (*), and count (column name)