This post was published in 2021-10-06. Obviously, expired content is less useful to users if it has already pasted its expiration date.
Table of Contents
Chrome插件推荐: Copy Cat
Copy Cat - Chrome Web Store - https://chrome.google.com/webstore/detail/copy-cat/andlmjmbnlaamloflnelcafcnkiplhkc
快速复制网站的标题+url到剪贴板
host and non-host
https://en.wikipedia.org/wiki/Host_(network)
Every network host is a node, but not every network node is a host. Network infrastructure hardware, such as modems, Ethernet hubs, and network switches are not directly or actively participating in application-level functions, and do not necessarily have a network address, and are not considered to be network hosts.
what is internet protocol
The Internet Protocol (IP) is the network layer communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking, and essentially establishes the Internet.
Bandwidth definition
https://en.wikipedia.org/wiki/Bandwidth_(computing)
In computing, bandwidth is the maximum rate of data transfer across a given path.
Bandwidth may be characterized as network bandwidth,[1] data bandwidth,[2] or digital bandwidth.[3][4]
(容易和其他bandwidth混淆)
分组交换和电路/线路交换
https://zhuanlan.zhihu.com/p/44316491
此外还有报文交换
例题:🔗http://www-net.cs.umass.edu/kurose_ross/interactive/ps_versus_cs.php
(这道题似乎在某些地方直接默认【总人数】为某个值了...)
例题:🔗 https://blog.csdn.net/weixin_41399111/article/details/82748999
有例题和代码(packet switching概率问题)
目前使用的代码如下:(需要python 3.8或更高)
(本代码对应http://www-net.cs.umass.edu/kurose_ross/interactive/ps_versus_cs.php)
from math import comb
p=0.1
pro=0
for i in range(5,8):
pro+=comb(7,i)*(p**i)*((1-p)**(7-i))
print(pro)
package在网络线路中的传输时间计算
例题(https://stackoverflow.com/questions/27723841/calculating-total-transmission-time-of-a-packet):
"We have 200 bytes of data to send from A to B, with a distance of 200km between them. Calculate the total transmission time, assuming the speed of the signal is 200,000 km/s and that the data rate is 1Mbps and that a header of 40 bytes has to be added to the data before it is sent."
答案:
(换算单位:1秒=10^6 毫秒,1 Mbps=10^6 bits/second)
200+40=240 bytes=240*8=1920 bits
200km/200000km/s=0.001 s=1 ms
1 Mbps=10^6 bits/second, 1920 bits需要1920/(10^6)*(10^3)=1.92 ms完成上传或下载
一共需要发送+传输+接收=1+1.92*2=4.84 ms
ISP,不同类型的ISP
定义:
https://en.wikipedia.org/wiki/Internet_service_provider
不同种类:
https://www.quora.com/What-different-types-of-internet-providers-are-there
关于BGP, IXPS, EBGP, POPS 等概念
边界网关协议 - 维基百科,自由的百科全书 - https://zh.wikipedia.org/zh-cn/%E8%BE%B9%E7%95%8C%E7%BD%91%E5%85%B3%E5%8D%8F%E8%AE%AE
应用实例:Facebook大规模宕机:[Understanding How Facebook Disappeared from the Internet] https://blog.cloudflare.com/october-2021-facebook-outage/
有一系列有关IXPS, ISP, POPs, .... 等概念的wiki总结:IXPS协议引用总结 - SegmentFault 思否 - https://segmentfault.com/a/1190000018404340
【BGP漫谈】 https://zhuanlan.zhihu.com/p/25433049
🔗这个链接下面的一些回答能够进一步补充BGP的重要性:[ 通过软/硬件技术可以做到真正的IP伪造吗? - 知乎] https://www.zhihu.com/question/34570444
(同一个知乎问题,另一个回答)
Traceroute命令
就像这样:
Layered Network/分层网络
优缺点:
不同的model: internet model, osi 7-layer model:
🔗网络模型到底是七层,五层,还是四层? - 知乎 - https://zhuanlan.zhihu.com/p/73807507
一般来说internet model指的是5层模型,见:https://docs.oracle.com/cd/E19683-01/806-4075/ipov-10/index.html
或者: 🔗计算机网络模型(TCP五层模型) - 知乎 - https://zhuanlan.zhihu.com/p/347995226
注意:在下面这张图中,“会话层”的内容可能会造成误解,事实上大家一般都会把DNS这样的协议归为应用层(即使是在osi模型中),见:🔗 [表示层( presentation layer)和会话层(session layer)为什么会被弃用? - 知乎] https://www.zhihu.com/question/58798786
Q: 表示层( presentation layer)和会话层(session layer)为什么会被弃用?
A: 不是弃用,而是这两层从来没有独立实现过,都是和应用层在一起实现。
https://www.zhihu.com/question/58798786
不太熟悉的内容:数据链路层
P2P网络协议的优缺点
(搜索这类内容的时候最好加上site:*.edu或site:*.edu.cn)
🔗Peer to Peer Lending Advantages and Disadvantages [Case Study] - https://scalar.usc.edu/works/peer-to-peer-lending-india/pros-cons
TCP协议
🔗 TCP 协议 · 笔试面试知识整理 - https://hit-alibaba.github.io/interview/basic/network/TCP.html
🔗 这个链接下的一些回答也可以作为tcp协议的讲解,因为SYN 攻击是一种典型的 DoS/DDoS 攻击:[ 通过软/硬件技术可以做到真正的IP伪造吗? - 知乎] https://www.zhihu.com/question/34570444
伪造IP地址/IP欺骗
🔗 [ 通过软/硬件技术可以做到真正的IP伪造吗? - 知乎] https://www.zhihu.com/question/34570444
DOS/DDOS
🔗 [ 通过软/硬件技术可以做到真正的IP伪造吗? - 知乎] https://www.zhihu.com/question/34570444
HTTP response status code
Persistent HTTP/non-persistent HTTP; HTTP持久/非持久连接/keep-alive
🔗 [HTTP持久连接 - 维基百科,自由的百科全书] https://zh.wikipedia.org/zh-hans/HTTP%E6%8C%81%E4%B9%85%E8%BF%9E%E6%8E%A5
上传大体积文件的时候一定要开启keep-alive
IMAP和POP的区别
(鸽了)
P2P supernode
In peer-to-peer networking, a supernode is any node that also serves as one of that network's relayers and proxy servers, handling data flow and connections for other users, 来自https://en.wikipedia.org/wiki/Supernode_(networking)
SMTP发送邮件
DNS相关的内容
见🔗 [2021-09-16 - Truxton's blog] https://truxton2blog.com/2021-09-16/
C语言socket代码:(各种)socket types
🔗 [Sockets in C Tutorials | Go4Expert] https://www.go4expert.com/articles/sockets-c-tutorials-t24491/
/* Types of sockets. */
enum __socket_type
{
SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
byte streams. */
#define SOCK_STREAM SOCK_STREAM
SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
of fixed maximum length. */
#define SOCK_DGRAM SOCK_DGRAM
SOCK_RAW = 3, /* Raw protocol interface. */
#define SOCK_RAW SOCK_RAW
SOCK_RDM = 4, /* Reliably-delivered messages. */
#define SOCK_RDM SOCK_RDM
SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
datagrams of fixed maximum length. */
#define SOCK_SEQPACKET SOCK_SEQPACKET
SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
#define SOCK_DCCP SOCK_DCCP
SOCK_PACKET = 10, /* Linux specific way of getting packets
at the dev level. For writing rarp and
other similar things on the user level. */
#define SOCK_PACKET SOCK_PACKET
/* Flags to be ORed into the type parameter of socket and socketpair and
used for the flags parameter of paccept. */
SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
new descriptor(s). */
#define SOCK_CLOEXEC SOCK_CLOEXEC
SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as
non-blocking. */
#define SOCK_NONBLOCK SOCK_NONBLOCK
};
拥塞控制,流量控制的总结大纲
🔗 [计算机网络常问面试问题 2 —— 拥塞控制(congestion control)和流量控制(flow control)以及相互的区别_JMW1407的博客-CSDN博客] https://blog.csdn.net/JMW1407/article/details/107548201
流量控制的方法总结(具体方法见下面)
stop-and-wait协议
🔗 [动画:停止等待协议Stop-and-Wait - 简书] https://www.jianshu.com/p/01c45289f6b3
Go-back-N协议
🔗 [3.4.3后退N帧协议(GBN)_Reast1nPeace的博客-CSDN博客] https://blog.csdn.net/Reast1nPeace/article/details/108424836
Selective-Repeat协议
有关flow-control, congestion-control以及上面提到的3个协议
🔗 [计算机网络常问面试问题 2 —— 拥塞控制(congestion control)和流量控制(flow control)以及相互的区别_JMW1407的博客-CSDN博客] https://blog.csdn.net/JMW1407/article/details/107548201
区别:
TCP Throughput/TCP吞吐量计算
🔗 [如何计算TCP吞吐量_weixin_34167819的博客-CSDN博客] https://blog.csdn.net/weixin_34167819/article/details/91746685,原文:[How to Calculate TCP throughput for long distance WAN links | Brad Hedlund] https://bradhedlund.com/2008/12/19/how-to-calculate-tcp-throughput-for-long-distance-links/
在计算的时候要注意:
作者使用了:64KB->524288 bits,64*1024*8=524288
更多关于kb和kib的内容:🔗 https://stackoverflow.com/a/34933879
TCP的拥塞控制(congestion control): AIMD, slow start, congestion avoidance
重复链接,但是这篇文章没有将AIMD:🔗 [计算机网络常问面试问题 2 —— 拥塞控制(congestion control)和流量控制(flow control)以及相互的区别_JMW1407的博客-CSDN博客] https://blog.csdn.net/JMW1407/article/details/107548201
AIMD: 🔗 [TCP拥塞控制——慢开始与拥塞避免AIMD_修炼中的kongkong-CSDN博客_aimd] https://blog.csdn.net/kongkongkkk/article/details/74026121
有关RTT
来源于之前出现过的文章:🔗 [计算机网络常问面试问题 2 —— 拥塞控制(congestion control)和流量控制(flow control)以及相互的区别_JMW1407的博客-CSDN博客] https://blog.csdn.net/JMW1407/article/details/107548201
附加:有关TCP协议算法发展历史以及后续(包括quic)的感想文章:🔗 [TCP吞吐量的理论计算公式u010643777的专栏-CSDN博客吞吐量计算公式] https://blog.csdn.net/u010643777/article/details/80036402
websocket协议
和http一样,在osi 7层结构中属于应用层,在tcp/ip 4层模型中也属于应用层。
🔗 [via mailing list: CSGO servers moving from 'UDP' to Websockets protocol (increased reliability and security) : GlobalOffensive] https://www.reddit.com/r/GlobalOffensive/comments/6t39a3/via_mailing_list_csgo_servers_moving_from_udp_to/