Not displaying all ip addresses connected to the network

import java.io.*;
import java.net.*;
import java.util.*;
import static java.lang.System.out;
public class ListNets
public static void main(String args[]) throws SocketException {
Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces();
for (NetworkInterface netint : Collections.list(nets))
displayInterfaceInformation(netint);
static void displayInterfaceInformation(NetworkInterface netint) throws SocketException {
Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
while(inetAddresses.hasMoreElements()==true)
System.out.println(inetAddresses.nextElement());
The output of this code gives only the ip of the computer im working on the network :192.168.1.101 and the local ip 127.0.0.1
although there are other computers connected to the netwrok .. i need to get all the ips connected including the ip of the router so if any 1 can please help me
Bookmark Post in Technorati
Reply With Quote

There is no general way to do what you want to do, which is sometimes called host discovery. Look at the design of port scanners such as nmap (insecure.org) to see how hard it can be. It is even harder in Java because you don't have raw sockets, so you can't send ICMP packets to see who responds. If you read carefully the discussion surrounding the options to nmap to do host discovery using UDP and TCP you may get some ideas that will work for your network.

Similar Messages

  • RoboHelp Server 8 Not Displaying All TOCs When Going through the Engine

    Hello,
    We recently upgraded from X5 to X8 and imported and converted our X5 project to X8 without any problems. After our conversion, we are having TOC issues.
    Here is our issue. Not all of our TOCs are displaying when we veiw our project through the engine, but if we view the project directly (without) going through the engine all of our TOCs display correctly. I've tried creating a new TOC and checking the Copy existing Table of Content box and deleting the old TOC and that did not work. I removed the following characters in the TOC (&, <, >,) and that did not work. I also tried deleting a book with topic pages within the book and re-creating the book and adding the topic pages in the book and no solution. It seems like i've tried everything to resolve our issue and nothing has worked so far.Our books have topic pages linked to it.
    I've searched the forums and i have not seen anyone else with the same issue. Any help would be greatly appreciated.
    Thanks

    Hi Ian,
    Just zip them up and send them to me in a private message.
    Tulika.

  • SF-200 not displaying all MAC addresses

    I have an SF-200-24 port switch, I have a workstation attached that is working and accessible. When I display the Dynamic MAC table, it shows most of the switch ports (including multiple MAC's of the uplink/downlink connections). I have even tried to query interfaces I know have connections (specifically e21 & e23) but get a "no response" message. Has anyone seen this behavior? I am running code 1.0.0.19.

    Hi bob, Unless you reset the switch, the start configuration remains same. Please make copy of your running Config before resetting.
    And Detailed Instructions regarding Firmware upgrade can be found in the below document:
    Firmware Upgrade on SFE/SGE Managed Switches

  • Table not displaying all column

    hi my table>adf table does not display all column when i run the application it only display the first three column but in design it display all column

    hi user,
    i think so some panelcollection is closely strecthed, so only this problem.
    go to panelcollection make it as styleClass=" AFStretchWidth" .
    solution:
    if you are used panelcollection inside af:table means it will suits.
    or else go to the af:table add this
    styleClass=" AFStretchWidth"
    columnStretching="last"
    or else some problem:
    please elaborate or else paste the part of the code.

  • WIFI stopped working after I woke the computer up, now says connected to the network but not the internet, all other coputers and devices connected still with no problems, have pinged IP address from router and got the message "4 packets sent none receive

    Hi,
    WIFI stopped working after I woke the computer up, now says connected to the network but not the internet, all other coputers and devices connected still with no problems, have pinged IP address from router and got the message "4 packets sent none received"... Help
    I have tried network diagnostics which doesnt help... The only other ting is, when I woke the computer up it said tat another device was using my IP... My wife had plugged her phone into the computer to charge etc but even when i turn wifi off on the phone there is no change... also in settings on the phone the IP address is different...

    The answer to your question is - neither!
    Your PC should to configured to obtain an IP address automatically, and to obtain DNS server IP addresses automatically, from the Airport Express. This is the way Windows (and Macs for that matter) are configued by default, and that is the way most people have their computers set up. If you manually configured your PC's IP address to be the same as your wife's Mac, it certainly explains why your PC is not able to access the internet.

  • Ipad contacts not displaying all fields from mac address book, ipad contacts not displaying all fields from mac address book

    After syncing mac address book to ipad contacts, the ipad does not display all the fields that were in Mac address book (in my case all the email addresses).  Anyone have a fix?

    I have a problem similar to DeeRun's.. I would like the IM fields to be synced.. I use them to send e-mails to when the e-mail field is empty or when i just want to use that specific address.. Very annoying, would take hours if not days to transfer all those IM adresses to e-mail fields in addressbook..
    EDIT: not to mention the mess it would make in my address book!
    Message was edited by: 1NStanley

  • Comcast just replaced my cable modem/wireless router.  All devices connect properly except my iPhone 4.  It shows itself to be connected to the network, but it does not load any web page.  Resetting the iPhone does not solve the problem.  Any suggestions?

    Comcast just replaced my cable modem/wireless router.  All devices connect properly except my iPhone 4.  It shows itself to be connected to the network, but it does not load any web page.  Resetting the iPhone does not solve the problem.  Any suggestions?

    Thank you for your response.
    I had rebooted the router (several times, actually), to no avail.
    I do not know the answer to whether MAC filtering is enabled on the router.  Have tried to find info about that, but unsuccessfully.  Router is an Arris TG852G, supplied by Comcast.  I would be surprised if MAC filtering were the issue, since in addition to the computer, we have successfully connected several other devices to the wifi, namely an iPad, a Android phone and a Kindle Fire - all able to access internet pages through the wifi, and all without a need to add the device to a MAC address whitelist.  To add to the mystery, the Comcast tech was able to connect his iPhone 4 to my network and access web pages.  He was unable to connect my iPhone, however, after trying for some time.
    I seem to recall reading somewhere that an iPhone cannot connect to a wireless "n" router, only "b" or "g".  The Arris router is described as a n/g/b compliant router, and as noted the Comcast tech was able to connect his iPhone, so don't know why that would be the issue here.
    By the way, my iPhone does connect wirelessly to my network at home.  This difficulty is at a second home.
    Any other thoughts would be appreciated.

  • HT5219 Can I use 2 displays when I connect a 1920x1080 display through Thunderbolt to the 27 cinema display when it´s connected to the all new 13" Mac Book Air with thunderbolt?

    Can I use 2 displays when I connect a 1920x1080 display through Thunderbolt to the 27 cinema display when it´s connected to the all new 13" Mac Book Air with thunderbolt?

    Thank you, I have read that I could daisy chain the HD RAID enclosure on one of the thunderbolt ports with another monitor, if the monitor were at the end of the chain, but I do not know if the other port would still simultaneously support yet another external display at the same time.

  • TS1424 everytime i try to download an app from itunes, or to 'view all' the apps listed, the error says; 'We could not complete your iTunes Store reuest. The network connection was reset' I used both my desktop and laptop both on Windows 7 Pro, & net is f

    everytime i try to download an app from itunes, or to 'view all' the apps listed, the error says; 'We could not complete your iTunes Store reuest. The network connection was reset' I used both my desktop and laptop both on Windows 7 Pro, & net is fine. please help. is there soemthing wrong with apple store temporarily?

    The latest message is: 'We could not complete your iTunes Store request. The network connection was reset.'
    In between, I got a messge about verifying my payment method. When I tried to submit the details, I kept getting a mmessage stating that my payment method was declined (my card is not near it's expiration date, and works fine).
    Argh!

  • My 3G connection is not working after updating to iOS 6.1. I have tried all possible solutions like resetting the network, restarting the iPad

    My 3G connection is not working after updating to iOS 6.1. I have tried all possible solutions like resetting the network , restarting iPad , ...

    The same story. No 3G after updating to 6.1.  Told my daughter temporarily not to do an update on her iPad with 6.01. We've exchanged SIMs. I inserted her SIM in my iPad - 3G appeared immediately. And my SIM in her iPad with ios 6.01 also WORKS FINE. We use the same provider - Megafon Moscow. After attempting to revert SIMs to original configuration, 3G disappeared on my iPad again. Don't know what's going on with SIM during the update to 6.1

  • My wireless internet is working with all of my other devices but my imac will not connect to the network?

    Can anyone help?  My wireless connection is working on both my iphone4S and my ipad2, but my Imac will not connect to the network.

    First run Software Update to make sure your iMac is up-to-date.
    Even though things are working OK on other devices there may still be issues with your modem or router so it's best to start there. Locate the manuals on both devices and reset each. Do the modem first then the router. Next make sure the router has up-to-date firmware. If the problem continues after updating resetting and updating both devices then download and install iStumbler and let it run for about 30 minutes. iStumbler will scan your area for the Wi-Fi networks being used, pay attention to the channels each network is set to. Most routers are  pre-set to channels 5 or 6 and if you are in a congested area and all the routers are set for channel 5 or 6 then you can see where there might be a problem. Set your router's channel to one not being used in your area, you have at least 14 channels to choose from. Also check to see if your router is using 802.11n, if it's not then it would be wise to upgrade the router to a faster device.
    Next is if you are still having issues the problem could be your ISP's DNS settings. If you want to learn about DNS please read CNET's DNS Article and MacWorld's DNS Troubleshooting . Then use the instructions below to reset the DNS settings:
    1. System preferences
    2. Network
    3. Click Advanced
    4. Click DNS tab
    5. Click + sign
    6. Add 208.67.222.222
    7. Click + sign
    8. Add 208.67.220.220
    9. Click OK.
    10. Exit System Preferences

  • I wanted to know if others were having difficulties getting All Day Events appear in the Notification Center in iOS 7.   Currently my Calendar in the notification center will show events that are at certain times, but they will not display All Day Events.

    I wanted to know if others were having difficulties getting All Day Events appear in the Notification Center in iOS 7.
    Currently my Calendar in the notification center will show events that are at certain times, but they will not display All Day Events.

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

  • I have just installed iPhoto 11 and all of photos on my iphone have now all disappeared and ended up in my photo stream and the library in iphoto does not display all my pictures?? Can anyone help?

    I have just installed iPhoto 11 and all of photos on my iphone have now all disappeared and ended up in my photo stream and the library in iphoto does not display all my pictures?? Can anyone help?

    And I cant work out why all of my pictures are not diplaying in iphoto?
    Is this iPhoto on your Mac?  Are you referring to the photos that were in your iPhoto LIbrary prior to the upgrade to iPhoto 11?  If so then apply the two fixes below in order as needed:
    Fix #1
    1 - launch iPhoto with the Command+Option keys held down and rebuild the library.
    2 - run Option #4 to rebuild the database.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button and select the library you want to add in the selection window..
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the Library ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    If that's not what you're referring to then you should describe what is happening in more detail. Remember we can't see your Mac or your iPhone so need detailed and accurate descriptions of what you're experiencing.
    Also we need infomartion like do you have an iCloud account and are you logged into it on all of your devices, iPhoto and Mac? do you have Photo Stream enabled on both.
    OT

  • I m working in an organization where web-sense is installed to block all irrelevant sites, i have installed itunes but it does not run a window pops up with message 'itunes is not connected to the network' can anyone help me out?

    i m working in an organization where web-sense is installed to block all irrelevant sites, i have installed itunes but it does not run a window pops up with message 'itunes is not connected to the network' can anyone help me out?

    There's a whole lot to read in your post, and frankly I have not read it all.
    Having said that, this troubleshooting guide should help:
    http://support.apple.com/kb/TS1538
    In particular, pay attention to the mobile device support sections near the bottom, assuming you have already done the items above it.

  • ASDM - does not display all the rules

    Hello,
    we replaced our PIX525 firewall with an ASA 5540 firewall, and now we see some strange behavior in ASDM.
    ASDM does not display all the rules, but i see all all the rules in cli.
    What can be the problem?
    inside-asa# show ver
    Cisco Adaptive Security Appliance Software Version 8.2(5)
    Device Manager Version 6.4(5)

    Sure, i think we can manage that but i can only reply after one or two weeks ( change management ).
    But i thought that our ASDM version is OK with this ASA version, see the link,
    http://www.cisco.com/en/US/docs/security/asa/asa82/release/notes/asarn82.html#wp309157
    Thank you for you help.

Maybe you are looking for