Home > other >  Some doubt about the IP network
Some doubt about the IP network

Time:12-13

The great spirit, I recently learning some knowledge of IP network, oneself also find some materials, understand some, but I can't understand, still have some questions want to ask,
First of all, I know points network IP address and the host, this I know, is the IP and subnet mask with the network, the remaining is to host a
For example, two machines A and B
A:
IP: 192.168.1.1
Subnet mask: 255.255.255.0

B:
IP: 192.168.2.2
Subnet mask: 255.255.255.0
The question now is:
1. Figure out whether two machines on the same network segment, judgment about the computer network is consistent, consistent just said on the same network segment?
2. The two machine is not in the same network segment will not be able to communicate directly, you need to set up the gateway, the gateway is to ensure that A and B as A gateway to the computer, if is not the same as the gateway of A and B are still can't communicate
3. When setting the gateway can be arbitrarily set, can the IP network is not the same network segment, such as A network of above is 192.168.1.0, I set A gateway 192.192.2.0 so can, or gateway is not set at will,

CodePudding user response:

1. A configuration of IP, generates a 192.168.1.1/32 host routing and 192.168.1.0/24 directly connected network routing, a and b communication, to give priority to check the direct route, b IP network routing with a mask to operations, and the direct routing table network routing table of the target is consistent, is considered to be the same network segment,
2, the gateway is relative to a Courier station, IP address relative to the shipping address, gateway has a lot of different places to export vehicles, different address to the car, you want to send express to find corresponding jurisdiction by express Courier to receiving, you play outside the jurisdiction of the express choice but to accept, a and b communication to configure to configure the general himself up to the same network segment of the IP as a gateway, a gateway can have many different IP network segment,
Transit center of a city, for example, a lot of docking the delivery point of the street, a and b as long as there is the two one gateway IP network segment, to the two segment is up to the line,
3. The gateway can't literally set, make sure themselves and gateway communication, such as you send express, you can't in a land, is called b to Courier, communication is actually a sorting process, first determines whether the machine IP, secondly whether the local can reach, is not, at street express threw the cargo into its export vehicles at the next higher level, and with a gateway IP, it specifies a native, not the export of local data direction,

CodePudding user response:

reference 1st floor wj31932 response:
1. A configuration of IP, generates a 192.168.1.1/32 host routing and 192.168.1.0/24 directly connected network routing, a and b communication, to give priority to check the direct route, b IP network routing with a mask to operations, and the direct routing table network routing table of the target is consistent, is considered to be the same network segment,
2, the gateway is relative to a Courier station, IP address relative to the shipping address, gateway has a lot of different places to export vehicles, different address to the car, you want to send express to find corresponding jurisdiction by express Courier to receiving, you play outside the jurisdiction of the express choice but to accept, a and b communication to configure to configure the general himself up to the same network segment of the IP as a gateway, a gateway can have many different IP network segment,
Transit center of a city, for example, a lot of docking the delivery point of the street, a and b as long as there is the two one gateway IP network segment, to the two segment is up to the line,
3. The gateway can't literally set, make sure themselves and gateway communication, such as you send express, you can't in a land, is called b to Courier, communication is actually a sorting process, first determines whether the machine IP, then whether the local can reach, is not, at street express threw the cargo into its export vehicles at the next higher level, and with a gateway IP, it specifies a native, not the export of local data direction,
thank you, very detailed
  • Related