DNS, IP address, subnet mask and default gateway

A, DNS server 

DNS means: the domain name server (Domain Name Server). On the Internet between domain names and IP address is one of the domain name though for people to remember, but only know each other between the machine IP address, the conversion work between them as domain name resolution, domain name resolution required by the specific domain name resolution server to complete, the DNS is a server domain name resolution .

To translate domain names into IP addresses software called the Domain Name System, namely DNS. It holds a domain name and with the corresponding IP address (IP address) of the table (domain name), to resolve the domain name of the message. The domain name on the Internet to a computer or group of computers for electronic data transmission azimuth when the computer's identity (also sometimes referred to geographical location). Domain names are separated by a point with a string of names composed typically contain the name of the organization, but always include two or three-letter suffix to indicate the type of organization or the jurisdiction in which country or region.

 

Two, IP addresses

To achieve network communication between computers, it must have a valid ip address. Network IP address = address + host address (also known as: network number and host number Composition)

Structure ip addresses on the Internet so that we can easily address. ip address is usually represented by more intuitive, the partition number of dots to four decimal digits.

IP addresses of four sections, each field is one byte, i.e. 4 bytes, each byte has 8 bits, the maximum value is 255 (= 256: 0 to 255). Is worldwide unique 32-bit (4 bytes * 8 bits) identifier.

IP address consists of two parts, i.e. the network address and host address, both the master-slave relationship is:

1. Network Number net-id, which flag network host (or router) are connected to the network address which it represents a part of the Internet network

2. No. Host host-id, it marks the host (or router), which represents a host address belongs to which host to the network.

Two IP addresses may be referred to as: IP address :: = {<network number> <host number>}

In a nutshell is: IP address = network ID + host ID

Network Address: 192.168.100.0 
host address: 0.0.0.1 
the IP addresses: the network address + host address = 192.168.100.1 
broadcast address: 192.168.100.255 

IP addresses are divided into A, B, C, D, E 5 class. B and C are commonly used types.

1, A Class Address: network Bit 8 (7) host bits 24 bits +, 0 ******* ******* **************

IP range: 1.0.0.0--126.255.255.255

2, Class B addresses: 16 bit network (14) bits + host bits 16, 10 ****** ******* **************

IP range: 128.0.0.0--191.255.255.255

3, Class C addresses: 24 bit network (21) bits + 8 bits host, 110 ***** ******* **************

IP range: 192.0.0.0--223.255.255.255

 

4, Class D Address: 224.0.0.0--239.255.255.255

5, E Class address: is reserved addresses. Such top IP address is "1111", the network address number ranging between 240 to 255

IP range: 240.0.0.0--255.255.255.255


6, the loopback address: 127 network address bits are the local test can not be used for data communication. As 127.0.0.1 localhost or equivalent to native IP. Generally used for testing.

IP range: 127.0.0.0--127.255.255.255

Third, the subnet mask

Subnet Mask (subnet mask) called network mask, the mask address, subnet mask, which is a bit used to indicate which IP address is identified by a subnet host resides, and the identification of which bits is the host of bit mask. Subnet mask can not exist alone, it must be combined with the IP address.

effect:

1) The subnet mask is a 32-bit address, an IP address is divided into a network address and host address two parts.

2) the IP address of the subnet mask is used to determine whether any two computers according to the same subnetwork.

Machine on the same network can communicate: Address

Judgment principle:

After two computers IP address and subnet mask of each of AND operation, if the result is the same, then the two computers are in the same sub-network,

You can direct communication.

3) using a subnet mask, a large network can be divided into subnets, i.e. VLSM (variable length subnet mask), a small network can also merge into a large network is the super net.

4) decimal and binary subnet mask usually has two forms, 255.255.0.0 was 1111111.11111111.00000000.00000000 binary representation,

Wherein the front two-byte 16-bit "1" indicates the network number, followed by 2 bytes of 16-bit "0" indicates the host number.

Mask Category:

Class A Address: The default subnet mask is 255.0.0.0

Class B addresses: default subnet mask 255.255.0.0

Class C Address: The default subnet mask is 255.255.255.0

If the network is divided subnet, it is called a subnet mask. Divided subnet routing "== must know the network number net_id destination IP address of the datagram, subnet_id subnet number and host number host_id is the number of bits.

Subnet mask - a mask of the network portion of the IP address "all 1" bit pattern.

The two most common subnet mask, Class B and Class C addresses address.

1. The subnet mask is "255.255.255.0" of the network: a number which can be changed within a range of 0 to 255, the final surface, it is possible to provide the 256 IP addresses. However, the actual number of IP addresses available is 256-2, i.e., 254, because the host number is not all "0" or all "1."

2. The subnet mask is "255.255.0.0" of the network: the last two numbers may be arbitrarily changed within the range of 0 to 255, 2 ^ 255 may provide IP addresses. However, the actual number of IP addresses available is 255 ^ 2-2, i.e., 65,023.

Fourth, the default gateway

Gateway is essentially a network IP address leading to other networks.

For example, there network A and network B, IP address range of the network A is "192.168.1.1 ~ 192 168.1.254.", Subnet mask 255.255.255.0; IP address range of the network B is "192.168.2.1 ~ 192.168. 2.254 ", a subnet mask of 255.255.255.0. In the absence of routers, between the two networks can not be TCP / IP communication, even if the two network connections on the same switch (or hub), TCP / IP protocol will be based on the subnet mask (255.255 .255.0) determined that the two hosts on the network in a different network. And to enable communication between the two networks, it must be through the gateway.

If network A host that the destination host the packet is not in the local network, put forward the packet to its own gateway, then the gateway to the network by the gateway forwards B, B of the network gateway forwarded to a network B host (such as shown in the drawings). A forwarding network packets to the network B.

So, just set the gateway IP address, TCP / IP protocol to communicate with each other between different networks. Then the IP address is the IP address which machine it? IP address of the gateway is the IP address of the device has a routing function, the device has a routing function routers, servers, routing protocol enabled (essentially serves as a router), the proxy server (also serves as a router).

Guess you like

Origin www.cnblogs.com/yyd-sun/p/11898233.html