IP,MAC

MAC address and IP addressing

The two are distinguished on the protocol, the MAC address is the physical address of the card, to provide a switcher forwards the data, the switch will form a MAC address in its own internal table, then forwards the packet according to the table; Furthermore, if the larger the network size, then the number of machines and more, the switch will have the MAC address table MAC forwarding table to create data tables, this table is collected by the broadcast packet, it is easy to form a broadcast storm, affecting network performance.

Using the ip address for routing data packets between WAN, the following points:

ip is the network layer L3 protocol, its limited isolation broadcast packets, so that a large wide area network LAN is divided into many small, this increases the stability of the network, using the same forwarding address ip do also formed on a router routing table with the previously mentioned MAC table is similar, but stable than the MAC address table!

In principle, because the actual MAC address only valid within the local area network, although different MAC devices required to be unique, but because each network segment through a routing packets in the MAC source and destination have to do to change (source and destination it has been the same IP), even if it is in fact different segments, the presence of the same MAC address, is not affected. As long as the same MAC address segment can not be repeated.

The issue of personal understanding is this: If the network world each computer has a unique house numbers, when sending and receiving data, we just write the source and destination house number house number on the line. If the network is relatively small scale of this program not a problem, when the network is gradually increased so much house number, the middle of the network equipment can not write down all the house number where the. We need another way to more regional planning network, so there the IP address and subnet mask (there is no class problems like we will not discuss). But before addressing the house number is still valid in a small network inside! So to be preserved, but the house number into a local effective.

With the development of the Internet at that time, assign an IP address is not in accordance with regional planning, resulting in many of the world number backbone network IP routing table now.

Simple IP network world is divided into a lot of small blocks, A blocks, B block, C block, D block ...... .. When you're looking at a person through his IP address to find the piece belongs to him, when you reach the block where he, with his street number (MAC address) to find him.

Simply put, for example, after your online shopping by courier, courier recipient, will be in their own individual transit transfer station, but then to your home city transit stations, transit stations can no longer pass, but looking for your home house number. Mac is your family's house number, IP transit point is their number.

MAC address is the hardware layer things, a piece of card unique identifier, the concept of the physical level, in data communication, local area network since multiple master multi considered from the physical structure, the addressing is required, but tcp / ip protocol stack appreciated as I is a logical concept, no routing on the LAN, of course, the addressing mechanism used on the hardware, ip only for cross-domain data packets can be a local area network and are interconnected designed

IP addresses for network interconnection, MAC address interconnection implement machine

So why not also achieve ip machines interconnected, so the LAN also work in three?

  • Remove ip addresses, routers (switches) need to learn each mac address, the memory is very large. And after subnetting ip address, ip address can be used to represent a gateway of a subnet routing step by step.

MAC address can be identified by Layer, and the user is in the seventh layer, therefore, it must be communication between the users through their user IP

Why not use the LAN IP address and MAC address addressing

This view is incorrect.

LAN network layer is also a need ip layer addressing, such as the destination address and determines whether or not the machine the same network segment, and then decide to send the packet to a router or directly to the destination host. Of course, the mac address in the data link layer, which is the base layer to achieve ip. Ip in the data link layer and layer convergence protocol arp. It should be said at the network layer address ip, mac data link layer addressing.

192.168.0.0 to 192.168.0.255 for the network, the (32-bit binary address of 1100 is 0000.1010 1000.0000 0000.0000 0000)

  1. Available host range 192.168.0.1-192.168.0.254
  2. Network address 192.168.0.0 (Network IP)
  3. Broadcast address 192.168.0.255 (Broadcast IP) (Class C network addresses occupied 24, the last 8 bits of host address. Host address bits all set to 1, that is a broadcast address)
  4. Wangduannei host data can be transferred to the card by
  5. 192.168.0.1和192.168.0.2的主机无需使用Router传递数据包(两主机为同一网段,所以不需要路由器通信)
  6. 192在192.x.x.x-223.x.x.x这个范围内所以属于C类地址
请问 192.168.0.0/16 代表的是什么?

IP 是由四组8 bits 的数字所组成的;由于原本是二进制的方式来计算的,为了适应人类的思考方式,所以经过十进制的表示之后,自然就是由0 ~ 255 啰

ipv4 是 32 位的, 192.168.0.0 转化为 32 位的二进制地址即是: 11000000 10101000 00000000 00000000 ,/16 代表其 32 位的前 16 位是固定的,只能改变( 32-16=) 16 位地址,则 ip 范围是:

11000000 10101000 00000000 00000000 - 11000000 10101000 11111111 11111111

转化过来就是:

192.168.0.0 - 192.168.255.255

对应的网关是: 255.255.0.0

在主机上我看到这个会认为访问这个范围内的地址都不会发送到默认路由器

在路由器上看到这个我会认为是一个网络条目

/16 是掩码位;前16 也代表子网掩码 255.255.0.0

192.168.0.0/24 表示前24位固定,只能改变8位地址,则ip范围为192.168.0.0 - 192.168.0.255

172.16.0.0 的二进制 10101100.00010000.0000000.00000000

Guess you like

Origin www.cnblogs.com/rencoo/p/11898421.html