Udp client: destination port unreachable question

Hello,
I used "trivial" UDPClient / Server example to send datagrams from one local interface (eth1) on my Linux box to Datagram server on yhe host not included into local routing 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,

If you are using a specific destination it still has to route.

Similar Messages

  • JTAPI + UDP = ICMP Port Unreachable

    Hi,
    We're writing an IVR application which register itself as a CTI Route Point. This CTI RP has one line, 2000, which receive the external call (PSTN) from a voice gateway. A customer calls 0800 number, then flows thru PSTN->E1->Gateway->CallManager (2000)->CTI RP.
    JTAPI triggers an incoming call event (TermConnRingingEv), I answer this call (terminalConnection.answer()), I receive a TermEv event (CiscoRTPOutputStartedEv), get remote address and port by rtpOutStarted.getRTPOutputProperties() (getRemoteAddress and getRemotePort properties) and start sending RTP audio (CiscoRTPPayload.G711ULAW64K, 160).
    Here begins my problems. Testing this scenario with internal calls only, it was 100% perfect! But using external calls (E1->gateway), all the time getRemoteAddress answers the same IP Address (of course, gateway address). But each time there's a different port, one for each call. Usually we have success and the audio comes to final destination: the mobile phone on PSTN; but sometimes the DatagramSocket.send(DatagramPacket) method throws exception "ICMP Port Unreachable" and the call remains active but mute.
    There's no pattern for this problem, sometimes it works, sometimes doesn't.
    Our CUCM version is 7.1, there's no Unity or IPCC on environment, just CallManager, Gateway and application.
    StackTrace:
    java.net.PortUnreachableException: ICMP Port Unreachable
    at java.net.PlainDatagramSocketImpl.send(Native Method)
    at java.net.DatagramSocket.send(DatagramSocket.java:612)
    Thanx!

    It means there is no UDP connectivity between whatever host gets the exception and whatever host that socket is connected to. Typically a firewall problem.
    The addresses of 0.0.0.0 just mean that the socket is bound to all interfaces, it's not a problem.

  • ICMP Port Unreachable

    Can someone clarify what the exception java.net.PortUnreachableException: ICMP Port Unreachable indicates (aside from the obvious)? Here is the scenario: using UDP I have a client application, a gateway application, and a server application. The client sends to the server through the gateway and vice versa. I have created 2 sockets, one between the client and the gateway and one between the gateway and the server. When I try to send from the gateway to the client the packet never makes it to the client (server side is fine). When I call sock.getLocalSocketAddress and sock.getRemoteSocketAddress both are 0.0.0.0 (the latter at least has the right port number). The gateway acts as a server for the client and as a client to the server. I tried to fix this using sock.connect on the gateway side for the client facing socket but this eventually generates the ICMP port unreachable exception on the gateway side when receiving from the client.
    Thank you in advance.

    It means there is no UDP connectivity between whatever host gets the exception and whatever host that socket is connected to. Typically a firewall problem.
    The addresses of 0.0.0.0 just mean that the socket is bound to all interfaces, it's not a problem.

  • Ping return a lot of "ICMP Port Unreachable from gateway"

    hi all,
    continues getting many "ICMP Port unreachable" messages while i ping a host that is within same subnet. both servers are running solaris 10 U6. is there any wrong configuration of IPMP ?
    PING rac-dbs-a2: 1024 data bytes
    1032 bytes from rac-dbs-a2 (10.1.3.27): icmp_seq=0. time=0.830 ms
    1032 bytes from rac-dbs-a2 (10.1.3.27): icmp_seq=1. time=0.608 ms
    1032 bytes from rac-dbs-a2 (10.1.3.27): icmp_seq=2. time=0.547 ms
    1032 bytes from rac-dbs-a2 (10.1.3.27): icmp_seq=3. time=0.611 ms
    1032 bytes from rac-dbs-a2 (10.1.3.27): icmp_seq=4. time=0.543 ms
    1032 bytes from rac-dbs-a2 (10.1.3.27): icmp_seq=5. time=0.616 ms
    1032 bytes from rac-dbs-a2 (10.1.3.27): icmp_seq=6. time=0.663 ms
    1032 bytes from rac-dbs-a2 (10.1.3.27): icmp_seq=7. time=0.596 ms
    1032 bytes from rac-dbs-a2 (10.1.3.27): icmp_seq=8. time=0.672 ms ICMP Port Unreachable from gateway rac-dbs-a2 (10.1.3.27) for udp from rac-dbs-c2 (10.1.3.36) to rac-dbs-a2 (10.1.3.27) port
    37833
    1032 bytes from rac-dbs-a2 (10.1.3.27): icmp_seq=9. time=0.582 ms
    ----rac-dbs-a2 PING Statistics----
    10 packets transmitted, 10 packets received, 0% packet loss round-trip (ms) min/avg/max/stddev = 0.543/0.6268/0.830/0.0828
    ifconfig -a
    lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
    8232 index 1
    inet 127.0.0.1 netmask ff000000
    bge0: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2
    inet 192.168.1.27 netmask ffffff00 broadcast 192.168.1.255
    groupname internal-multipath
    bge0:1:
    flags=201040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,CoS> mtu 1500 index 2
    inet 192.168.1.37 netmask ffffff00 broadcast 192.168.1.255
    bge1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 3
    inet 172.22.100.27 netmask ffffff00 broadcast 172.22.100.255
    groupname smtm-multipath
    bge2: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 4
    inet 10.1.4.27 netmask ffffff00 broadcast 10.1.4.255
    groupname crf-multipath
    bge2:1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 4
    inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
    bge3: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 5
    inet 10.1.3.27 netmask ffffff00 broadcast 10.1.3.255
    groupname rac-multipath
    bge3:1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 5
    inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
    ce0: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 6
    inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
    groupname internal-multipath
    ce1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 7
    inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
    groupname smtm-multipath
    ce2:
    flags=249000842<BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER,INACTIVE,CoS
    mtu 0 index 8inet 0.0.0.0 netmask 0
    groupname crf-multipath
    ce3:
    flags=249000842<BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER,INACTIVE,CoS
    mtu 0 index 9inet 0.0.0.0 netmask 0
    groupname rac-multipath
    Edited by: hello78 on May 11, 2009 9:02 PM

    This isn't a Java question. Try the Solaris forum.

  • Can i run UDP  client and UDP  server socket program in the same pc ?

    hi all.
    when i execute my UDP client socket program and UDP server socket program in the same pc ,
    It's will shown the error msg :
    "Address already in use: Cannot bind"
    but if i run UDP client socket program in the remote pc and UDP server socket program run in local pc , it's will success.
    anybody know what's going on ?
    any help will be appreciated !

    bobby92 wrote:
    i have use a specified port for UDP server side , and for client define the server port "DatagramSocket clientSocket= new DatagramSocket(Server_PORT);"Why? The port you provide here is not the target port. It's the local port you listen on. That's only necessary when you want other hosts to connect to you (i.e. when you're acting as a server).
    The server should be using that constructor, the client should not be specifying a port.
    so when i start the udp server code to listen in local pc , then when i start UDP client code in local pc ,i will get the error "Address already in use: Cannot bind"Because your client tries to bind to the same port that the server already bound to.

  • WRT54G Incoming Log Destination Port 520

    I am trying to understand why an [Incoming Log Table] entry that recurs, i.e. in the page that presents itself when I navigate to the [Administration] Panel / [Log] Tab, and then click the [Incoming Log] button:
    =================================
    Incoming Log Table
    Source IP = 178.33.xxx.yyy
    Destination Port Number = 520
    =================================
    After I clear the Log (i.e. turn it off, save settings, turn it on again, save settings) the entry will reappear after a few days.
    I have never seen any other incoming log entry.
    Since it has been pressed into service several years ago, my WRT54G has been configured to block any and all incoming connections. The settings as they continue to appear (under the [Security] Panel / [Firewall] Tab) are:
    =================================
    Checked (Yes) = [Block Anonymous Internet Requests]
    Checked (Yes) = [Filter Multicast]
    Checked (Yes) = [Filter Internet NAT Redirection]
    Checked (Yes) = [Filter IDENT (Port 113)]
    =================================
    I continue to have disabled all port forwarding, port triggering, the DMZ, and QoS, via the applicable tabs under the [Applications & Gaming] Panel. The WRT54G continues to be configured to operate as a Gateway (via the [Settings] Panel/[Advanced Routing] Tab). No static routes are defined. The routing table show four entries, none of which are remarkable or match in anyway the partial address identified above.
    So I am under the impression that my WRT54G should be ignoring everything from the WAN-side.
    Even pinging the WAN-side of my router from the outside internet times out.
    My WRT54G ver 6 is at firmware level 1.02.8, which, as far as I can tell is the latest issued by Cisco.
    I am completely perplexed how such a connection is being established, and do not know if it is or has the potential of causing any harm. My own research indicates port 520 is typically used for RIP protocol, but I have almost zero knowledge of such.
    I certainly appreciate any elucidation.
    My thanks for your attention.

    bonski wrote:
    Forgive me if I seem flippant, but I am not sure what kind of "glitch" you are looking to correct. If performing a factory reset procedure were already known to correct a specific problem, then I would seriously consider it. If performing a factory reset did not run the risk of injecting more problems through the process of having to redo firmware updates and settings, then I would seriously consider it. I am truly seeking insight into understanding the nature of the symptoms, and why they may be occurring. I am not looking for trial and accidental success.
    Thank you for you thoughts.
    Hi bonski,
    The log means that the IP:  178.33.xxx.yyy (which is from your ISP) sends logs to port 520. Port 520 is your router. I believe it is saying that you ISP simply sends data to your router. This is normal since your router gets internet connection from the ISP. This is by the way base on my understanding about the research I've made.
    This might help:
    http://www.pc-library.com/ports/tcp-udp-port/520/
    http://www.auditmypc.com/udp-port-520.asp
    http://www.iss.net/security_center/advice/Exploits/Ports/520/default.htm

  • UDP Client and Server

    I am trying to run a UDP Client and Server by running the server first and then the client. But when I try to do that I get the message java.lang.NoClassDefFoundError: UDPServer and java.lang.NoClassDefFoundError: UDPClient. I have included the code below. Can you please help. Thank you.
    UDPClient.java:
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class UDPClient{
        public static void main(String[] args) throws IOException{
          Date d=new Date();
          long time1, time2, ETE, sumETE, maxETE, avgETE;
          if(args.length!=1){
              System.out.println("type java UDPClient <hostname>");
              return;
          time1=d.getTime();
          DatagramSocket s=new DatagramSocket();
          String st=new String("dldfjsdkjf");
          byte[] buf=new byte[256];
          buf=st.getBytes();
          InetAddress address=InetAddress.getByName(args[0]);
          DatagramPacket p = new DatagramPacket(buf, buf.length, address, 8777);
          s.send(p);
          p=new DatagramPacket(buf, buf.length, address, 8777);
          s.receive(p);
          time2=d.getTime();
          ETE=(time2-time1)/2;
          s.close();
    UDPServer.java:
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.lang.*;
    public class UDPServer{
      public static void main(String[] args){
        try{
          UDPServerThread ust = new UDPServerThread();
          ust.start();
        catch(IOException e){}
    UDPServerThread.java:
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.lang.*;
    public class UDPServerThread extends Thread{
      DatagramSocket s=null;
      BufferedReader br=null;
      PrintWriter pw=null;
      public UDPServerThread() throws IOException{
        this("UDPServer");
      public UDPServerThread(String name) throws IOException{
        super(name);
        s=new DatagramSocket(8777);
      public void run(){
          char[] ca=new char[10];
        //while(true){
          try{
              byte[] buf = new byte[256];
              DatagramPacket p = new DatagramPacket(buf, buf.length);
              s.receive(p);
              String st=new String(p.getData());
              for(int i=0; i<10; i++){
                  ca=st.charAt(i);
    buf=st.getBytes();
    InetAddress ad = p.getAddress();
    int port = p.getPort();
    p = new DatagramPacket(buf, buf.length, ad, port);
    s.send(p);
    catch(IOException e){
    System.err.println("Failed to run the server");
    System.exit(-1);
    s.close();

    this has nothing to do with your code, but how you are running it. It is a classpath problem.
    You should go to the directory where the UDPClient.class is, and type
    java -classpath . UDPClient
    similarly for the UDPServer

  • SCCM Client Push Ports

    Dears,
    I need to understand more on SCCM 2012 Client push ports. I am pushing the client from primary site server.
    As per MS, it’s recommended to have SMB open between site server and client systems.
    My client is accepted to open SMB port (one way) between site servers to client. They are not accepting to open SMB between Clients to Site server.
    I need your suggestion to have below network firewall ports are ok to work on client push.
    Site Server -- > Client
    Description
    UDP
    TCP
    Service Message Blok
    445
    RCP Dynamic
    DYNAMIC
    Hypertext Transfer Protocol (HTTP)
    80
    Client -- > Site Server
    Description
    UDP
    TCP
    Hypertext Transfer Protocol (HTTP)
    80
    Or still we need to open SMB between clients to site server, if yes, please provide the justification.
    Regards,
    Kannan.CS
    Regards, kanna

    https://technet.microsoft.com/en-us/library/hh427328.aspx. SMB from client to server is not needed. 
    Torsten Meringer | http://www.mssccmfaq.de

  • 851W - mac address changes destination port on bridge

    Hello,
    We have a 851w configured in bridge mode between the wireless lan and the wired local lan.
    The mac addresses of the machines connected through wire keep changing the destination port on where they are registered.
    If they are on FastEthernetX everything works ok, when they are on VLAN1 we loose connection between wire and wireless clients.
    NORMAL OPERATION
    Destination Address  Address Type  VLAN  Destination Port
    0019.7d83.xxxx          Dynamic        1     Vlan1
    0021.8656.xxxx          Dynamic        1     FastEthernet0
    0022.9064.xxxx          Self               1     Vlan1
    ERROR: NO NETWORK
    Destination Address  Address Type  VLAN  Destination Port
    0019.7d83.xxxx          Dynamic        1     Vlan1
    0021.8656.xxxx          Dynamic        1     Vlan1
    0022.9064.xxxx          Self               1     Vlan1
    I tryed to debug using the various debug arp commands but didn't find  any useful info.
    Why does it change the destination port?
    How can I make it stable?
    version 12.4
    no service pad
    service timestamps debug datetime msec
    service timestamps log datetime msec
    service password-encryption
    hostname UM01
    boot-start-marker
    boot system flash:/c850-advsecurityk9-mz.124-11.XW6.bin
    boot-end-marker
    logging buffered 51200 warnings
    dot11 ssid UM01
       vlan 1
       authentication open
       authentication key-management wpa
       guest-mode
       wpa-psk ascii 7 00101615105E3F233C1569
    ip cef
    bridge irb
    interface FastEthernet0
    no ip address
    ip virtual-reassembly
    no dot11 extension aironet
    encryption vlan 1 mode ciphers aes-ccm
    ssid UM01
    speed basic-1.0 basic-2.0 basic-5.5 6.0 9.0 basic-11.0 12.0 18.0 24.0 36.0 48.0 54.0
    channel 2412
    station-role root
    no cdp enable
    interface Dot11Radio0.1
    encapsulation dot1Q 1 native
    no cdp enable
    bridge-group 1
    bridge-group 1 subscriber-loop-control
    bridge-group 1 spanning-disabled
    bridge-group 1 block-unknown-source
    no bridge-group 1 source-learning
    no bridge-group 1 unicast-flooding
    interface Vlan1
    no ip address
    ip tcp adjust-mss 1452
    bridge-group 1
    bridge-group 1 subscriber-loop-control
    bridge-group 1 spanning-disabled
    interface BVI1
    description Bridge to Internal Network
    ip address 10.10.189.254 255.255.255.0
    no ip http server
    no ip http secure-server
    no cdp run
    control-plane
    bridge 1 protocol ieee
    bridge 1 route ip
    line con 0
    privilege level 15
    no modem enable
    line aux 0
    line vty 0 4
    privilege level 15
    transport input ssh
    scheduler max-task-time 5000
    end

    FYI, the solution we found was to force the mac address of each wired computer to a physical interface and vlan 1.
    This seems to have stabilize the communications, no more mac address hopping between destination port.

  • ALSB SNMP Destination Port Change

    Hi,
    When we configure SNMP Destination in ALSB, its "localhost" and port is 162.
    Can we change the SNMP Destination Port number in ALSB?
    Any help would be appreciated
    Jon

    The 2 questions you are asking are the same:
    The Port on the content rule is how traffic enters the box (incomming request port)
    The Port on the service is how traffic will be sent to the server.
    By using diffrent ports on the service and content rule you invoke port address translation wich you need for question 2

  • Can PIX 506e return port unreachable

    Hello
    Can PIX 506e return ICMP port unreachable on Linux traceroute with UDP data gram, and if somebody knows how, can you make an example of the access-list how it should be written to allow this response?

    PIX won't return an ICMP port unreachable message and access lists cannot be configured to make PIX to respond a port unreachable.

  • UDP and TCP ports

    Hi:
    I have a question. As we know, scanning TCP ports is a lot eaiser than UDP ports because active UDP ports don't respond and there are other reasons as well.
    try{
    Socket soc= new Scoket(address, portnumber);
    catch(Throwable e){ System.out.println(e)}
    look at the code above, it can only tell you active TCP ports for the Throwable e tells you nothing about UDP ports. An active UDP port doesn' respond to the connection call "soc". Therefore it will throw an exception(connection refused) after trying to connect an active UDP port. This exception is just like those of closed TCP ports.
    What i am saying is that active UDP ports will be treated the same as closed TCP ports. They are hidden in closed TCP ports. How do i sift them out? Any solutions?

    I am basically trying to determine how many UDP and TCP ports on a machine are open. Open TCP ports are easy to see. But UDP ports are tricky. Can you please tell me more in detail using a datagram socket?

  • Destination port nating

    Dear Team,
    I want to nat my destination ip address port from 80 to 8080. For example:- all of the traffic which is destined to google.com on port 80 should need to get nat to port 8080 where the destination ip should be remain same. In a short, only the destination port should be get nat and the destination ip address remains same. Kindly suggest.
    I  am using Cisco router to achieve this.

    Hello Mr. Mason,
    Welcome to the Small business support comunity.
    Let me share with you some information related to the NAT configuration on a RV042, found on the guide me setion where you could find all the information related with Cisco Small businness products configuration.
    http://is6.nohold.net/CiscoSB/ukp.aspx?vw=1&docid=e3105749e13f40a3a302802259189e07_Setting_Port_Range_Forwarding_for_the_RV042.xml&pid=4&fcid=&fpid=&slnid=18
    http://is6.nohold.net/CiscoSB/ukp.aspx?vw=1&docid=2134697b1d7844cfa16a300fb0762cd2_Setting_Port_Triggering_for_the_RV082.xml&pid=4&fcid=&fpid=&slnid=18
    hope you find this answer useful, if it was satisfactory  for you, please mark the question as Answered.
    Diego Rodriguez
    Cisco network engineer
    Thank you

  • Monitoring destination port - port buffer overflow risk?

    Hi All,
    On a 6506-E I am using local span (the simplest version).
    There is a possibility that 2Gb/s is duplicated to a 1Gb/s monitor destination port. Of course 50% of the traffic will drop, due to lack of bandwidth on the monitor destination port.
    Environment(simplified):
     Cisco 6506-E
     24 x 1Gb/s SFP ports (WS-X6824-SFP)
     IOS release 15.1(1)SY1
    The case is, dropping packets is no issue on the monitor destination port. However, on the same module, a WS-X6824-SFP (24 SFP port) is also critical production traffic active.
    This results in two questions:
    -Are the output buffers on the WS-X6824-SFP, shared among all 24 ports?
    -If so, can the oversubscribed monitor destination port use the largest portion of this shared buffer on the interface module?
    Thanks in advance for any input on this.
    Kind regards,
    Joris

    Du fait de certains vi manquants je ne peux pas executer votre code, Parmis le nombre important de vi GET HTTP, savez-vous lequel est responsable de l'erreur ?, et est-ce toujours le même ?
    L'erreur renvoyée concerne le port série, quelle est la configuration de ses buffers d'entrée / sortie (visible dans le gestionnaire de périphérique)
    Cordialement,
    Vincent.O
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Été de LabVIEW 2014
    12 présentations en ligne, du 30 juin au 18 juillet

  • SIP/JSR180: Register Response lost as host throw ICMP message: Port Unreach

    Hi All,
    I am trying to create a VoIP application using JSR 180 for mobile device using Java Wireless toolkit.
    My VoIP application is trying to register an IMS core network.
    I am using J2ME emulator to develop/test the application.
    My application is correctly sending REGISTER request to IMS core and wireshark shows that IMS core sends correct 200 OK for REGISTER request.
    My application is sending the REGISTER request from a dynamically selected port (eg. 3456) to 5060 to my proxy and the response 200 OK is coming to the same port, but my host system throws ICMP message quoting "Port Unreachable".
    I guess, the UDP port (3654), is closed as soon as the REGISTER request is sent to network from J2ME enviroment.
    Is there any need for some special setting/configuration so that the port is not closed.
    Please help.
    Regards,
    Shiv

    Sorry I have the lines:
    sipConnection.initRequest("REGISTER", sipNotifier);
    and not
    sipConnection.initRequest("REGISTER", null);
    in my code....the code in the previous post has that error but also with sipNotifier it doesn't work due the same problem.

Maybe you are looking for

  • Help!!! Photoshop CC stopped to recognize PNG or GIF files

    At some point it started to show me this: "Could not complete your request because Photoshop does not recognize this type of file." I am on Mac. Meanwhile Photoshop CS6 installed on the same laptop (MacBook Pro) is fine! This problem makes my Photosh

  • Here's a goodie - anyone know how to use Skype and...

    I would like to be able to do a tour guide for a Filipino friend of mine that is living in the Cayman Islands.  I want to be able to talk to her through skype as usual but be able to control her Google maps from my screen here in the US.  I would lik

  • Building & Consuming Async Web Service

    I'm fairly new to web services.  I built a WCF Web Service.  It works fine when making synchronous calls.  I'm stuck trying to make an async call.  On the client side in Visual Studio, I get a "Cannot await TestWebServices.QuotingEngineService.SmallG

  • How to clean the plex?

    How to clean the plex?

  • Toolbox Fonts

    Clicking ThinkVantage button starts toolbox, then I get an error "ThinkVantage Toolbox has detected a problem with your installed fonts, which will prevent this and (stops) I click the Repair Button and get Repair Failed. I have delete and reinstall