Scofield Peng 发布的文章

Measure of file size: KBps

File size i.e. how big the file or how much space a file occupies in the hard disk measured in terms of Kilo Bytes (KB upper case “K” and upper case “B”). In computing terms the upper case “K” stands for 1024. 1024 is computed from 210. (2 power 10). 2 denote the number of characters in the binary system which is used to store data in the disc (ones and zeroes).
Other abbreviations like mega, giga and terra also use the base as 1024,

1KB (Kilo Byte) = 1024 Bytes (approximately 1000 Bytes)
1MB (Mega Byte) = 1024 KB (approximately 1000 Kilo Bytes or 1 million Bytes)
1GB (Gigabyte) = 1024 MB (approximately 1000 Mega Bytes or 1 billion Bytes)
1TB (Terra Byte) = 1024 GB (approximately 1000 Gigabytes or 1 trillion Bytes)

Measure of data transfer speeds: kbps

Data transfer speed over the networks (including the internet) is calculated in terms of bits per second: kilobits (kb small case “k” and small case “b”). The higher the kbps i.e. more the bits transferred per second, more the speed, faster the network/connection. Here k stands for 1000 (103 )

1 kbps (kilo bits per second) = 1000 bits per second
1 Mbps (mega bits per second) = 1000 kilo bits per second.
1 Gbps (giga bits per second) = 1,000 mega bits per second.

ISP bandwidth and download speeds

The most common confusion caused by the similarity of KBps and kbps is when it comes to internet bandwidth and download speeds. People often complain that their ISP promised 512kbps connectivity but they are seldom able to download any file at 512 KBps. They fail to notice the difference in cases of the units and hence think their ISP is cheating them or offering them poor quality service. As mentioned earlier data transfer speeds are always calculated in terms of kilo bits per second (kbps) so an ISP connectivity of 512 kbps promises of transfer of at the max 512 kilo bits per second.

On the other hand, file size measure is always in Kilo Bytes and thus download speeds are always calculated based on how many Bytes per second are downloaded and hence Kilo Bytes per second (KBps). KBps and kbps are not interchangeable.

So an internet connectivity of say 512kbps can never achieve a download speed of 512 KBps. To calculate the maximum download speed of a “X kbps” connection, we need to use a simple formula as below.

Download KBPS speed = (Kbps value*1000) /8)) / 1024.

I.e. For a connectivity of 512 kbps

kbps value 1000 = 512 1000 = 512000

512000 / 8 = 64000

64000 / 1024 = 62.5 KBps

Therefore theoretically an internet connection of 512kbps bandwidth can download at a speed of 62.5 KBps.

If you don’t want to go through all the hassles of the above formula, just multiply the kbps value with 0.1220703125 to get the KBps value.

512 kbps * 0.1220703125 = 62.5 KBps. Simple!

Internet connectivity

Download speed (approx) ( Marked in Italics)

256 kbps

31.3 KBps

384 kbps

46.9 KBps

512 kbps

62.5 KBps

768 kbps

93.8 KBps

1 mbps ~ 1000kbps

122.1 KBps

I have mentioned download speed as approximate because they will vary (always reduce) by 15 – 20% due to network signal loss, computer hardware overheads etc. So for realistic, real world figures always reduce 15 – 20% from the computed KBPS download speeds
Now I guess the confusion of kbps and KBps has cleared away. Just remember when you talk in terms of network it’s always bites per second (bps) and when you talk in terms of storage and files its always Bytes per second (Bps). And next time you won’t complain when your 512 kbps connection does not give you download speeds of 512KBps because now you know why .

from: https://www.quora.com/What-is-the-difference-between-kbps-and-KBPS

Q1: What's meaning of PAN, LAN, MAN, WAN and internet

A1:

Jietu20180517-125144.png

  1. PANs(Personal Area Network) let devices communicate over the range of a person. A little example are wireless mouse, wireless keyboard that based on Bluetooth.
  2. LAN(Local Area Network) is a privately owned network that operates within and nearby a single building like a home, office or factory. When LANs are used by companies, the are called enterprise networks". AP, wireless router, base station are LAN devices.
  3. MAN(Metropolitan Area Network) covers a city.
  4. WAN(Wide Area Network) spans a large geographical area, often a country or continent.
  5. Internetwork(also called internet) is a collection of interconnected networks.

Q2: what's the difference of layer and interface.

A2:

a protocol is an agreement between the communicating parties on how communication is to proceed.

A list of the protocols used by a certain system, one protocol per layer, is called a protocol stack.

Between each pair of adjacent layers is an interface.The interface defines which primitive operations and services the lower layer makes available to the upper one.

Q3: what are design issues for the layers

A3:

  1. Reliability

    1. error detection
    2. finding a working path through a network
  2. the evolution of the network
  3. resource allocation
  4. security

一. 网络中的7层模型是指哪些?他们的作用和职责分别是什么?

7层模型指的是下面7层模型,也叫做OSI七层模型:

  • 应用层
    这一层主要是为应用程序提供服务并规定应用程序中通信相关的细节,例如文件传输,电子邮件,远程登录等都属于应用层的协议。
  • 表示层
    设备固有数据格式和网络标准数据格式的转换。
  • 会话层
    通信管理。负责建立和断开通信连接。管理传输层一下的分层。
  • 传输层
    管理两个节点之间的数据传输。负责可靠传输的作用。只在通信双方节点上进行处理,而无需在路由器上进行处理。
  • 网络层
    将数据传输到目标地址。目标地址可是多个网络通过路由器连接而成的某个地址。因此这一层主要负责寻址和路由选择。
  • 数据链路层
    负责物理层面上互连的,节点之间的通信传输。例如与一个以太网相连的2个节点之间的通信。将0、1序列划分为具有意义的数据帧传送给对端。
  • 物理层
    负责0、1比特流(0、1序列)与电压高低、光的闪灭之间的互换。

2. 四层网络模型指的又是什么?他们的作用和职责指的是什么?分别和7层模型的对应关系是什么?

4层模型指的是:

  • 应用层(application layer)
    该层包括所有和应用程序协同工作,利用基础网络交换应用程序专用的数据的协议。
    每一个应用层(TCP/IP参考模型的最高层)协议一般都会使用到两个传输层协议之一: 面向连接的TCP传输控制协议和无连接的包传输的UDP用户数据报文协议。
  • 传输层(transport layer)
    传输层的协议,能够解决诸如端到端可靠性(“数据是否已经到达目的地?”)和保证数据按照正确的顺序到达这样的问题。
  • 网络互联层(internet layer)
    TCP/IP协议族中的网络互连层(internet layer)在OSI模型中叫做网络层(network layer)。
  • 网络接口层(link layer)
    网络接口层实际上并不是因特网协议组中的一部分,但是它是数据包从一个设备的网络层传输到另外一个设备的网络层的方法

Jietu20180502-185715@2x.jpg

还有维基上的两个图也不错:
Jietu20180503-172455@2x.jpg
Jietu20180503-172502@2x.jpg

3. TCP/UDP分别是指什么?他们的区别是什么?

4. TCP新建连接的3次握手是指什么?为什么会有3次握手?

5. TCP关闭连接的时候的4次握手是指什么?为什么要4次握手?

6. IP地址是什么?什么是IP段,如何区分?

7. IP的A,B,C,D类地址指什么什么?

八. 什么是网桥?2层交换机,4层交换机,7层交换机是什么?分别用途是拿来做什么的?

1. 中继器

在OSI模型中第一层也就是物理层中用来延长网络的设备,可以理解为信号放大器,解决远距离传输造成的信号衰减。

2. 网桥/2层交换机

也叫二层交换机,从数据链路层上延长网络的设备。根据MAC地址进行通信。

3. 路由器/3层交换机

通过网络层转发分组数据的设备。根据IP地址进行通信。

4. 4~7层交换机

处理传输层以上各层网络传输的设备

5. 网关

负责将传输层到应用层的数据进行转换和转发的设备。和4~7层交换机一样都是处理传输层的数据,但是不同的是还负责对数据进行转换。

常用的网关有“互联网邮件和手机邮件之间的转换服务”,以及WWW服务中的"Proxy Server"。

一些idea

1. 关于单播,广播,多播,任播

如果用现在流行的主播来举例:

  1. 单播就是主播想和一个人私聊了,然后说,谁送我火箭最多,我就和谁私聊,于是土豪的你一下买了1000个火箭送给主播,于是主播么么哒和你私聊
  2. 广播就是所有人,只要进了那个APP,就能看到一堆主播在那儿搔首弄姿,免费滴
  3. 多播就是,主播说,宝宝们,来点火箭,我把你们拉到一个单独的群里面看不一样的东西。
  4. 任播就是,主播想和某个粉丝私聊了,然后随便选了一个粉丝私聊

好像很有道理的样子,太佩服我自己了,2333

一些资源

  1. 维基百科对TCPIP协议的说明,蛮不错的

定义

A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. ... Simpler DSLs, particularly ones used by a single application, are sometimes informally called mini-languages