Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ip address and subnetting

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Related concepts of 1.1IP address

The following picture can be seen in the dialog window configured by the computer networking protocol:

We can find that there are two options in its properties: automatic but manual modification. Let's briefly explain the above nouns.

IP address: the network layer is responsible for defining the data through which data flows through the network. What we usually see is 192.168.XXX.XXX.

Subnet mask: a bitmask used to indicate which bits of an IP address identify the subnet in which the host resides and which bits identify the host.

Default gateway: if a host cannot find an available gateway, it sends the packet to the default designated gateway, which processes the packet.

DNS server: a server that translates domain names (domain name) and corresponding IP addresses (IP address).

Classification of 1.2IP addresses

1.2.1 classify by component

The IP address is composed of the network part and the host part, which is divided into the following five parts, among which A | B | C has more applications.

1.2.2 Classification according to particularity

According to the particularity of IP address, it can be divided into public address and private address. First, let's introduce the private address:

In fact, the private address consists of three parts:

Among the class B addresses, 169.254.0.0 to 169.254.255.255 are reserved addresses. If your IP address obtains the IP address automatically and you do not find an available DHCP server on the network, you will get a temporary IP address from 169.254.0.1 to 169.254.255.254.

Now that you have a range of private addresses, the rest (except 0.0.0.0 and 255.255.255.255) are public network addresses!

1.3Introduces ping tools and ipconfig commands (Windows)

First, introduce the ipconfig command:

1.ipconfig: view Nic summary information, IP address, subnet mask, default gateway

2.ipconfig / all: view details, MAC addresses, etc.

.ipconfig / release: release address

4.ipconfig / renew: retrieve the address.

In addition, ping, to be exact, ping is also a command, and the help manual can be found through man ping in Linux.

Ping is based on ICMP (Network Control Information Protocol). The basic command is ping ip address. Generally, we use it to detect whether the network is unobstructed or not.

Interworking with other hosts. Unobstructed will return relevant information (byte size, which can be set by adding-l byte size at the end of the command; delay time, one

General is ms level; TTL (time to live): the maximum life cycle that a packet can go through during network transmission). Conversely, there are two situations that do not work:

5. Request timeout

6. Unable to access the target host

You can think about the specific reasons and find information on your own.

You can add parameters after ping:

-t: four packets are sent by default if it is not added, and-t means it will be sent all the time.

-a: returns the host name of the other party

-l: change the byte size.

Finally, a ping test flow is given:

two。 Subnetting

What is subnetting?

The answer is to further divide the various IP addresses into smaller networks. For example, it is impossible for us to need a lot of ip addresses at home, so operators will assign a small segment of ip addresses to users.

Save resources and save costs.

Second, why subnetting?

In order to improve the utilization rate of network ip address, the broadcast range is reduced and it is more convenient to manage.

Third, how to subnetting?

First of all, let's give a common example to illustrate that we usually use a class C address, which is the type address of 192.168.XXX.XXX. Suppose an address is 192.168.10.177, and normally its subnet mask is 255.255.255.0. According to the subnet mask, we know that the binary of the first three parts (the network part) is 1 of 24 bits, so it is usually written as 192.168.10.177 bit 24 when subnetting, then subnetting it is to borrow space from the host bit, and each bit borrowed is to divide the host part into 2 ^ n (n represents the number of borrowed bits). 192.168.10.177Compact 26, which divides it into four parts, so where is the ip address

The range of 192.168.10.128 is 192.168.10.223, where 192.168.10.128 is the subnet address (network number), and the 192.168.10.223-bit broadcast address corresponds to 192.168.10.0 and 192.168.10.255 in our normal ip address. In fact, the addresses of other classes are the same principle, except that the number of borrowed digits may exceed 8 bits, which can actually be regarded as subnetting the corresponding addresses of other classes.

Let's talk about what is subnet summary.

Again, in the above example, 192.168.10.177Universe 23, the subnets are aggregated (aggregated). We can look at this situation like this:

193.192.168.10.177 binary is: 1100 0000.1010 1000.0000 1010.1011 0001

So / 23 is to change the last bit of the third part into the content of the host part, so the first 23 bits remain unchanged. In fact, to put it simply, how many bits are added to the front is to divide it into 2 ^ (8Mutual) parts, so the above example is divided into 128 parts, corresponding to the subnet address 192.168.10.0 and the broadcast address 192.168.11.255.

The advantage of summarization is that routing or switch can avoid the waste of resources in storing relevant information, and greatly improve the efficiency of communication.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report