Network IP Address Configuration Error subnet mask causes Network Access

Source: Internet
Author: User

This article describes in detail how to configure network IP addresses. What operations do we need? I believe that reading this article will help you.

A few days ago, the netizen harcsbg encountered a strange subnet mask problem during network IP address configuration. harcsbg asked for help in the ccid it community.

Dear experts, I have encountered a strange problem in network IP address configuration today. Please help me analyze it.

Network Environment:

1. No VLan is assigned to the LAN.

2. The four devices connected to the same vswitch are: one server, one PC client, and two other devices preinstalled with the Linux system, A vswitch is connected to other vswitches to form a relatively large LAN.

3. IP Address Configuration:

Server: 10.157.137.202/255.255.255.192/10.157.137.190

PC Client: 10.157.137.201/255.255.255.192/10.157.137.190

Other devices: 10.157.137.204/2017100000000192/10.157.137.190

10.157.137.206/255.255.255.192/10.157.137.190

In the preceding configuration, all devices on the vswitch can Ping each other, and the network under the vswitch is normal.

The problem is that the devices under other switches connected by the vswitch can be pinged to 137.202/137.201. However, you cannot Ping 137.204 or 137.206. Ping SERVER 137.204 and PC Client 202 from 201 and 137.206can be pinged, but other addresses in the LAN cannot be pinged and cannot be connected to the Internet.

After changing the subnet mask of other devices to 255.255.255.0, the devices can communicate with each other and the Internet returns to normal.

Question:

1. On the same switch device, both the server and PC client can access the Internet, but why are other Linux pre-installed devices unable to access the Internet? Can't Ping other devices on the lan?

2. Why can I achieve interconnection after changing the subnet mask?

3. The mask 255.255.255.0 and 255.255.255.255.255.192 are originally divided into different network segments. But why is it that the mask is the same as 255.255.255.255.255.192 but cannot be accessed after being changed to 0?

4. In other devices in the LAN, all masks use mask 255.255.255.192, which can be interconnected. Why is this device alone unavailable?

Please help me with the analysis!

Saidi network IT technology community moderator "Sebei" opened the answer for the netizen harcsbg.

For question 1, the simple question is complicated by you. Why do we need to use a subnet mask to divide network segments? If it is 255.255.255.0, it means that 254 hosts can access the internet. If you change it to 255.255.255.192, it means that only 62 hosts belong to the same network segment.

Let's see if the binary value of 10.157.137.201 is 00001010 10011101 10001001 11001010,255.255 11111111. Then, the binary value of 192 is 11111111 11111111 11000000.

It can be seen that the starting IP address is 10.157.137.193 and the ending IP address is 10.157.137.254, which can accommodate 62 computers in total.

The gateway must be configured for the Internet and your gateway is incorrect. When you set the subnet mask to 255.255.255.0, your gateway 10.157.137.190 is valid and they are in a network segment.

Problem 2 and 3 are the same. After changing the subnet mask, it becomes a network segment that can accommodate 254 machines, so the network access is smooth. If you use subnet mask 255.255.255.255.192, you must set the gateway address to 10.157.137.193 or above so that they can access each other in a single network segment.

For issue 4, the Linux operating system requires the gateway 10.157.137.190, and your gateway is incorrect. Your gateway should be set between 10.157.137.193 and 10.157.137.254. They are in a CIDR block. The Windows operating system under a vswitch can communicate with each other because the computer in the Windows operating system connected by a vswitch does not need to connect to the gateway 10.157.137.190. Therefore, it is mainly because your gateway settings are incorrect.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.