2019.9.24 network ip Tips

Original link: https://blog.csdn.net/faker_wang/article/details/80747407

    :https://www.cnblogs.com/wktwj/p/10862618.html

I think the more excerpt some of the things it needs to know

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. The subnet mask is only one role, is to divide an IP address into a network and host addresses in two parts. 
The subnet mask is a 32-bit address, for shielding a part of the IP address in network identifier and host identifier distinguish and indicate that the IP address is on the LAN, or on a remote network.

Subnet mask - a mask of the network portion of the IP address "all 1" bit pattern. For Class A addresses, the subnet mask 255.0.0.0 default; Class B subnet mask default address is 255.255.0.0; default is for Class C subnet mask address 255.255. 255.0.

    • By the subnet mask, it can be determined in two IP is not inside a LAN.

    • The subnet mask can be seen how many bits are the network number and how many bits are the host

In short, I think that the subnet mask is used to give a more divided again ip "ip", so ip is not so scarce,

Gateway :

Gateway (Gateway), also known as gateways, protocol converters. Default gateway on the network layer to implement a network interconnection, the interconnection network is the most complex equipment, only two different high-level protocol for network interconnection. Gateway routers and similar structure, except that the interconnect layers. Gateway can be used for both WAN interconnection, it can also be used for LAN interconnection

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.

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).

Broadcast address :

Broadcast address (Broadcast Address) is designed for simultaneously sending an address to all the network stations

Subnet :

Construction subnet is to facilitate network management, for example, an IP address of 172.16.1.1 router 3 is connected to hosts, IP addresses are 172.16.1.2,172.16.1.3,172.16.1.4. It is not thought the campus network IP address, 172.16.1.1 is used when the gateway, the three IP address is the Internet network IP. Similarly, 172.16.1.1 can also be seen as an internal network IP subnet, so gradually go to the top, until the public IP network, which is one of those four billion IP. And 172.16.1.2,172.16.1.3,172.16.1.4, the host within the network are not directly connected to form a cloud 172.16.1.1 interfaces, routers, and together form a subnet .

Is not very familiar with, which is the campus network management, a router will manage all IP addresses within its network. As can be seen, the IP address within the network have the same prefix 172.16.1.2,172.16.1.3,172.16.1.4, i.e. 172.16.1. *, That is, 32-bit IP address in the first 24 bits are the same, therefore, All the internal network IP address expressed as 172.16.1.0/24.172.16.1.0/24 represents all 172.16.1. * forms of IP addresses within its subnet.

Note: The host and router interfaces connected to form subnets, where the host may be another router interface, the host may be

Guess you like

Origin www.cnblogs.com/WildSky/p/11569202.html