![]() |
Keine Delphi-Frage.Nur etwas zum Internet.
Bei meiner Frage geht es nicht um Delphi, aber vielleicht kennt sich einer hier etwas aus. Es geht um das Internet. Ich habe da eine Diskussion mit einem Kollegen, vielleicht kann das einer hier klären.
Das Grundprinzip des Internets ist klar. Es gibt Web-Server, Web-Clients, Knotenpunkte, DNS-Server, usw. In Grunde funktioniert das in etwa so: ich stelle zum Beispiel eine Anfrage an einen Server und der schickt mir die Dateien über das Internet zu. Dazu wird/werden die Datei/en in Pakete zerlegt, und jedes Paket wird einzeln durch das Internet geschickt. Später wird das wieder zusammengefügt. Wir konzentrieren uns mal auf das TCP. Und hier kommt die Frage: theoretisch ist das Internet frei die Pakete irgendwie zu verschicken, dh die Pakete müssen nicht den gleichen Weg über die gleichen Knoten nehmen. Ein Teil der Datei (gemeint sind Pakete) kann über Asien und den Pazifik ans Ziel gelangen, ein Teil über Afrika, ein Teil über den Atlantik, usw. Das ist die Funktionsweise des Internets - es gibt viele Wege ans Ziel. Und nun zu der Frage: wie sieht das in der Praxis aus? Das die Dateien in Pakete zerlegt werde ist klar. Ist es aber üblich die Pakete über verschiedene Wege ans Ziel zu schicken, bzw. wird es getan? Oder ist es eher so - ist der Weg erst bestimmt, nimmt alles den gleichen Weg. Ausgenommen es gibt Probleme, dann wird natürlich ein neuer Weg gesucht. Leider fand ich im Internet nichts zu dem Thema. Nur wie es theoretisch funktioniert. |
AW: Keine Delphi-Frage.Nur etwas zum Internet.
Das hat auch eher nichts mit TCP oder UDP zu tun. Der Weitertransport von Netzwerkpaketen findet mehr oder weniger auf die gleiche Weise statt. Stark vereinfacht: Jedes Netzwerksegement benötigt die Information wie es ein gefordertes anderes Netzwerksegement erreichen kann. Hat es diese Information nicht, benötigt es ein Gateway. Im Prinzip eine Catch all Adresse für alles das ein Netzwerkteilnehmer nicht eigenständig adressieren kann. Über diese Logik geht es in einem funktionierenden Netzwerk immer zum nächst "intelligenteren" Netzwerkteilnehmer.
z.B. Dein PC --> Dein Router --> Router des ISP --> usw... An Irgendeiner Stelle solltest du an einem Netzwerkteilnehmer ankommen, der dein Zielgerät kennt. Gibt es an dieser Stelle nur eine Möglichkeit, dann wird diese verwendet. Gibt es mehrere Möglichkeiten, dann wird anhand von Metriken wie. z.B. Hops zum Ziel oder Latenz der Leitungswege oder Bandbreite entschieden ob ein Paket diesen oder jenen Weg nimmt. In der Theorie ist es also durchaus möglich, dass Pakete unterschiedliche Wege nehmen, wird aber im Regelfall nur dann passieren, wenn sich während der Übertragung entweder ein Weg verabschiedet oder sich ein deutlich besserer auftut. Also auf dem Papier Ja, in der Realität eher Nein. Wie die einzelnen Router im Netzwerk ihre Informationen über die Umliegenden Netzwerke erhalten ergibt sich aus den verwendeten Netzwerkprotokollen und auch über die bereits verarbeiteten Pakete: ![]() |
AW: Keine Delphi-Frage.Nur etwas zum Internet.
Kurz: Dafür ist der IP-Teil des TCP/IP zuständig. Der packt handliche Pakete und ermittelt im Flug eine gute Strecke, mit Hilfe von Routern und Gateways.
Das ist doch mal eine richtig schöne Frage für eine KI. Da bekommt man auch eine gute Antwort. Hier, wie Gemini geantwortet hat: ![]() |
AW: Keine Delphi-Frage.Nur etwas zum Internet.
fisipjm answered the and provided what looks like clean and nice explanation, but if you are still wondering about how TCP is fitting here then i will try to explain this part.
TCP packets are sequenced (with counter in the header) and has checksum (also in the header), and must be acknowledged (ACK signal or packet), this evolved a lot over time, by skipping ACK for every single packet, like if things going fast then i will send you 100 or 950 packets before stopping and wait for ACK, this dynamic adjustable values comes for adapting high Internet speed, and it is irrelevant here, Now in general when you send a file it will be sent as sequenced packets (has a counter), and the receiver, in this particular case is the network adapter will check if the it did receive the correct packet in the correct order or not, in case it received the correct packets then will notify process (the user app/kernel....) of received the data and ACK for the peer, the process shoudl read the buffer to free space/memory from the network adapter and its driver to receive more, as there is another thing (value) in the header of the packet telling the peer the receiving window size in the ACK, but if lets say it received unexpected order number or bad checksum (corrupted packet) then it will immediately send ACK to retransmit from the source, and in this case you process (app) will not be notified of incoming data, network adapter/driver might hold on the correct/valid packet with out of order sequence number for little time as it might took different path, but this holding will decrease the speed of transmit greatly. Now the exact wording of your question, should the packet always take the same path ? The answer is, no it will take what ever switch/router on the cable deemed faster at the time of the handling of that packet. Will that affect TCP? of course it will, but TCP is designed and built to handle this, as i explained above. Will this affect UDP? again of course it will, but UDP by design are orphan packets, UDP (datagram) are connectionless stream, meaning it is the Process/App responsibility to check the sequence of the packet, and implement correct handling of lost and corrupt packets, unlike the TCP where the netwrok adapter/driver is repsponsible for the correction of TCP packets in order and content. Hope that was clear. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:22 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz