Classification ip address and subnet mask

Classification ip address and subnet mask

1.ip address classification
class A IP network address range 1.0.0.1 -127.255.255.254; after the first eight three eight network address is a host address.
Class B IP address range for the network: 128.1.0.1-191.255.255.254; second octet is the network address, the remaining three host address.
Class C IP address range for the network: 192.0.1.1-223.255.255.254; third octet is the network address, the remaining three are
simply: ABC paragraph is based on the first second, respectively third octet as the network address of the other three as the host address. Just remember and 127 / 192-254

2. Subnet Mask:
IP address is the network number and host number to mark the hosts on the network, we put the net the same number of network hosts called the local network , not the same network number host called Remote Network Host , local network host can communicate with each other directly ; host to communicate with each other in a remote network to forward the data must pass through a local gateway (gateway).
①, subnet mask (Subnet Mask) called network mask address mask to be used in conjunction with the corresponding IP address.
②, only through the subnet mask, in order to show the subnet where a host of relationships with other subnets, make the network work.
③, subnet mask, and IP addresses do "and" operation, and separating the host address of a network address in the IP address, for determining whether the IP address on the local network, remote network or the Internet.
3. Why use a subnet mask?
The subnet mask may be isolated host address and a network address in the IP address.
So why separate it?
1. Because the two hosts to communicate, we must first determine whether the segment in the same network, i.e. the network address are the same.
2. If so, you can send packets directly to the destination host, otherwise you will need a gateway router forwards the packet to the destination.
Simple example:
to be understood that such a simple: A host to host communication with the B, A and B are each IP address and subnet mask A host And the operation , see the results:

1, if the result of the same , it indicates that the two hosts are in the same network segment, so that A can find B's MAC address by broadcasting ARP, B A MAC address can also be found to implement normal communication.

2, if a different result , ARP will be broadcast in the local gateway end , this time A will send packets B of the first distributed to local gateway, then to query the routing table based on the IP address of the host B, and then continue to pass data packets forwarding, delivery to the final destination B.

Computer gateway (Gateway) is exported to other segments, that is, the IP address of the router interface. IP address of the router interface used can be any one of the network segment address, but usually use the first available address of the network segment or the last available address, which is to avoid as much as possible and this site in a segment host address conflict.

Subnet Mask Address Learning: https://blog.51cto.com/6930123/2112748

Published 105 original articles · 87 won praise · views 30000 +

Guess you like

Origin blog.csdn.net/zengxianglei/article/details/93000648