I do not know the details of the Internet protocols and there is no time to study the RFC.

Explain what unique combination of identifiers is used to deliver packages to a specific terminal? After all, the IP addresses of all my computers are the same.

  • one
    Add the port number to the IP - gil9red
  • If everyone has the same address, then they are either over naty (and we are talking about the router's address), or they are on different subnets, or the network is just crookedly configured (on the same subnet, machines with the same ip work very poorly). - KoVadim
  • @KoVadim The service whoer.net/ru shows the same, and the sub-network are different. - Vyacheslav
  • one
    It looks like you're just for naty. In this case, it is the concern of the router. - KoVadim
  • one
    half. In order to deliver an arbitrary packet "inside the network", the router must know a certain rule for delivery. For example, in the settings of the router we can say that all packets that come to port 7777 are redirected to 192.168.1.4, and 8989 to redirect to 192.168.1.3 port 3333. This feature is supported by many routers. If a client sent a package "outside" for Nat, then the router knows about it and waits some time for the return package "back." On this is built the so-called "punching Nata." - KoVadim

1 answer 1

In the transmission medium, to identify the addressee to whom the packet should be delivered, is performed by the hardware address. In Ethernet networks, its role is performed by the MAC address. If the location of the required MAC is not known, the equipment will send a packet to all its interfaces, if it is known, only to the interface where the necessary MAC is located. The exception is the old switches, but modern ones, if the MAC table is full, do the same. This is about sending. As for reception, the network interface in the normal mode ignores all packets directed not to its MAC. The exception is passive equipment (switches, switches), and interfaces in the mode of receiving transit packets (promiscuous mode). Then the network interface will transfer this packet to the processing software, which will extract the IP from the packet, and if “not mine” - will ignore it again, if not the special mode of operation. Of course, all this is very general and has a lot of exceptions, some of which are mentioned.

If by "the IP addresses of all my computers are the same," we mean that they are the same for an external observer - i.e. NAT is used, then any packet leaving them creates a session on the NAT router, and already through it the packets go back to the right place. A session is identified by a set of address + source + receiver port - four numbers, unique for each session (well, in fact, another protocol). Therefore, even for one computer session (for example, mail and a browser, or receiving a web page and receiving a picture on it) do not mix.

  • In Voros, they meant IP addresses. Maybe I did not quite understand it. But I think that the answer should not be given as for a housewife, with the expectation that she will not understand anything anyway. - Vyacheslav