How to transmit a file larger than 65,536 bytes using IPv4

410 Views Asked by At

I wanted to know if there is any way to send larger files than 65,536 bytes by using IPv4

3

There are 3 best solutions below

0
On

You shouldn't be using raw IP.

There's a reason an implementation of TCP/IP is typically called a "stack". Communication is typically done by layering protocols on top of each other. Each layer takes the layer below it, and either abstracts away some aspect of the lower-level protocol or adds useful functionality.

A web server, for example, ends up using several layers of protocols:

  1. Ethernet, WiFi, or other such protocols, which provides the physical (or radio) connection and signaling rules that enable machines to talk to each other at all.
  2. IP, which adds the concept of routing and globally available addresses.
  3. TCP, which
    • adds a concept of "ports", which allows several apps to use the same IP address at the same time without stepping on each other's toes;
    • abstracts the discrete packets of IP into a full-duplex, arbitrary-length stream of bytes; and
    • adds detection and correction of errors and lost/duplicate data.
  4. SSL and/or TLS (sometimes), which adds semi-transparent encryption (once established);
  5. HTTP, which adds structure to the stream by organizing its contents into messages (requests and responses) that may (and almost always do) include metadata about how the body of the message should be interpreted.

At the API level, you will almost always start with a transport-layer protocol like TCP, UDP, or sometimes SCTP. It's rare for the OS to even allow you to communicate directly via IP, for security reasons.

So in order to transfer a file, you'd need to

  1. Establish a TCP "connection" to the other machine, which will typically be running a service on some known port. (For HTTP, that's typically 80.) This in itself removes any limit IP imposes on data size.
  2. Set up SSL or TLS, if the other end requires it. You probably shouldn't bother with them yet, though. It's an optional, and non-trivial, addition, and most servers provide some way to communicate without it.
  3. Use the application-layer protocol that the other end understands in order to send a request to store a file (and, of course, the file contents).
0
On

There is not relationship between the version of IP you are using and the size of file you can transmit Do your homework, please.

0
On

That depends what you mean by "files". Large files are sent over the network every day, and it's still like 99% IPv4, so I suppose most correct answer would be "yes". You might want to read on transport protocols, most prominent of which is TCP.