Solved

Datagrams from Java

Posted on 1998-03-15
2
720 Views
Last Modified: 2012-06-21
Hello there, wonder if anyone can help me.
I am trying to send and receive datagrams using Java. I have copied two programs from a book, one to receive datagrams and one to send.

The receive datagram program has a parameter of a port to receive the data on.

The send program has three parameters, host , port and message.

I have a dial up account.

Now, the programs have all compiled correctly but if I try and use the send program using my node name I get the message "Network is unreachable", if I use it with a node that I know exists "post.demon.co.uk" the datagram is sent (I presume it is as the modem lights flash!!), so this must mean the the DNS is working...

If I try it with my IP address, I get the same message.

If I try it with 127.0.0.1 (loopback) the send light flashes once, but I do not receive the message.

Basically my question is, what ports should I be specifying with modem dial up and what is going on with the DNS ?

Can anybody help me ?
0
Comment
Question by:covellc
2 Comments
 
LVL 4

Accepted Solution

by:
unicorntech earned 100 total points
ID: 1587553
As you have a dial up account I would doubt that your node has been allocated a fully qualified domain name (FQDN). This would be why you could send tot a site that you know exists but not to your own. Also 127.0.0.1 is a loopback interface and hence the modem lights won't flash as the datagram will remain on the local PC.

let me know what you are trying to achieve and I will see if I can help.

Also I think what you are trying to do is not possible with your current setup.
0
 

Author Comment

by:covellc
ID: 1587554
What I am trying to do is  use Java to send datagrams to a friends PC. We then hope to build a "chat" type interface. I have  copied this program to send and receive data grams, so I just wanted to test it.

It is funny, cos I can't ping 127.0.0.1 either...

Is there a reason why I should not be able to ping my own IP address (not the 127...) ? I get a network unreachable when I try !!!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CPU#7 stuck for 22s! 4 289
cannot get the dns server after using openvpn client 10 114
Computers missing from Windows Explorer Networks 10 102
Set linux box as ip router 3 23
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question