Performance and the basic concepts of computer networks (subnet mask, IP, MAC address)

Performance

 

 

 

Secondary IP address

 

 

 Network number is the number on each LAN, and the host number is assigned by the unit where the LAN itself, with a host or router on the LAN, IP addresses in the network number must be the same, and a different port router number on the network is not the same, i.e., each interface has a number of different network IP addresses

 

 

 

Three IP addresses

  Subnetting: Since 1985, IP addresses have added a subnet number field, the IP address of the two becomes three-level IP address, this practice is called subnetting

  The basic idea

  

  

Subnet Mask (subnetting)

 

 

   Note: subnetting just borrow some of each host number, network number does not change

  

 

 

  When the adjacent routers and routing exchange routing information, you must need the network (subnet) of the network mask tell where their neighboring routers

 

   Subnet Mask role:

  1, it is determined whether the two ip address belong to the same sub-network: the two IP address and subnet mask for each operation, the same result would belong to the same network

  2, the network address is calculated: the whole number is the host address is 0, the subnet mask, and IP addresses for the operation to give

 

  The default subnet mask (full network No. 1, the host number are all 0)

  Class A: 255.0.0.0

  Class B: 255.255.0.0

  Class C: 255.255.255.0

  Complete the subnet mask is the network number and subnet number, the location of all 1, the rest of the host number are all 0

 

  Subnet Mask related calculations:

  IP-192.168.10.0 embodiment, Class C IP URLs, binary network number length is 24, the length of the host number is 8, the default subnet mask of 255.255.255.0

  1, the number of known sub-divided N, subnet mask request

  Assume that the IP subnet is divided into four, i.e., N = 4,4 binary number is 100, a length of 3, the number three position of a host, coupled to the default subnet mask portion, i.e. 255.255.255.224

  

 

   2, the number of known host per subnet, subnet mask request (and the above process is slightly different than)

  假设N是主机号的二进制长度(这里的IP是C类,所以N=8),主机数目为25=11001,长度为5,将主机地址前(N-5)位全部置1,加上默认掩码部分,255.255.255.224

 

 

  

 

 

划分子网下的路由转发分组算法

  1、先判断目的IP地址和当前网络地址是否属于同一网络(将子网掩码和目的IP与操作,若结果和当前网络地址一致,则属于同一网络),

  若一致,直接分组交付

  否则分组交付给指明的下一条路由

  

 

 

 

 

MAC地址(物理地址)

  MAC地址的长度为48位(6个字节,用12个16进制数表示),网络中每台设备都有一个唯一的网络标识,这个地址叫MAC地址或网卡地址,由网络设备制造商生产时写在硬件内部

  区分IP地址和MAC地址:

  在OSI模型中,第三层网络层负责IP地址,第二层数据链路层则负责MAC位址,通俗来讲,IP地址告诉你要去哪(由当前网络要去那个网络),而MAC地址则告诉你怎么去(由那个路由器往那           个路由器走)

  

IP数据报和MAC帧

TCP/IP协议定义了一个在因特网上传输的包,称为IP数据报,由首部和数据两部分组成。首部的前一部分是固定长度,共20字节,是所有IP数据报必须具有的,包含源地址和目的地址。后面的是传输的数据

MAC帧IP数据报的基础上,增加了帧头和帧尾,中间是IP数据报。其中,帧头和帧尾包含一些必要的控制信息,比如同步信息、地址信息、差错控制信息等。

 

Guess you like

Origin www.cnblogs.com/-citywall123/p/12427434.html