Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

udp client: destination port unreachable question

Thread view: 
vlyamtsev@gmail.com - 13 May 2007 02:59 GMT
Hello,
My question is concerned with java.net package. I used trivial
UDPClient example to send datagrams from local interface eth1 on Linux
to the ip host not included into local route table and I tried to
capture outgoing udp traffic on interface eth1. I've got IOException
"ICMP: destination unreachable" and I only could capture outgoing
packets on loopback interface ( with Ethereal). Can someone help to
resolve my confusion:  I thought UDP is "connectionless", e.g. will be
sent regardless. What does ICMP have to do with it and why does this
traffic appear on loopback interface?
Thank you,
Esmond Pitt - 13 May 2007 04:53 GMT
> Hello,
> My question is concerned with java.net package. I used trivial
[quoted text clipped - 6 lines]
> sent regardless. What does ICMP have to do with it and why does this
> traffic appear on loopback interface?

err, because the destination host is unreachable? Where would you expect
UDP to send the packet *to* if there is no unicast route to the target?

You get the ICMP response if you have used DatagramSocket.connect(). If
you avoid that and put the destination address into the DatagramPacket,
you won't get the exception, but the packet still won't go out as there
is no unicast route. If that's what you want.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.