Why maximum length of IP, TCP, UDP packet is not suit?Is ADSL's UDP packet forwarding rate strictly linear to...
How would an AI self awareness kill switch work?
Does the ditching switch allow an A320 to float indefinitely?
Will rerolling initiative each round stop meta-gaming about initiative?
After checking in online, how do I know whether I need to go show my passport at airport check-in?
Why is it that Bernie Sanders is always called a "socialist"?
Crack the bank account's password!
Boss asked me to sign a resignation paper without a date on it along with my new contract
Calculate of total length of edges in Voronoi diagram
Why is the "Domain users" group missing from this PowerShell AD query?
What's this assembly doing?
Is `Object` a function in javascript?
What is the industry term for house wiring diagrams?
Does it take energy to move something in a circle?
Stuck on a Geometry Puzzle
Does diversity provide anything that meritocracy does not?
Possible issue with my W4 and tax return
If angels and devils are the same species, why would their mortal offspring appear physically different?
Is there a way to not have to poll the UART of an AVR?
Not a Long-Winded Riddle
What is the difference between "...", '...', $'...', and $"..." quotes?
What game did these black and yellow dice come from?
Why do neural networks need so many training examples to perform?
Does the US government have any planning in place to ensure there's no shortages of food, fuel, steel and other commodities?
Are the positive and negative planes inner or outer planes in the Great Wheel cosmology model?
Why maximum length of IP, TCP, UDP packet is not suit?
Is ADSL's UDP packet forwarding rate strictly linear to packet size?What is the actual size of an Ethernet MTUWhy do we need the data link layer in Ethernet?1522-byte frames from access point being dropped by gatewayOSI model encapsulationWhy does the round-trip time of a TCP message decrease 100-fold as the message size exceeds the maximum segment size?TCP segment length and TCP/IP header optionsWhy is a TCP Socket identified by a 4 tuple?How does a TCP segment fit into a smaller IP packet?Why maximum length of IP、TCP、UDP packet is not suit?
From many tutorials, I get follow knowledge(maybe I'm misunderstood) :
maximum of an Ethernet packet is about 1500 bytes.
maximum of an IP packet is about 65535 bytes.
maximum of a UDP packet is 65515 bytes
But when I made a test and watch Wireshark, I get a different answer.
- I try to send some big data with TCP protocol.
Socket con = new Socket("localhost", 8088);
OutputStream os = con.getOutputStream();
StringBuilder s = new StringBuilder();
for( int i = 0; i < 10000; i++) {
s.append("Hello world");
}
// about 110k bytes
byte[] data = s.toString().getBytes();
os.write(data);
os.close();
con.close();
This is my Java code (it's not necessary to understand this.), I try to send 110k bytes data with a TCP connection. This is my Wireshark.
My 110k bytes message is split to 7 packets, I think this shows that maximum length of a TCP packet is 16388 bytes.
- Then, I try to send a UDP packet:
DatagramSocket client = new DatagramSocket(50555);
StringBuilder s = new StringBuilder();
for( int i = 0; i < 10000; i++) {
s.append("Hello world");
}
// 110k bytes
byte[] data = s.toString().getBytes();
int messageLength = data.length;
for (; ; messageLength--){
try{
DatagramPacket packet = new DatagramPacket(data, messageLength,
new InetSocketAddress("localhost", 8088));
// If packet is still too lang, above line will throws an exception
// If there is not any exception, means we can send this packet
// and this messageLength is the limit value for a UDP packet.
client.send(packet);
System.out.println("message length is " + messageLength);
// break for loop
break;
} catch(Exception e){
// fail to send and continue for loop
}
}
client.close();
the result ismessage length is 65507
.
I was really confused:
IP protocol build on Ethernet or something, Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?
Why an TCP packet is only 16388 bytes?
Then I have read many post on SOF or other websites, But I don't get an answer, I think is not duplicate to others.
ip ethernet tcp udp
New contributor
add a comment |
From many tutorials, I get follow knowledge(maybe I'm misunderstood) :
maximum of an Ethernet packet is about 1500 bytes.
maximum of an IP packet is about 65535 bytes.
maximum of a UDP packet is 65515 bytes
But when I made a test and watch Wireshark, I get a different answer.
- I try to send some big data with TCP protocol.
Socket con = new Socket("localhost", 8088);
OutputStream os = con.getOutputStream();
StringBuilder s = new StringBuilder();
for( int i = 0; i < 10000; i++) {
s.append("Hello world");
}
// about 110k bytes
byte[] data = s.toString().getBytes();
os.write(data);
os.close();
con.close();
This is my Java code (it's not necessary to understand this.), I try to send 110k bytes data with a TCP connection. This is my Wireshark.
My 110k bytes message is split to 7 packets, I think this shows that maximum length of a TCP packet is 16388 bytes.
- Then, I try to send a UDP packet:
DatagramSocket client = new DatagramSocket(50555);
StringBuilder s = new StringBuilder();
for( int i = 0; i < 10000; i++) {
s.append("Hello world");
}
// 110k bytes
byte[] data = s.toString().getBytes();
int messageLength = data.length;
for (; ; messageLength--){
try{
DatagramPacket packet = new DatagramPacket(data, messageLength,
new InetSocketAddress("localhost", 8088));
// If packet is still too lang, above line will throws an exception
// If there is not any exception, means we can send this packet
// and this messageLength is the limit value for a UDP packet.
client.send(packet);
System.out.println("message length is " + messageLength);
// break for loop
break;
} catch(Exception e){
// fail to send and continue for loop
}
}
client.close();
the result ismessage length is 65507
.
I was really confused:
IP protocol build on Ethernet or something, Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?
Why an TCP packet is only 16388 bytes?
Then I have read many post on SOF or other websites, But I don't get an answer, I think is not duplicate to others.
ip ethernet tcp udp
New contributor
"Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?" Ethernet is not the only data-link protocol that can carry IP. More devices are now shipped with Wi-Fi than with ethernet. There are other protocols each of which has a different MTU (payload, e.g. IP, size).
– Ron Maupin♦
3 hours ago
@RonMaupin, please merge on Network Eng.
– Bhargav Rao
3 hours ago
Terminology please. Maximum length of an Ethernet frame is 1500 bytes. IP packets can span frames in the physical layer. Maximum length of a UDP datagram is 65507 bytes, given by the IP maximum packet size (which is 65535, and not 'about'), less 20 for the IP header, less 8 for the UDP header. The maximum length of a TCP segment is described in 32 bits.
– user207421
11 mins ago
add a comment |
From many tutorials, I get follow knowledge(maybe I'm misunderstood) :
maximum of an Ethernet packet is about 1500 bytes.
maximum of an IP packet is about 65535 bytes.
maximum of a UDP packet is 65515 bytes
But when I made a test and watch Wireshark, I get a different answer.
- I try to send some big data with TCP protocol.
Socket con = new Socket("localhost", 8088);
OutputStream os = con.getOutputStream();
StringBuilder s = new StringBuilder();
for( int i = 0; i < 10000; i++) {
s.append("Hello world");
}
// about 110k bytes
byte[] data = s.toString().getBytes();
os.write(data);
os.close();
con.close();
This is my Java code (it's not necessary to understand this.), I try to send 110k bytes data with a TCP connection. This is my Wireshark.
My 110k bytes message is split to 7 packets, I think this shows that maximum length of a TCP packet is 16388 bytes.
- Then, I try to send a UDP packet:
DatagramSocket client = new DatagramSocket(50555);
StringBuilder s = new StringBuilder();
for( int i = 0; i < 10000; i++) {
s.append("Hello world");
}
// 110k bytes
byte[] data = s.toString().getBytes();
int messageLength = data.length;
for (; ; messageLength--){
try{
DatagramPacket packet = new DatagramPacket(data, messageLength,
new InetSocketAddress("localhost", 8088));
// If packet is still too lang, above line will throws an exception
// If there is not any exception, means we can send this packet
// and this messageLength is the limit value for a UDP packet.
client.send(packet);
System.out.println("message length is " + messageLength);
// break for loop
break;
} catch(Exception e){
// fail to send and continue for loop
}
}
client.close();
the result ismessage length is 65507
.
I was really confused:
IP protocol build on Ethernet or something, Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?
Why an TCP packet is only 16388 bytes?
Then I have read many post on SOF or other websites, But I don't get an answer, I think is not duplicate to others.
ip ethernet tcp udp
New contributor
From many tutorials, I get follow knowledge(maybe I'm misunderstood) :
maximum of an Ethernet packet is about 1500 bytes.
maximum of an IP packet is about 65535 bytes.
maximum of a UDP packet is 65515 bytes
But when I made a test and watch Wireshark, I get a different answer.
- I try to send some big data with TCP protocol.
Socket con = new Socket("localhost", 8088);
OutputStream os = con.getOutputStream();
StringBuilder s = new StringBuilder();
for( int i = 0; i < 10000; i++) {
s.append("Hello world");
}
// about 110k bytes
byte[] data = s.toString().getBytes();
os.write(data);
os.close();
con.close();
This is my Java code (it's not necessary to understand this.), I try to send 110k bytes data with a TCP connection. This is my Wireshark.
My 110k bytes message is split to 7 packets, I think this shows that maximum length of a TCP packet is 16388 bytes.
- Then, I try to send a UDP packet:
DatagramSocket client = new DatagramSocket(50555);
StringBuilder s = new StringBuilder();
for( int i = 0; i < 10000; i++) {
s.append("Hello world");
}
// 110k bytes
byte[] data = s.toString().getBytes();
int messageLength = data.length;
for (; ; messageLength--){
try{
DatagramPacket packet = new DatagramPacket(data, messageLength,
new InetSocketAddress("localhost", 8088));
// If packet is still too lang, above line will throws an exception
// If there is not any exception, means we can send this packet
// and this messageLength is the limit value for a UDP packet.
client.send(packet);
System.out.println("message length is " + messageLength);
// break for loop
break;
} catch(Exception e){
// fail to send and continue for loop
}
}
client.close();
the result ismessage length is 65507
.
I was really confused:
IP protocol build on Ethernet or something, Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?
Why an TCP packet is only 16388 bytes?
Then I have read many post on SOF or other websites, But I don't get an answer, I think is not duplicate to others.
ip ethernet tcp udp
ip ethernet tcp udp
New contributor
New contributor
edited 1 hour ago
Cown
6,26131030
6,26131030
New contributor
asked 3 hours ago
saltfishsaltfish
1161
1161
New contributor
New contributor
"Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?" Ethernet is not the only data-link protocol that can carry IP. More devices are now shipped with Wi-Fi than with ethernet. There are other protocols each of which has a different MTU (payload, e.g. IP, size).
– Ron Maupin♦
3 hours ago
@RonMaupin, please merge on Network Eng.
– Bhargav Rao
3 hours ago
Terminology please. Maximum length of an Ethernet frame is 1500 bytes. IP packets can span frames in the physical layer. Maximum length of a UDP datagram is 65507 bytes, given by the IP maximum packet size (which is 65535, and not 'about'), less 20 for the IP header, less 8 for the UDP header. The maximum length of a TCP segment is described in 32 bits.
– user207421
11 mins ago
add a comment |
"Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?" Ethernet is not the only data-link protocol that can carry IP. More devices are now shipped with Wi-Fi than with ethernet. There are other protocols each of which has a different MTU (payload, e.g. IP, size).
– Ron Maupin♦
3 hours ago
@RonMaupin, please merge on Network Eng.
– Bhargav Rao
3 hours ago
Terminology please. Maximum length of an Ethernet frame is 1500 bytes. IP packets can span frames in the physical layer. Maximum length of a UDP datagram is 65507 bytes, given by the IP maximum packet size (which is 65535, and not 'about'), less 20 for the IP header, less 8 for the UDP header. The maximum length of a TCP segment is described in 32 bits.
– user207421
11 mins ago
"Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?" Ethernet is not the only data-link protocol that can carry IP. More devices are now shipped with Wi-Fi than with ethernet. There are other protocols each of which has a different MTU (payload, e.g. IP, size).
– Ron Maupin♦
3 hours ago
"Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?" Ethernet is not the only data-link protocol that can carry IP. More devices are now shipped with Wi-Fi than with ethernet. There are other protocols each of which has a different MTU (payload, e.g. IP, size).
– Ron Maupin♦
3 hours ago
@RonMaupin, please merge on Network Eng.
– Bhargav Rao
3 hours ago
@RonMaupin, please merge on Network Eng.
– Bhargav Rao
3 hours ago
Terminology please. Maximum length of an Ethernet frame is 1500 bytes. IP packets can span frames in the physical layer. Maximum length of a UDP datagram is 65507 bytes, given by the IP maximum packet size (which is 65535, and not 'about'), less 20 for the IP header, less 8 for the UDP header. The maximum length of a TCP segment is described in 32 bits.
– user207421
11 mins ago
Terminology please. Maximum length of an Ethernet frame is 1500 bytes. IP packets can span frames in the physical layer. Maximum length of a UDP datagram is 65507 bytes, given by the IP maximum packet size (which is 65535, and not 'about'), less 20 for the IP header, less 8 for the UDP header. The maximum length of a TCP segment is described in 32 bits.
– user207421
11 mins ago
add a comment |
2 Answers
2
active
oldest
votes
IP protocol build on Ethernet or something, Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?
Ethernet is one of several physical layers which can be used to to transport IP (and also protocols besides IP). The size of the packet a physical layer can transport is specific to this physical layer, other physical layers have other properties. Note that in your specific case of communicating on localhost (127.0.0.1) no physical layer (and thus no ethernet) is involved at all since localhost is just a logical but not a physical network interface.
The 65535 bytes limit in IP is because the length field in the IP header is only 16 bit.
Why an TCP packet is only 16388 bytes?
The applications sends data to the OS kernel which then packetizes the data. The size of the data which can be send to the kernel at once depend on the size of the socket buffer which results in the packet size you see. Additionally the kernel might further split the data to best fit the maximum size of the underlying physical layer (like ethernet). With TCP the kernel might also decide to join small data so that they get transmitted together.
Note that for TCP the packet length on the wire is actually irrelevant for the application since TCP is a continuous data stream. With UDP this would be different, i.e. every send
would result in a single IP message and would also be received as such single message by the recipient.
add a comment |
Different data-link protocols were designed by different people at different times, and they each have their own MTU (maximum payload size). Ethernet was a college thesis for Bob Metcalfe, and it was designed with a 1500 octet MTU. This was about the time (1970s) that the predecessor for IP was being created by Vint Cerf. I seriously doubt either even knew the other or what the other was working on, and it is certain that neither knew that the other would become dominant, even after they were made products (ethernet in 1980 and IPv4 in 1981). Other people and other companies developed other data-link protocols, each with a different MTU specified by the protocol designer.
IP, and other network protocols, are the payload of the data-link protocol, so IP packets must fit inside the payload (MTU) of the data-link protocol. IP was designed with its maximum packet size because it was fast and easy to use a 16-bit number for the packet size. IPv4 has a 20 to 60 octet header that you must subtract from the packet size. IPv6 has a 40 octet header, and possible option headers.
A transport protocol, such as UDP or TCP is the payload of the network protocol. UDP has a datagram header size of 8 octets, and TCP has a segment header of at least 20 octets.
The network protocol and transport protocol headers must be subtracted from the data-link protocol MTU to arrive at the maximum amount of application data that can be transported inside a data-link frame. That would include any application-layer protocol, e.g. HTTP.
I guess the part that you are missing is that network protocols were basically all developed independently, by different people, with different ideas, at different times. What we use today are the protocols that became dominant over the years, for one reason or another. Many of these protocols have nothing to do with each other. For example, ethernet can carry any number of network protocols (IPv4, IPX, AppleTalk, IPv6, etc., ethernet was primarily used for IPX for years, which has nothing to do with IP), and neither IP version (IPv4 and IPv6) cares which data-link protocol (ethernet, Wi-Fi, ARCNET, token ring, FDDI, frame relay, HDLC, PPP, ATM, etc.) carries it.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "496"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
saltfish is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fnetworkengineering.stackexchange.com%2fquestions%2f57211%2fwhy-maximum-length-of-ip-tcp-udp-packet-is-not-suit%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
IP protocol build on Ethernet or something, Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?
Ethernet is one of several physical layers which can be used to to transport IP (and also protocols besides IP). The size of the packet a physical layer can transport is specific to this physical layer, other physical layers have other properties. Note that in your specific case of communicating on localhost (127.0.0.1) no physical layer (and thus no ethernet) is involved at all since localhost is just a logical but not a physical network interface.
The 65535 bytes limit in IP is because the length field in the IP header is only 16 bit.
Why an TCP packet is only 16388 bytes?
The applications sends data to the OS kernel which then packetizes the data. The size of the data which can be send to the kernel at once depend on the size of the socket buffer which results in the packet size you see. Additionally the kernel might further split the data to best fit the maximum size of the underlying physical layer (like ethernet). With TCP the kernel might also decide to join small data so that they get transmitted together.
Note that for TCP the packet length on the wire is actually irrelevant for the application since TCP is a continuous data stream. With UDP this would be different, i.e. every send
would result in a single IP message and would also be received as such single message by the recipient.
add a comment |
IP protocol build on Ethernet or something, Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?
Ethernet is one of several physical layers which can be used to to transport IP (and also protocols besides IP). The size of the packet a physical layer can transport is specific to this physical layer, other physical layers have other properties. Note that in your specific case of communicating on localhost (127.0.0.1) no physical layer (and thus no ethernet) is involved at all since localhost is just a logical but not a physical network interface.
The 65535 bytes limit in IP is because the length field in the IP header is only 16 bit.
Why an TCP packet is only 16388 bytes?
The applications sends data to the OS kernel which then packetizes the data. The size of the data which can be send to the kernel at once depend on the size of the socket buffer which results in the packet size you see. Additionally the kernel might further split the data to best fit the maximum size of the underlying physical layer (like ethernet). With TCP the kernel might also decide to join small data so that they get transmitted together.
Note that for TCP the packet length on the wire is actually irrelevant for the application since TCP is a continuous data stream. With UDP this would be different, i.e. every send
would result in a single IP message and would also be received as such single message by the recipient.
add a comment |
IP protocol build on Ethernet or something, Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?
Ethernet is one of several physical layers which can be used to to transport IP (and also protocols besides IP). The size of the packet a physical layer can transport is specific to this physical layer, other physical layers have other properties. Note that in your specific case of communicating on localhost (127.0.0.1) no physical layer (and thus no ethernet) is involved at all since localhost is just a logical but not a physical network interface.
The 65535 bytes limit in IP is because the length field in the IP header is only 16 bit.
Why an TCP packet is only 16388 bytes?
The applications sends data to the OS kernel which then packetizes the data. The size of the data which can be send to the kernel at once depend on the size of the socket buffer which results in the packet size you see. Additionally the kernel might further split the data to best fit the maximum size of the underlying physical layer (like ethernet). With TCP the kernel might also decide to join small data so that they get transmitted together.
Note that for TCP the packet length on the wire is actually irrelevant for the application since TCP is a continuous data stream. With UDP this would be different, i.e. every send
would result in a single IP message and would also be received as such single message by the recipient.
IP protocol build on Ethernet or something, Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?
Ethernet is one of several physical layers which can be used to to transport IP (and also protocols besides IP). The size of the packet a physical layer can transport is specific to this physical layer, other physical layers have other properties. Note that in your specific case of communicating on localhost (127.0.0.1) no physical layer (and thus no ethernet) is involved at all since localhost is just a logical but not a physical network interface.
The 65535 bytes limit in IP is because the length field in the IP header is only 16 bit.
Why an TCP packet is only 16388 bytes?
The applications sends data to the OS kernel which then packetizes the data. The size of the data which can be send to the kernel at once depend on the size of the socket buffer which results in the packet size you see. Additionally the kernel might further split the data to best fit the maximum size of the underlying physical layer (like ethernet). With TCP the kernel might also decide to join small data so that they get transmitted together.
Note that for TCP the packet length on the wire is actually irrelevant for the application since TCP is a continuous data stream. With UDP this would be different, i.e. every send
would result in a single IP message and would also be received as such single message by the recipient.
answered 3 hours ago
Steffen UllrichSteffen Ullrich
1,16868
1,16868
add a comment |
add a comment |
Different data-link protocols were designed by different people at different times, and they each have their own MTU (maximum payload size). Ethernet was a college thesis for Bob Metcalfe, and it was designed with a 1500 octet MTU. This was about the time (1970s) that the predecessor for IP was being created by Vint Cerf. I seriously doubt either even knew the other or what the other was working on, and it is certain that neither knew that the other would become dominant, even after they were made products (ethernet in 1980 and IPv4 in 1981). Other people and other companies developed other data-link protocols, each with a different MTU specified by the protocol designer.
IP, and other network protocols, are the payload of the data-link protocol, so IP packets must fit inside the payload (MTU) of the data-link protocol. IP was designed with its maximum packet size because it was fast and easy to use a 16-bit number for the packet size. IPv4 has a 20 to 60 octet header that you must subtract from the packet size. IPv6 has a 40 octet header, and possible option headers.
A transport protocol, such as UDP or TCP is the payload of the network protocol. UDP has a datagram header size of 8 octets, and TCP has a segment header of at least 20 octets.
The network protocol and transport protocol headers must be subtracted from the data-link protocol MTU to arrive at the maximum amount of application data that can be transported inside a data-link frame. That would include any application-layer protocol, e.g. HTTP.
I guess the part that you are missing is that network protocols were basically all developed independently, by different people, with different ideas, at different times. What we use today are the protocols that became dominant over the years, for one reason or another. Many of these protocols have nothing to do with each other. For example, ethernet can carry any number of network protocols (IPv4, IPX, AppleTalk, IPv6, etc., ethernet was primarily used for IPX for years, which has nothing to do with IP), and neither IP version (IPv4 and IPv6) cares which data-link protocol (ethernet, Wi-Fi, ARCNET, token ring, FDDI, frame relay, HDLC, PPP, ATM, etc.) carries it.
add a comment |
Different data-link protocols were designed by different people at different times, and they each have their own MTU (maximum payload size). Ethernet was a college thesis for Bob Metcalfe, and it was designed with a 1500 octet MTU. This was about the time (1970s) that the predecessor for IP was being created by Vint Cerf. I seriously doubt either even knew the other or what the other was working on, and it is certain that neither knew that the other would become dominant, even after they were made products (ethernet in 1980 and IPv4 in 1981). Other people and other companies developed other data-link protocols, each with a different MTU specified by the protocol designer.
IP, and other network protocols, are the payload of the data-link protocol, so IP packets must fit inside the payload (MTU) of the data-link protocol. IP was designed with its maximum packet size because it was fast and easy to use a 16-bit number for the packet size. IPv4 has a 20 to 60 octet header that you must subtract from the packet size. IPv6 has a 40 octet header, and possible option headers.
A transport protocol, such as UDP or TCP is the payload of the network protocol. UDP has a datagram header size of 8 octets, and TCP has a segment header of at least 20 octets.
The network protocol and transport protocol headers must be subtracted from the data-link protocol MTU to arrive at the maximum amount of application data that can be transported inside a data-link frame. That would include any application-layer protocol, e.g. HTTP.
I guess the part that you are missing is that network protocols were basically all developed independently, by different people, with different ideas, at different times. What we use today are the protocols that became dominant over the years, for one reason or another. Many of these protocols have nothing to do with each other. For example, ethernet can carry any number of network protocols (IPv4, IPX, AppleTalk, IPv6, etc., ethernet was primarily used for IPX for years, which has nothing to do with IP), and neither IP version (IPv4 and IPv6) cares which data-link protocol (ethernet, Wi-Fi, ARCNET, token ring, FDDI, frame relay, HDLC, PPP, ATM, etc.) carries it.
add a comment |
Different data-link protocols were designed by different people at different times, and they each have their own MTU (maximum payload size). Ethernet was a college thesis for Bob Metcalfe, and it was designed with a 1500 octet MTU. This was about the time (1970s) that the predecessor for IP was being created by Vint Cerf. I seriously doubt either even knew the other or what the other was working on, and it is certain that neither knew that the other would become dominant, even after they were made products (ethernet in 1980 and IPv4 in 1981). Other people and other companies developed other data-link protocols, each with a different MTU specified by the protocol designer.
IP, and other network protocols, are the payload of the data-link protocol, so IP packets must fit inside the payload (MTU) of the data-link protocol. IP was designed with its maximum packet size because it was fast and easy to use a 16-bit number for the packet size. IPv4 has a 20 to 60 octet header that you must subtract from the packet size. IPv6 has a 40 octet header, and possible option headers.
A transport protocol, such as UDP or TCP is the payload of the network protocol. UDP has a datagram header size of 8 octets, and TCP has a segment header of at least 20 octets.
The network protocol and transport protocol headers must be subtracted from the data-link protocol MTU to arrive at the maximum amount of application data that can be transported inside a data-link frame. That would include any application-layer protocol, e.g. HTTP.
I guess the part that you are missing is that network protocols were basically all developed independently, by different people, with different ideas, at different times. What we use today are the protocols that became dominant over the years, for one reason or another. Many of these protocols have nothing to do with each other. For example, ethernet can carry any number of network protocols (IPv4, IPX, AppleTalk, IPv6, etc., ethernet was primarily used for IPX for years, which has nothing to do with IP), and neither IP version (IPv4 and IPv6) cares which data-link protocol (ethernet, Wi-Fi, ARCNET, token ring, FDDI, frame relay, HDLC, PPP, ATM, etc.) carries it.
Different data-link protocols were designed by different people at different times, and they each have their own MTU (maximum payload size). Ethernet was a college thesis for Bob Metcalfe, and it was designed with a 1500 octet MTU. This was about the time (1970s) that the predecessor for IP was being created by Vint Cerf. I seriously doubt either even knew the other or what the other was working on, and it is certain that neither knew that the other would become dominant, even after they were made products (ethernet in 1980 and IPv4 in 1981). Other people and other companies developed other data-link protocols, each with a different MTU specified by the protocol designer.
IP, and other network protocols, are the payload of the data-link protocol, so IP packets must fit inside the payload (MTU) of the data-link protocol. IP was designed with its maximum packet size because it was fast and easy to use a 16-bit number for the packet size. IPv4 has a 20 to 60 octet header that you must subtract from the packet size. IPv6 has a 40 octet header, and possible option headers.
A transport protocol, such as UDP or TCP is the payload of the network protocol. UDP has a datagram header size of 8 octets, and TCP has a segment header of at least 20 octets.
The network protocol and transport protocol headers must be subtracted from the data-link protocol MTU to arrive at the maximum amount of application data that can be transported inside a data-link frame. That would include any application-layer protocol, e.g. HTTP.
I guess the part that you are missing is that network protocols were basically all developed independently, by different people, with different ideas, at different times. What we use today are the protocols that became dominant over the years, for one reason or another. Many of these protocols have nothing to do with each other. For example, ethernet can carry any number of network protocols (IPv4, IPX, AppleTalk, IPv6, etc., ethernet was primarily used for IPX for years, which has nothing to do with IP), and neither IP version (IPv4 and IPv6) cares which data-link protocol (ethernet, Wi-Fi, ARCNET, token ring, FDDI, frame relay, HDLC, PPP, ATM, etc.) carries it.
edited 55 mins ago
answered 3 hours ago
Ron Maupin♦Ron Maupin
66k1369123
66k1369123
add a comment |
add a comment |
saltfish is a new contributor. Be nice, and check out our Code of Conduct.
saltfish is a new contributor. Be nice, and check out our Code of Conduct.
saltfish is a new contributor. Be nice, and check out our Code of Conduct.
saltfish is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Network Engineering Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fnetworkengineering.stackexchange.com%2fquestions%2f57211%2fwhy-maximum-length-of-ip-tcp-udp-packet-is-not-suit%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
"Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes?" Ethernet is not the only data-link protocol that can carry IP. More devices are now shipped with Wi-Fi than with ethernet. There are other protocols each of which has a different MTU (payload, e.g. IP, size).
– Ron Maupin♦
3 hours ago
@RonMaupin, please merge on Network Eng.
– Bhargav Rao
3 hours ago
Terminology please. Maximum length of an Ethernet frame is 1500 bytes. IP packets can span frames in the physical layer. Maximum length of a UDP datagram is 65507 bytes, given by the IP maximum packet size (which is 65535, and not 'about'), less 20 for the IP header, less 8 for the UDP header. The maximum length of a TCP segment is described in 32 bits.
– user207421
11 mins ago