Understand signal and optical fiber, number system conversion, IP division

1. Signal and fiber

1.1 Signal

Signal : information, signal, data

The signal is divided into digital signal and analog signal.

Signal distortion causes during transmission : noise, attenuation (weak signal)

Advantages of digital signal : strong anti-interference ability, long transmission distance and quality assurance

Repeater : filter noise and amplify signal power

1.2 Optical fiber

Optical fiber features : high transmission bandwidth, long transmission distance, strong anti-interference ability

The transmission of light pulses in optical fibers uses the principle of total reflection of light
Insert picture description here

Fiber classification: single-mode fiber , multi-mode fiber
Insert picture description here

1.2.1 Features of optical fiber

Insert picture description here

1.2.2 Twisted pair connection specification:

Generally useful are 1, 2, 3, 6 (receive, send)

Insert picture description here

1.3 Wireless transmission

Wireless transmission medium: radio wave, microwave, infrared, laser, etc.

Radio waves: electromagnetic waves in the radio frequency band that propagate in free space (air and vacuum)

Propagation characteristics: the lower the frequency, the smaller the propagation loss and the longer the coverage distance

​ The higher the frequency, the larger the system capacity and the longer the coverage distance

Radio waves are classified according to their propagation characteristics: ground wave propagation, sky wave propagation, straight line propagation

2. Number system conversion

2.1 Unit conversion

We generally say that the unit of 100M and Gigabit network is bps (bit rate, that is, bit/s, bit/s). For example, we say that the transmission speed of network cards or optical fibers is 100M, which means 100Mbps. In practical applications (download tools such as Xunlei), the transmission unit used is byte/s (Byte/s).

8bit=1byte

1024byte=1KB

1024KB=1MB

1024MB=1GB

1024GB=1TB

1024TB=1PB

1024PB=1EB

1024EB=1ZB

1024ZB=1YB

2.2 Number system conversion

2.2.1 Computer System

Decimal number

(1010) 10,1010D,1010

Octal number

(1010)8,1010O

Binary number

(1010)2,1010B

Hexadecimal number

(1010)16,1010H,0X1010

In the number system, there is another rule, that is, the N base must be one in every N.

The characteristic of decimal numbers is that every decimal is one. E.g:

Cato

2.2.2 Number system conversion

Convert decimal to binary:

Method 1: Invert the remainder

method one Inverted remainder
125/2 Can not be eliminated 1
62/2 Divide 0
31/2 Can not be eliminated 1
15/2 Can not be eliminated 1
7/2 Can not be eliminated 1
3/2 Can not be eliminated 1
1/2 Can not be eliminated 1
0
125=1111101B

Method 2: Subtract full 1

Insert picture description here

Binary number to octal number : 3 digits to one conversion

Binary number conversion to hexadecimal number : 4-bit one conversion

Insert picture description here

8-bit binary number

Insert picture description here

10101000 168
10101100 172

Three, IP division

3.1 IP address

3.1.1 Know IP

IPv4 consists of 32-bit binary numbers, generally expressed in dotted decimal notation

IPv6 is composed of 128 bits, which are generally represented by colons in hexadecimal notation

The IPv4 address consists of two parts: the network part (NETWORK) and the host part (HOST)

For example: 192.168.0.25

Network part: 192.168.0

Host part: 25

3.1.2 IPv4 private network address and public network address

A public network address refers to a globally unique IP address on the Internet. November 26, 2019 is a memorable day in the era of the human Internet. Nearly 4.3 billion IPv4 addresses worldwide have been officially exhausted.

IP addresses are divided into five categories: A, B, C, D, and E:

Class A address range: (0xxxxxxx), 1.0.0.1~126.255.255.254

Class A address = network part + host part + host part + host part

(Classified boundary) The default subnet mask is /8, which is 255.0.0.0


Class B address range: (10xxxxxx), 128.0.0.1~191.255.255.254

Class B address = network part + network part + host part + host part

(Classified boundary) The default subnet mask is /16, which is 255.255.0.0


Class C address range: (110xxxxx), 192.0.0.1~223.255.255.254

Class C address = network part + network part + network part + host part

(Classified boundary) The default subnet mask is /24, which is 255.255.255.0


Class D address range: (1110xxxx), 224.0.0.1~239.255.255.254

Address used for multicast communication


Class E address range: (11110xxx), 240.0.0.1~255.255.255.254

Reserved address for scientific research


To 127 at the beginning of the IP addresses on behalf of the machine (except the broadcast address 127.255.255.255), 127.0.0.1 is the native loopback address

169.254.0.0~169.254.255.255 The address assigned when the DHCP service fails

DHCP service is to automatically obtain IP service


Private network

Private network addresses refer to the IP addresses of internal networks or hosts. IANA (Internet Assigned Numbers Agency) stipulates that the following IP addresses are reserved for private network addresses, and are not allocated on the Internet, but can be used within an organization or company. The private address specified in RFC1918 is as follows:

Class A private address: 10.0.0.0~10.255.255.255 /8

Class B private address: 172.16.0.0~172.31.255.255 /12

Class C private address: 192.168.0.0~192.168.255.255 /16

3.2 32 binary bit subnet mask

3.2.1 "And"

The network part of the IP address corresponding to the subnet mask is represented by 1

​ The host part of the corresponding IP address is represented by 0

Such as: 255.240.0.0/12

​ Converted to binary 11111111.11110000.00000000.00000000

​ Subnet mask 11111111.11110000.00000000.00000000

IP address and subnet mask are used for "and" operation to get the network address

0 and any number are equal to 0

1 and any number are equal to any number itself

Example:

192.168.1.189/26

11000000.10101000.00000001.10111101 IP address

111111111.111111111.111111111.11000000 Subnet mask

Get:

11000000.10101000.00000001.10000000 network address

which is:

192.168.1.128

Set all the host bits to 1 to get the broadcast address

The broadcast address changes the last 0 bits of the subnet mask in the obtained network address to 1

11000000.10101000.00000001.10111111 Broadcast address

192.168.1.191

3.3 Subnetting

Example: 10.0.0.0/8

Network segment composition: network address, available IP, broadcast address

Example: 192.168.1.189/24

Network number: 192.168.1.0

Available IP: 192.168.1.1~192.168.1.254

Broadcast address: 192.168.1.255

Insert picture description here

to sum up:

Number of subnets=2^n, where n is the number of bits in the subnet, for example: /26, n=26-24=2

Number of hosts (available IP)=2^N-2, where N is the number of bits in the host part: N=32-26

192.168.1.189/26

11000000.10101000.00000001. 10 111101 IP address

​ (The number of digits in the subnet is in bold positions 26-24)

192.168.1.0 /24 /25 /26 /27 /28 /29 /30 /31 /32
Subnet mask 0 128 192 224 240 248 252 254 255
Number of subnets 1 2 4 8 16 32 64 128 256
Number of IP 256 128 64 32 16 8 4 2 1
Available IP 254 126 62 30 14 6 2 1 1
192.168.1.100/32   表示为一个固定IP

Guess you like

Origin blog.csdn.net/IvyXYW/article/details/109183805