Definitely worth writing down! Questions about VPC and three types of networks

Source: Internet
Author: User

Definitely worth writing down! Questions about VPC and three types of networks

For this reason, I spent most of my time searching all the Chinese and English documents on the Internet. Later, I tried it myself and solved it through practice.

This is the case. In the past, I used two vpcs to set up the SPS environment. Successfully, each VPC uses a dual Nic, one of which is a real Nic, that is, the same as the physical machine, the other is Microsoft Virtual Network Card, loopback.

The IP addresses are respectively set to 10.50.50.X, and the physical IP addresses are set to 192.168.100.X (in fact, physical IP addresses are automatically obtained for Internet and Internet access)

 

Both the VPC and the physical machine, and the VPC can be pinged. It can also communicate with other physical machines.

 

Recently, I installed OCS and also needed to implement the above line. N instances are interconnected.

 

However, I cannot use 10.50.50.X. Can communicate with other physical machines, but cannot ping each other between vpcs.

Because I want to use only one Nic. Dual Nic, which is problematic for OCS. At least, I don't need it.

 

Failed to search for data N times.

 

With the following message:

"

We usually use the Ping command to preliminarily diagnose the network condition. However, in the Virtual PC shared network mode, the Ping command will encounter the following problems:

1. Ping 192.168.131.254 without responding

In the Virtual PC shared network mode, the gateway 192.168.131.254 does not respond to the Ping command, which is set in the software design. Although it does not respond, the network connection still works. Therefore, in shared mode, the virtual machine cannot use the Ping 192.168.131.254 gateway to determine whether the network is in good condition.

"

I thought of trying to change the header to 192, which is commonly known as Class C network.

 

A try is successful.

 

Note. This prevents other people from finding a solution. So put it online.

 

 

VPC and MS have not written any information.

I am happy to think that MS has written the fatal error data of SQL Uninstall so well. ...

 

 

 

===

By the way, I would like to post relevant information:

Address Allocation is more about how to understand why ip addresses are assigned to you in this way. There are very few opportunities to plan your own ip addresses unless it is a private large network, engineers who really need to consider large-scale ip planning should not exceed three digits in China.

1. IP Address

The IP address identifies the location of a system in the network. We know that each IP address is composed of two parts: the network number and the host number. The network number identifies a physical network. All hosts on the same network need the same network number, which is unique on the Internet; the host number determines a worker, server, or other TCP/IP host in the network. The host number is unique for the same network number. Each TCP/IP host is determined by a logical IP address.

Network number and host number

IP addresses can be expressed in binary format (1 and 0 are too large to be confused) or in dotted decimal format. Each IP address is 4 bytes in length and consists of four eight-bit fields. It is usually called an eight-bit body. The octal is separated by periods (.) and represents a decimal number between 0 and. The four domains of an IP address indicate the network number and host number respectively.

2. Address type

To adapt to networks of different sizes, five IP address types are defined on the internet.

You can determine the address type by the first eight digits of the IP Address:

Type IP Format network number host number

Class A w. x. y. z w x. y. z w, hour 1-126

Class B w. x. y. z w. x y. z w is 128--191

Class C w. x. y. z w. x. y z w is 192--223

Let's take a look at these five types of addresses:

Class A address: You can have A large number of hosts. The highest bit is 0, followed by 7 digits indicating the network number, and the remaining 24 digits indicating the host number, which allows A total of 126 networks.

Class B address: allocated to medium-sized and large-scale networks. The maximum two addresses are placed at 10 of the binary value, and 16384 networks are allowed.

Class C address: used for LAN. The third-digit is set to 110 of the binary value, and approximately 2 million networks are allowed.

Class D address: used for multicast group users. The top four digits are set to 1110, and the remaining digits are used to indicate the group to which the client belongs.

Class E address is a type of address for testing only.

Private ip address range, which is mainly provided to the enterprise during internal network construction. These ip addresses are not displayed on the internet, and users can directly use the internal ip address settings, you do not need to apply, and cannot access these IP addresses from the external industry. In actual use, you need to set a nat server between the internal network and the external network.
10.0.0.0-10.255.255.255 or 10.0.0.0/8

172.16.0.0-172.31.255.255 0r 172.16.0.0/12

192.168.0.0-192.168.255.255 or 192.168.0.0/16

3. Address Allocation Guide

When assigning network and host numbers, observe the following rules:

(1) The network number cannot be 127. As you know, this ID is retained for loop and diagnosis. Remember to ping

127.0.0.1?

(2) You cannot set the network and host numbers to 1. If each bit is 1, the address is interpreted as an intranet broadcast instead of a host number. (TCP/IP is a broadcast protocol)

(3) corresponding to the preceding one, you cannot set 0; otherwise, the address is interpreted as "this network ".

(4) for this network, the host number should be unique. (Otherwise, an error such as IP Address allocation or conflict will occur)

Allocate network number

Each network and wide-area connection must have a unique network number, which is used to distinguish different hosts in the same physical network. If the network is connected by a router, each wide-area connection requires a unique network number.

Allocate host number

The host number is used to distinguish different hosts in the same network, and the host number should be unique. All Hosts, including interfaces between routers, should have a unique network number. The host number of the router, which must be configured as the default gateway address of the workstation.

Valid host number

Class A: 255.0.0.1 -- 255.255.255.254

Class B: w. x.0.1 -- w. x.255.254

Class C: w. x. y.1 -- w. x. y.254

4. subnet shielding and IP address

Each host on a TCP/IP needs a subnet mask number. It is a 4-byte address used to encapsulate or "block" a part of an IP address to distinguish between a network number and a host number. When the network has not been divided into subnets, you can use the default subnet shielding. When the network is divided into several subnets, you need to use a custom subnet shielding.

Default Value

Let's take a look at the default subnet shielding value, which is used for a network that has not been divided into subnets. This default value is required for each host even on a single-segment network.

Its form depends on the network address type. In its four bytes, all bits corresponding to the network number are set to 1, so the decimal value of every eight bits is 255; set all pairs to 0. For example, the class C network address 192.168.0.1 and the corresponding default shielding value 255.255.255.0.

Variable-length Subnet

Because the allocation of IP addresses in a fixed abc mode is a great waste, many subnet allocation methods are now used in the form of field-changing subnets, which can be more flexible.

Determine the destination address of the Data Packet

We say that the "and" Operation on the shielded value and IP address value is actually an internal process, which is used to determine whether a data packet is sent to a host on the local or remote network. The corresponding operation process is as follows: when the TCP/IP is initialized, the IP address of the host and the subnet mask value are "consistent ". Before the packet is sent, make the destination address and the blocked value as "same". If the source IP address matches the destination IP address, the IP protocol knows that the data packet belongs to a host on the local network; otherwise, the data packet will be sent to the vro.

Note: we know that the "and" operation is to logically compare each bit in the IP address with the corresponding bit in the subnet mask.

Create a subnet

1. About subnets

A network may actually have multiple physical CIDR blocks. We call these CIDR blocks as subnets. The IP addresses used are derived from a certain network number.

To divide a network into several subnets, you must use different network numbers or subnet numbers. Of course, dividing subnets has its advantages. By dividing subnets, each unit can connect complex physical network segments into a network, and can:

(1) hybrid use of a variety of technologies, such as Ethernet and ring-based network. (The two most popular interfaces support this function)

(2) overcome the limitations of current technology, such as breaking through the maximum number of hosts in each segment.

(3) reduce network congestion through redirection transmission and broadcast transmission.

Achieve subnet division

Before dividing subnets, we must first analyze our needs and future plans. Generally, we follow the following principles:

(1) determine the number of physical segments in the network. (That is, the number of subnets)

(2) determine the number of hosts required for each subnet. Note that a host must have at least one IP address.

(3) Based on this requirement, it is defined as the subnet shielding of the entire network, the unique subnet number of each subnet, and the host number range of each subnet.

Subnet Mask

Before defining a subnet shield, it is essential to determine the number of subnets required in the future and the number of hosts per subnet. Because when more bits are used for subnet shielding, more available subnets exist, but the number of hosts in each subnet decreases. (This is the opposite of IP address definition)

2. Define subnet shielding

When dividing a network into several subnets, you must define subnet shielding. Let's take a look at the defined steps:

(1) determine the number of physical network segments, that is, the number of subnets, and convert the number to the binary number. For example, a Class B address has six subnets, which are 110.

(2) Calculate the binary digits of the number of physical network segments (the number of subnets). Here it is 110, so three digits are required.

(3) convert the back code to the corresponding decimal value in a high order (from left to right). Because three digits are required, the first three digits of the host number are used as the subnet number, this is 11100000, so the blocking method is 255.255.224.0.

3. Define the subnet number

The subnet number is the same as the number of digits blocked by the subnet.

(1) list the digits used by the subnet numbers in the order of high to low. For example, the subnet mask uses three bits, and the binary value is 11100000.

(2) convert the lowest digit 1 to decimal. Use this value to define the subnet increment. In this example, It is 1110, so the increment is 32.

(3) Use this increment to add the subnet number starting from 0 until the next value is 256. In this example, w. x.32.1-w. x.63.254 and w. x.64.1-w. x.127.254.

4. Define the host number in the subnet

As shown in the preceding example, once the subnet number is defined, the host number of each subnet has been determined. The value obtained after each increment indicates the starting value of the host number range in the subnet.

Determine the number of hosts in each Subnet

(1) calculate the number of available digits of the host number. For example, if a three-digit network number is defined in the B-class network, the remaining 13-digit defines the host number.

(2) convert the remaining number of digits, that is, the host number, to the decimal number, and then subtract 1. For example, if the 13-bit value is 1111111111111 in decimal format, the number of hosts in each subnet in the network is 8191.

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.