213

Break down the handshake into what it is really doing. In TCP, the two parties keep track of what they have sent by using a Sequence number. Effectively it ends up being a running byte count of everything that was sent. The receiving party can use the opposite speaker's sequence number to acknowledge what it has received. But the sequence number doesn't ...


61

Interesting perspective and question! Yes, most of what UDP does is supply a standard means for multiple applications to co-exist using the same IP address, by defining the concept of UDP ports. The exciting part about UDP isn't so much the network protocol but the API implemented by operating systems and socket libraries. While not part of the UDP ...


53

One of the ideas around IPv6 was to speed up packet forwarding. To that end, several decisions were made. For example, the IPv6 header was greatly simplified and is a fixed length, unlike the variable length IPv4 header. Also, you cannot fragment IPv6 packets along the path, the way you can for IPv4, because packet fragmentation is resource intensive. Not ...


47

UDP is a transport protocol, like TCP. That means it provides a protocol for an application to use IP. Like TCP, UDP has addressing (ports) to which applications bind so that datagrams destined to bound applications get sent by UDP to the correct applications. UDP for IPv4 also provides an optional checksum, but the checksum is required for IPv6. UDP is a ...


40

Am I right in saying that an Ethernet frame MTU is 1526 while the MTU at the IP layer is 1500? The Ethernet MTU is 1500 bytes, meaning the largest IP packet (or some other payload) an Ethernet frame can contain is 1500 bytes. Adding 26 bytes for the Ethernet header results in a maximum frame (not the same as MTU) of 1526 bytes. Does the MTU change at ...


31

The receiver has to look at the Ethernet frame to decide its contents, which might be DECnet, Appletalk or many other things -- Internet Protocol is only one of many protocols running on top of Ethernet. When Ethernet was being designed, it wasn't obvious at all what protocols might exist in the future, and the winner-take-all effect wasn't obviously so ...


30

The reason for the ACK is that a NACK is simply not sufficient. Let's say I send you a data stream of X segments (let's say 10 for simplicity). You are on a bad connection, and only receive segments 1, 2, 4, and 5. Your computer sends the NACK for segment 3, but doesn't realize there should be segments 6-10 and does not NACK those. So, I resend segment 3,...


28

The short answer is no, that's not the limit. A TCP Port field is 2x bytes and holds a quantity of 65536. This number limits the amount of addresses a server can have. But this doesn't limit the number of clients to ~64k. Each TCP Packet has two Port fields one for the destination and one for the source (as well as two IP addresses). A given TCP ...


27

If you are asking in a general sense, then the answer is most definitely "yes", any HTTP method (like POST) requires a TCP connection, and the only way to initiate a TCP connection is to use the three way handshake. IF, however, you are asking in a specific case, maybe if you are capturing your own traffic and don't see the 3 way handshake after ...


26

The three-way handshake is necessary because both parties need to synchronize their segment sequence numbers used during their transmission. For this, each of them sends (in turn) a SYN segment with a sequence number set to a random value n, which then is acknowledged by the other party via a ACK segment with a sequence number set to n+1.


26

The TCP window size is generally independent of the maximum segment size which depends on the maximum transfer unit which in turn depends on the maximum frame size. Let's start low. The maximum frame size is the largest frame a network (segment) can transport. For Ethernet, this is 1518 bytes by definition. The frame encapsulates an IP packet, so the largest ...


25

Because it's redundant. All the common link-layer protocols, like Ethernet or WiFi, have their own error checking and error correction mechanisms, so physical transmission errors are already unlikely. What's left are logic errors in the packet itself. But almost all transport protocols based on IPv6, like TCP or UDP, also have error checking to catch ...


24

In order for the connection to work, each side needs to verify that it can send packets to the other side. The only way to be sure that you got a packet to the other side is by getting a packet from them that, by definition, would not have been sent unless the packet you sent got through. TCP essentially uses two kinds of messages for this: SYN (to request ...


24

This part of the RFC is about passing responsibility over to the operating system or whatever is the next stage of the process. It's fundamentally concerned with the separation of layers. An acknowledgment by TCP does not guarantee that the data has been delivered to the end user, but only that the receiving TCP has taken the responsibility to do so. I ...


23

Here's a link to a Hangout with Vint Cerf (Apr. 2014) where he explains how he thought that this internet was supposed to be an experiment only: As we were thinking about the Internet (thinking well, this is going to be some arbitrary number of networks all interconnected — we don't know how many and we don't know how they'll be connected), but ...


23

The round trip time is not actually stored anywhere. The sending host remembers the time it sends each ICMP Echo Request message, using ICMP's 16-bit identifier and sequence fields. When it gets the ICMP Echo Reply, it notes the current time, finds the time it sent the matching Request packet identified by the reply, calculates the difference, and reports ...


22

One of my buddies is saying that TCP will be a problem for this gateway because it is going to establish a new connection for every message it sends (not kafka but the underlying transportation protocol itself is the issue), requiring a new port each time. At the rate we'll be sending these clients messages (gigabytes), kafka will run out of ports to read ...


22

:: is the unspecified address (0:0:0:0:0:0:0:0), and it is only used in packets as the source address of a host that does not yet have an address and is trying to get an address assigned. What you see in the output means that a process is binding to port 8100 for all destination addresses in the host. ::1 is the loopback address (0:0:0:0:0:0:0:1), and ...


20

In a wired CSMA/CD Ethernet environment, it is possible to detect a collision because there are separate TX and RX pairs (using the example of 10BaseT). If a half-duplex 10BaseT NIC sends a frame on the TX pair, but sees that frame is corrupted on the RX pair, the NIC detected a collision. However, with an 802.11 wireless device, there are no "conductors," ...


20

You might care to read RFC 1547 "Requirements for an Internet Standard Point-to-Point Protocol" which explains how the PPP was chosen. The thing I'd suggest you are missing is that interoperability is one of the principal driving forces in the internet protocols, and efficiency is much less important. You do the highly talented engineers who ...


19

802.3 (which uses 802.2 LLC format) has a Length field in the same place that Ethernet II has a Type field. IEEE 802.3 with 802.2 LLC (used by Spanning-Tree, ISIS) use the highlighted bytes for a Length field. 802.3 Upper-layer protocols are decoded via the 802.2 LLC Header / SNAP bytes. The SNAP bytes are used to decode protocols using traditional ...


19

Avoidance is used for the very simple fact that every radio ("client") is not necessarily in range of each other. Thus, without the AP coordinating who can talk, distant radios may step on each other because they cannot know the other is transmitting.


19

RFC 4291 provides instructions on how to create the EUI64 address: Links or Nodes with IEEE 802 48-bit MACs [EUI64] defines a method to create an IEEE EUI-64 identifier from an IEEE 48-bit MAC identifier. This is to insert two octets, with hexadecimal values of 0xFF and 0xFE (see the Note at the end of appendix), in the middle of the 48-bit MAC (between ...


19

The reasons for half-duplex ethernet are as you understand them. In fact, there was a movement to not include half-duplex for 1000Base-T, but it still made it into the standard. For 10 Gb ethernet, half-duplex was dropped so there is no such thing as 10 Gbps half-duplex ethernet as a standard. Unless you still have a hub (they are still around) or a ...


17

You may notice that two least-significant bits of the most-significant byte of a 48-bit MAC address are usually set to 0 (as in all your examples). There are two flags in the most-significant byte of the OUI (Organizationally Unique Identifier, which are the most-significant 24-bits) part of the MAC address: The least-significant bit is the I/G (Individual/...


16

On most hardware/platforms, the Ethernet checksum is handled by the NIC before it's passed up to Wireshark. There's no way (or really any reason) to pass this up to higher layers because of the fact that the NIC does this in hardware, unless you've coded the hardware/driver to behave this way. Refer to the Ethernet wiki on wiki.wireshark.org for more ...


16

The Internet Protocol (IP) is defined in RFC 791. The RFC specifies the format of the IP header. In the header there is the IHL (Internet Header Length) field which is 4 bits long and specifies the header length in 32 bit words. The IHL field can hold values from 0 (Binary 0000) to 15 (Binary 1111). So the longest Internet Header (IP header) size can be 15*...


15

Although ytti answered, there are some relevant details you may be interested in... How can someone distinguish between different packets in the Ethernet protocol? It has no "length" field/area as higher-level protocols use to do so. Actually ethernet has multiple encapsulations: Ethernet II (Typically used for IP, as specified in [RFC 894], is the most ...


15

which peer will send the open message first? Normally, the speaker that opens the socket sends the first OPEN message. But it actually doesn't matter (ref the DelayOpen timer), because BGP also provides a way to delay the OPEN message so the opposite peer can send first: Option 1: DelayOpen Description: The DelayOpen optional session attribute ...


Only top voted, non community-wiki answers of a minimum length are eligible