Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!seismo!uunet!olivea!samsung!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.protocols.tcp-ip Subject: Re: why UDP send ICMP port unreachable message? Message-ID: <1991Mar2.052400.26314@Think.COM> Date: 2 Mar 91 05:24:00 GMT References: <9103011243.AA10028@ucbvax.Berkeley.EDU> Sender: news@Think.COM Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 23 In article <9103011243.AA10028@ucbvax.Berkeley.EDU> TAYBENGH@NUSDISCS.BITNET writes: >I am puzzled of >the purpose of ICMP Port Unreachable error message sent by UDP that appeared >in the routine udp_input(). Others have already given adequate answers to this question (I am quite disheartened if the assertion that the port unreachable message is sent to all sockets connected to the host that sent the ICMP, i.e. that it doesn't restrict it to sockets connected to the unreachable port). > Also did TCP use this message to inform the client when it tries to >initiate a connection to a non-existent server? TCP doesn't use ICMP Port Unreachable. Instead, the remote host responds to the SYN with a RST instead of a SYN. UDP needs to use ICMP because there is no built-in handshake in the protocol, whereas TCP uses a handshake to establish a connection and can include the error report as part of the handshake. -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar