I wanted to know if there is any way to send larger files than 65,536 bytes by using IPv4
-
4You can transfer files of ANY size using TCP/IP... – Marc B Sep 03 '13 at 14:56
-
Hi, welcome to Stack Overflow. Are you referring to packets? If so, this question has been covered many times on the internet abroad. Please take a look at these and if these don't answer your questions, say what you looked at and how it didn't answer your question. To learn more, take a look at what Stack Overflow is [about]. Thanks! – Qantas 94 Heavy Sep 03 '13 at 14:57
3 Answers
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:
- 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.
- IP, which adds the concept of routing and globally available addresses.
- 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.
- SSL and/or TLS (sometimes), which adds semi-transparent encryption (once established);
- 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
- 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.
- 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.
- 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).

- 84,970
- 20
- 145
- 172
There is not relationship between the version of IP you are using and the size of file you can transmit Do your homework, please.

- 9,166
- 3
- 34
- 52
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.

- 1
- 1

- 3,226
- 1
- 19
- 21