That would still be wrong. The two way communication is a feature of TCP. I think the best answer, which I am not clever enough to come up with would be riffing on "dp to me"
it would be correct if the application request it again, or some inner communication channel with tcp for example. vpn is a good example, it mostly uses udp since the inner communication should be responsible, tcp or the application itself
That's not correct. It does know it hasn't received it. For example tftp uses UDP. Itvsends an ACK packet for each packet it receives. The server only send the next packet after the confirmation acknowledgement. (Tftp is very slow over high latency links). It it does receive a packet within a certain time it send the last ack packet. So server knows it never got it and send it again.
I.e. all of this is done at the application level unlike in TCP which it's done at the transport later.
Each application using UDP can do it a little differently but overall a similar approach.
Manually building your own ACK/resend system on top of UDP does not mean "UDP knows it missed something."
UDP, as a protocol, just shouts shit into the void and hopes someone hears it. Yes you can devise your own system for having your applications shout at each other that makes sure data doesn't get dropped, but that isn't the same thing as it just being a native feature of UDP like it is for TCP.
That is not how anything works. If you need to know that your data arrived you use TCP, not UDP with some hacky application layer bullshit that emulates TCP lol
Also I guess both the message erring, then the checksum error ingredients so it matches the error edit message, is so astronomically unlikely to happen it has never happened.
I scrolled past this post and then went.... Wait a minute. UDP wouldn't respond so this punchline sucks. Came back to look at the comments and wasn't disappointed.
I know that, but if you look at the level of understanding in the comments, it doent even matter. I just let it pass because the receiver said "not ALL of that", which is communicated in modern TCP
Unless you have the SACK option which most modern stacks do support. In that case, the receiver will send a SACK for segments they did receive if they have received later segments even if they missed an earlier one, then the transmitter can selectively retransmit only the missed segments.
Is it transport layer security because it's inside the transport layer, or because it protects the data inside the transport layer?(Envelope type of thing)
It is in the transport layer. From layers above there is no difference if TLS is used or not. A TCP connection with TLS is treated the same as a standard TCP connection. TLS is often build into user space but that isn't necessary.
E.g.: there is no reason that the kernel couldn't handle all.of TLS just like plain TCP.
Furthermore the layer isn't a matter of where it is implemented. E.g. Browsers implement QUIC in userspace but it is Layer 4.
Maybe Im just bad at understanding, but to me that's like anything that every transports something over any kind of protocol is then transport layer? As long as it's abstraction is "transparent" to the one using it? I mean, quic is not transparent to UDP, you can't just sent bytes and assume it works, you need the windows to be correct and the signatures, a connection IDs etc. Which IMO is application layer, as the internals of the transport quic are transported via UDP and re-assembled on the other side, not via router UDP package assembly, but via userspace packet handling.
You probably wouldn’t use UDP if there’s anything important to miss. It’s meant for traffic where the latest state is gold, like multiplayer games, video calls etc.
But an application can have its own retry mechanism when using UDP with its own rules. Like sometimes old data is important, but not important enough to block the rest of transmission like TCP does.
The app won't surely know anything, because it's not built into the protocol. You can technically make UDP seem mostly sort of like TCP with a bunch of extra shims in compute, but that has nothing to do with the protocol used.
Also, Layer 5 is Session layer, where stream connections are managed. Layer 7 is application, where additional logic would need to be added to get UDP to pretend to have reliability. There are elements at layer 4 that would be used for implementing the sequencing needed, but app code would actually perform the handling. As per the name, the Session layer just ensure reliability for the connected session itself and not the individual packets.
And obligatory acknowledgement that the OSI model is just a model.
Not necessarily and they didn't ask about another protocol, they ask about UDP. The Interviewer has to stay in this layer if he wants to demonstrate how it works.
UDP doesn't have error correction, but that doesn't mean you can't request the data a second time. You can run nslookup against a DNS server however many times you want.
That's how most people interact with UDP though. Explaining something doesn't only mean saying how it works, you can also explain how it's used, the general idea behind it, or how it relates to similar things.
The mechanics of a pair of scissors doesn't include paper, but I'd bet 80%+ of people you asked on the street to "explain scissors" would use the word paper.
In fairness I think even UDP will respond with an error if you request something it cannot provide or parse. It's only once you make a successful request for data that it stops listening to you.
" It does not make any guarantee of successful delivery, indicate the original ordering, or detect duplication, thus exposing the user's program to any unreliability of the underlying network. It also provides no feedback to the sender ." https://en.wikipedia.org/wiki/User_Datagram_Protocol
UDP doesnt have connections and TCP sends RST also for non existing connections on a open port.
The whole thing falls apart because a UDP packet wount end up in the TCP Stack. If a packet with TCP proto is sent with UDP structure it wouldnt decode correctly and be dropped. Your scenario has no technical foundation.
I dont think there is a deeper layer. The canidate failed to understand the protocol. What we dont know is if the creator intended the canidate to pass or fail
This Is not my original joke, I just remembered hearing it years ago.
The last time I deep dived into this was trying to figure out why I'd randomly get instantly disconnected from WoW while everything else kept working. I ended up getting escalated up to an actual engineer at Blizzard when I discovered via Wireshark that incoming packets were randomly being flagged FIN; I.e. the server was literally hanging up on me mid-conversation. I ended up emailing them actual packet logs.
They have already established a connection as the handshake at the first contact. So basically there is no point in demonstrating UDP in an interview. Your point also hints at why people in the comments are confused.
Doesn't have to. You can, for example, send a DNS request on port 53 UDP and get back a response (also UDP) that tells you that you can't get that information (eg SERVFAIL). Though, if you asked for *too much* information, then the correct response is to switch to TCP, so in a very different sense, it would in fact become TCP.
Stands for User Datagram Protocol. It is a communication protocol which, unlike TCP, does not require your to set up data paths. Instead of confirming everything you send and receive you just send and don't worry about how it gets there.
It is faster since it avoids a lot of overhead but it is also more prone to errors if the connection is unreliable. It is possible for example for packages to arrive out of order.
It's much more common to go the other way and run UDP traffic through TCP on port 443 to make it look like HTTPS.
I think I've heard of people obscuring their TCP traffic by making it look like UDP video conferencing to get past some firewalls, but it's far less common.
I see what you mean for busting through firewalls, but VPN tunnels usually use UDP, otherwise connecting to a TCP service would be TCP overtop another layer of TCP, which causes a lot of overhead.
Apparently dropped packets can cause even more issues, causing so called 'TCP meltdown' where both TCP layers are trying to resend the same dropped packet.
I'm imagining being asked this in an interview and proceeding to close my eyes and spin on my chair while saying that I don't care if they understand what I'm saying.
TCP - when the delivery guy walks up to your front door and asks for your signature UDP - when the delivery guy meets the package in the general direction of your house
3.3k
u/Single-Virus4935 1d ago •
And Failed!
That is TCP
1.0k
u/robin_888 1d ago
"Can you explain UDP to me?"
silence "And that's the core concept of UDP."
420
u/winter-m00n 1d ago
there is no repeat in udp, is it?
217
u/Martin-Hatch 1d ago
Interviewer: Can you explain TCP?
Candidate: Can we shake hands first?
239
u/Kidplayer_666 1d ago
“Can you tell me a udp joke?”
“You might not get it”
30
u/TheFel0x 1d ago
This has got to be ragebait.
47
u/GreatArtificeAion 1d ago
Interviewer: Explain UDP to me.
Candidate: Sorry, I may not have gotten all of that. What's your next question?
10
u/Gen_Hospital 1d ago
Technically, they should just wait untill the interviewer repeats themselves, or the interviewer should just ask 3 (or 5) times unprompted.
7
u/sainglend 1d ago
It is the place few Michiganders live.
6
u/robotic_valkyrie 1d ago
Fail!
42
u/qengineer 1d ago
No, the candidate passed. The interviewer was using UDP and refused to repeat themselves.
4
u/regidud 1d ago
I will tell you once, I don't care if you get it
4
u/diadmer 1d ago
My preferred version of this joke is: “I would tell you a joke about UDP, but I can’t be certain you would get it.”
7
u/AtheIstan 1d ago
What's upd?
6
u/sirkubador 1d ago
You definitely can develop tcp on top of udp, it is in fact quite quic
3
u/seabutcher 1d ago
I'm imagining being asked this in an interview and proceeding to close my eyes and spin on my chair while saying that I don't care if they understand what I'm saying.
3
u/cheezballs 1d ago
2400 upvotes and the joke isn't even the right protocol.
3
u/JerryAtrics_ 1d ago
I could tell you a UDP joke, but you might not get it.
3
u/Enverex 1d ago
ProgrammerHumor once again shows that it is indeed, just LARP.
2
u/jshusky 1d ago
These are my network protocol jokes
TCP packet: Id like to order a beer. Bartender: A beer? TCP packet: A beer!
Id try to tell you my UDP joke but im afraid you wouldnt get it.
2
u/dlegatt 1d ago
I’ll tell you a joke about UDP, but I won’t know if you’ll get it.
2
u/wwabc 1d ago
"It's similar to upd, which stands for 'updog'"
2
u/Baardi 22h ago
You're not supposed to respond or aknowledge his existence at all
6
u/cdtoews 1d ago
I once answered this question like this "I'd tell you a joke about UDP, but I'm not sure you'd get it"
1
u/PM-ME-UR-DARKNESS 1d ago
Oh that's funny
1
u/ramriot 1d ago
So a failed interview question either way
1
u/OnceMoreAndAgain 1d ago
You're not the boss of me now and you're not so big.
1
u/caguru 1d ago
Candidate opens conference room door and shouts into open floor plan office: sorry I didn’t get all that. Can you repeat the question?
FTFY
1
u/__Demyan__ 1d ago
Regarding udp jokes, I never care if my audience get them, or not.
1
u/gerbosan 1d ago
Dr Who?
1
u/RyuXnet_7364 1d ago
"DP stands for DeadPool which is a fictional Marvel character."
1
u/Wentyliasz 1d ago
TCP - when the delivery guy walks up to your front door and asks for your signature UDP - when the delivery guy meets the package in the general direction of your house
1
u/matthewsAccount23 1d ago
A jogger saying "Hi" to a passerby without caring if the passerby heard him and responded or no, the jogger keeps on jogging and saying "Hi".
1
u/alwaysasillyplace 1d ago
Also acceptable punchline:
It's been great working with you.
1
u/CoshgunC 10h ago
i don't think UDP would ask "could you repeat again"
1
u/BestBadFriend 4h ago
Throw a handful of salt at the interviewer and yell "catch!"
1
u/Emergency-Soft1301 2h ago
better reply to fit would be like "explain what?" or just nothing at all as udp doesnt care about it, so just say nothing
0
u/ahf95 1d ago
”not much, udp, what’s up with you?”
4
u/NoteBlock08 1d ago
UDP: Unsolicited Dick Pics TCP: Tasteful Consensual Photos