网络布线和进制转换

一:网络布线

1.信号

①.模拟信号和数字信号

模拟信号:模拟信号是信号参数(幅度、频率等)大小连续变化的电磁波

数字信号:数字信号是不连续的物理量,信号参数也不连续变化

                                        数字信号

                                      模拟信号

模拟信号和数字信号的区别:

模拟信号:信号连绵不断,幅度大小不固定。

数字信号:信号是离散的,幅度大小固定不变。

②.信号失真

信号在传输过程中,因为受到外界干扰或传输介质本身的阻抗等特性,会产生一定程度的失真

③.数字信号的优势

抗干扰能力强

远距离传输仍能保证质量

2.线缆

①.双绞线

公共有8根双绞线,两两绞合在一起,常用的有5类,超5类和6类,最常用是5类双绞线。

双绞线连接规范:

T568A:白绿 绿 白绿 蓝 白蓝 橙 白棕 棕

T568B:白橙 橙 白绿 蓝 白蓝 绿 白棕 棕

标准网线(又称直通线、平行线):就是RJ-45两端同时采用T568A或T568B标准的接法。

交叉网线:则一段采用T586A标准制作,而另一端采用T568B标准制作。

全反线:线序一般是一头为T568B,另一头的线序全部反过来,主要连接电脑和交换机,路由器的console口。

不同设备间用直通线:路由-交换,pc-交换

相同的设备用交叉线:pc-pc,路由-路由,交换-交换,pc-路由(pc网口与路由器网口是同类的)

②.光纤

随着光通信技术的飞速发展,现在人们已经可以利用光导纤维(简称光纤)来传输数据。数字信号的表示方法非常简单,振幅取值一般只有两种(0和1)。于是人们用光脉冲的出现表示1,不出现表示0,这样便可以实现光通信。

优点:

①.传输带宽高

②.传输距离远

③.抗干扰能力强

光纤的种类

按照传输模式:多模光纤和单模光纤

单模光纤:

单模光纤的纤芯很细,其直径只有几微米(有些已经达到纳米级)。同时单模光纤的光

源要使用较贵的半导体激光器,而不能使用较便宜的发光二极管,因此单模光纤的光源质量

较高,且在传输过程中损耗较小,在 10Gb/s 的高速率下可传输数十千米甚至上百千米而不

必采用中继器。

多模光纤:

多模光纤的纤芯较粗,其直径一般在 50~100μm,制造成本较低。光源质量较差,且

传输过程中的损耗比较大,因此传输距离较单模光纤近得多,一般在几百米到几千米

二:进制转换

1.计算机的数制

数制:能用的符号个数

计数的方法,指定一组固定的符号和统一的规则表示数值的方法

如:

二进制(Binaries number):逢二进一

八进制(Octal number):逢八进一

十进制(Decimal number):逢十进一

十六进制(Hexadecimal number):逢十六进一

n进制:逢n进一

数位:能用的符号的个数

基数:指在某种进位计数中,数位上能所使用的数字符号的个数

如:

二进制数每一位只能呈现0和1

八进制每一位数只能呈现0到7

十进制每一位数只能呈现0到9

十六进制每一位数只能呈现0到F(此处需要注意:十六进制全部数位:0、1、2、3、4、5、6、7、8、9、A、B、C、D、E、F,表示为0到15)

位权:指在某种仅为计数制中,数位所代表的大小,即处在某一位上的“1”所表示的数制的大小

如:

我们常用的进制为十进制,相对十进制来说,二进制每一位的位权就是2,计算的时候以位权的数位次方就可以表示。

2.进制间的转换

十进制转成二进制、八进制、十六进制
整数部分
①.十进制-->二进制

原理:除以2,反向取余数,直到商为0

②.十进制-->八进制

原理:除以8,反向取余数,直到商为0

③.十进制--->十六进制

原理:除以16,反向取余数,直到商为0

小数部分
①.十进制--->二进制

原理:采用 “乘2取整,顺序输出” 法。

②.十进制--->八进制

原理:采用 “乘8取整,顺序输出” 法。

③.十进制--->十六进制

原理:采用 “乘16取整,顺序输出” 法。

二进制、八进制、十六进制转换为十进制
整数部分

小数部分

八进制--->二进制

原理:八进制数的一位是二进制数的三位

十六进制-->二进制

原理:十六进制数的一位是二进制数的四位

八进制和十六进制之间的转换

这两者之间的转换可以借助十进制或者二进制完成,可以先将八进制转换成十进制或二进制,再转换成十六进制。通过间接转换来实现。

三:IP地址

什么是IP地址:

缩写为IP Adress,是一种在Internet上的给主机统一编址的地址格式,也称为网络协议(IP协议)地址。

作用:

标记了某台设备在网络中的具体位置

IP报文在网络中的寻址

1.IPv4地址

1.1IP v4地址的表示

ipv4由32位二进制组成,一般用点分十进制表示,分成四组,一组八位。

范围:0.0.0.0~255.255.255.255

例如:

11000000.10101000.00000000.00000000

为了便于配置通常表示成点分十进制形式:192.168.0.0

1.2IP v4地址的分类
1.2.1公有网络地址

以下简称公网地址)是指在互联网上全球唯一的IP地址

IP地址分为A、B、C、D、E五类

A类地址范围:1.0.0.1~126.255.255.254(0~127)

A类地址=网络部分+主机部分+主机部分+主机部分

B类地址范围:128.0.0.1~191.255.255.254(128~191)

B类地址=网络部分+网络部分+主机部分+主机部分

C类地址范围:192.0.0.1~223.255.255.254‘(192~223)

C类地址=网络部分+网络部分+网络部分+主机部分

D类地址范围:224.0.0.1~239.255.255.254(224~239)

用于组播通信的地址

组播:一对列、单播:一对一、广播:一对多

E类地址范围:240.0.0.1~255.255.255.254(240~255)

用于科学研究的保留地址

1.2.2私有网络地址

(以下简称私网地址)是指内部网络或主机的IP地址,IANA(互联网数字分配机构)规定将下列的IP地址保留用作私网地址,不在Internet上被分配,可在一个单位或公司内部使用。

私网地址:

A类私有地址:10.0.0.0 ~ 10.255.255.255

B类私有地址:172.16.0.0 ~ 172.31.255.255

C类私有地址:192.168.0.0 ~ 192.168.255.255

1.2.3特殊地址

0.0.0.0                         代表任意一个地址

255.255.255.255         代表广播地址

127.0.0.0 ~ 127.255.255.255   代表回环地址  本机(代表自己)

                                作用:检测自己的网络设备硬件是否故障

                                Ping 127.0.0.1 to check whether your network equipment is faulty

169.254.0.0 Wrong address (Microsoft intranet address)

                                to automatically obtain (dhcp) failed, and there is no address. Microsoft configures an address starting with 169 by default.

2. IPv6 address

IPv6 consists of 128 bits, generally separated by colons and expressed in hexadecimal.

Four: Subnet mask

effect

​ The subnet mask cannot exist alone. It must be used in conjunction with the IP address. We all know that the IP address is the unique identifier of the computer within the network, and the subnet mask is used to divide subnets. An IP address can be divided into two parts: the network address and the host address.

Five: Subnetting

1. Two-level IP address

The main structure is as follows:

The secondary IP address is divided into IP address segments by adding the network number and the host. The IPs available to us are three types of addresses: A, B, and C. However, this division of IPs has many disadvantages.

Disadvantages of two-level IP addresses:

①.IP address space utilization is sometimes very low

②.Not flexible enough

③. May cause network storm

2. Third-level IP address

advantage:

①. It saves IP address resources and has higher IP utilization rate.

②.More flexible than secondary IP address

③.The network is more secure

shortcoming:

①. Each additional subnet requires fewer available IP addresses. (Network address and broadcast address, but have relatively little impact)

②. Each subnet cannot communicate and requires the help of a router.

structure:

Turning a two-level IP address into a three-level IP address is called subnetting.

①. Regardless of whether it is an ABC-type address, dividing a subnet is to borrow a few more bits from the local address as the subnet number, and the remaining part is called the host number.

②. So now we are saying: If we are both Class A networks, but our subnet numbers are different, we do not belong to the same subnet segment. Cannot access each other.

③. However, after being divided into three subnets, it is still one network to the outside world. When IP packets are transmitted from the outside, the router of this network is first found based on the network number, and then the specific subnet is found through the subnet number, and then the subnet is separated. Find the destination host based on the host number.

3. How to divide subnets

Dividing subnets means borrowing several bits in the host address as the subnet number, so you need to know the number of bits in the subnet mask!

4. How to determine whether two addresses are on the same network segment

Convert A's address into binary, and sum (multiply) it with your own subnet mask to get A's network segment.

Convert B's address into binary, and sum (multiply) it with its own subnet mask to get B's network segment.

Then compare whether the network segments of AB are consistent. If they are consistent, they are on the same network segment. If they are inconsistent, they are not.

①.Difference: 192.168.1.1/24 and 192.168.1.33/27

A only knows its own subnet mask, and B only knows its own subnet mask.

When A wants to access B, he will first add his own subnet mask to his own address to get his own network segment, and then add his own subnet mask to B's ip address. If the network segment The paragraphs are the same and can be sent to B.

B uses its own subnet mask and its own IP address to calculate the network segment, and then compares B's subnet mask with A's IP address. If the network segment is the same, it can be sent to A. If it is different, it will not work. .

Here A can recognize B, but B cannot accurately recognize A, so communication is not possible!

②.China Telecom 10.0.0.0/8, allocating respective subnets to 32 provinces

1. Subnet mask of new subnet 13

         32 provinces===> 2^5

         8+5=13

2. Number of hosts per subnet 2^19

     32-bit-13= 19

3. Network ID of the first subnet and last subnet

  10.0.0.0.0

  10.248.0.0

Solution: The last set of subnet masks 1111 1111 . 11111 000 . 0000 0000 . 0000 0000

     2^7+2^6+2^5+2^4+2^3=248

Guess you like

Origin blog.csdn.net/qq_57093716/article/details/134827757