We have 10000 or more computers in our network. We want to find the computer with a certain ip. Is there way to learn the switch that the computer is connected to? We have only one router in our network.
I would try and get the Mac Address from the Computer then. Depending on what kind of switches you have you could telnet into the switch and find out if the Mac address is connected through there. Just an Idea I would comment but do not have the privilege to.
Related
I am running a device in my local network and want to access it from a different subnet. I can't change the IP address of the device.
I want to access it from a software in windows where I can enter the IP address. How do I configure my windows so that I can access the other subnet? Do I have to do any other configuration on my local network?
I am very new to this stuff so I hope that my question is clear.
Thanks for your help.
-Moritz
The easiest way to communicate to the that device may be change your computer IP to that subnet too. If you don't want to that, there may be some problem complex to solve like NAT traversal since the device may not supply that function and it may not connect to your computer first.
My goal is to have two laptops in a network. One is acting as a server, serving webpages to the other. The catch here is that neither is connected to the outside internet.
What I have done so far is setup WAMP on the server laptop, and it successfully serves web pages on localhost. Now I want to access these pages on the other laptop.
To do this, I had the server create an ad-hoc network and connected the other laptop to it, but I'm stuck - and I'm worried I'm not on the right track. I followed this tutorial but in the end I figured out that just explained how to spoof a text URL as an IP address, and not really what I was looking for.
So I guess I have two questions:
Is my method the best way to do this (with ad-hoc networks)? Is there some way to connect a laptop to a wireless router and have the laptop act as a server to another laptop?
If my WAMP and ad-hoc network should work, how do I connect other laptops to my server through the ad-hoc network?
Thanks!
I would suggest the first option: get a wifi router. Then you can assign static IP adresses from the routers private network or use DHCP server on the router. Hopefully you will have an option to reserve IP adresses on DHCP server so you dont have to check every time what IP adress the laptop acting as a server got. You use this address to access your web server. Also, you can use this router later as a gateway to the internet if you want.
In ad hoc mode you will probably get an address from 169.254.0.0/16 link-local scope, and you can check it by running ipconfig as #Robadob already suggested.
On your hosting laptop open cmd and call ipconfig look for the internal IP address on the network interface your hosting the ad-hoc network.
Enter that IP address into the browser on your client laptops web browser instead of localhost.
If that doesn't work, try other ip addresses listed by ipconfig (incase you used the wrong) and then check the properties of your ad-hoc network, windows firewall and any other firewall software to disable anything that might be blocking it.
An ad-hoc network is suitable option for what your doing, most people would probably use a switch or router though, however that requires hardware you probably don't have.
I've got a school demo tomorrow and because I don't have a laptop I need to use remote desktop to access a DB on my home machine for the demo. I can access my desktop from another machine on my ethernet by using the IP address I get from ipconfig, but here's the problem:
The address of my home machine from ipconfig is of the form 192.168.1.XXX
where my subnet mask is 256.256.256.0
I'm worried that once I'm on a machine outside of my ethernet the 192.168.1.XXX address will no longer work because I think that that address is relative to my ethernet. Is there a way I can find out my computer's public IP address or am I just being paranoid and the address I have is the public one?
Thanks a lot for your help!
You are correct that 192.168.1.xxx will not work from your school's network, or at least it won't point to your home network. That is a local-only address.
What you can do is set up port-forwarding on your home router to forward remote-desktop packets to your machine at home, say 192.168.1.2.
So what you'll need is:
a) the public IP of your router; you can either go to one of those "what is my IP" websites to find it, or use traceroute/tracert to see it.
b) configure port-forwarding on your home router to 192.168.1.2 (the machine with the DB on it that you want to remote in to). Not sure of the exact port but usually the router will have a named option like "Remote Desktop" to figure it out for you.
- to do this, you can usually go to http://192.168.1.xxx (or whatever your router's local IP is), enter admin credentials, and configure the port-forwarding from there.
Then when at school, you would remote to your home router's public IP, and everything should just work. Good luck!
192.x.x.x and 10.x.x.x are internal ip addresses to your network so you are right, it won't work. Are you able to install software on your home computer and the computer you are connecting from? If so you could use http://www.teamviewer.com/en/index.aspx (it is free for private use). I use it on my family's computers to remotely help them with troubleshooting issues. If you have a Windows box you can also use remote assistance.
How do I discover the MAC address of machines in a network?
I need to discover the machines that are available just with only BIOS installed (no operating system present). And I need to find the MAC address of machines that are up.
I won't have physical access to the machines. This is for baremetal discovery!
You can use WinPcap to monitor the Ethernet traffic on your network in the same collision domain. So you could learn all the MAC addresses just as a switch does. You could also fake some DHCP messages in order to create some traffic. But this only works with PXE (which is actually made for this scenario) and in your own collision domain.
Since the machines probably don't have IP addresses, I don't think you have a chance to actively query them. They would need to answer packets sent to the broadcast MAC and for e.g. ICMP echo requests, they'd need to send packets with something like 0.0.0.0 as a source IP. This is common and allowed for BOOTP/DHCP, but I haven't seen anything like this implemented by BIOSes yet.
Maybe just logging all MACs that go over the wire with a tool like arpwatch would help? If the machines have PXE booting enabled, you should at least see some DHCP DISCOVERs, before they leave into eternal silence.
A just-not-as-"nice" solution as the ones suggested above (working over a network is just comfortable):
If you have physical access to the machines: Plug in a monitor and look the MAC address up in the BIOS. If for some reason the MAC address isn't listed in the BIOS, you could enable PXE. After reboot, when PXE is initializing, you're going to see the MAC address.
Try the arp command. I am not sure it will be really helpful for you as it might only work for PC with an IP address (and likely to have an OS).
If your computers are connected to a switch I guess you can have this information from it. Many "modern" switches are able to provide you with that information, should you know which PC is connected to which port on the switch.
Is there an elegant way to make a program detect a new computer that is connected to the network?
I would like my program to "auto-sense" a new computer being connected on the network (they're on the same network). Like a USB device being connected to the computer.
What I'm doing now is to save a list of all computers in the network from time to time. Another approach is to PING all available IPs on the subnet.
Are there any other elegant approaches?
Thanks!
Listening for ARP requests is the canonical way to do this. Independent of DHCP or not, any connected computer that wishes to communicate with the outside world will have to make an ARP request for the address of the default router. This request will go out as a broadcast, and contain the source interface's MAC and IP adresses.
If the other computer uses DHCP, it will make an ARP request for it's own address as part of duplicate address detection, which is also a broadcast you can snoop on.
(This works more or less the same way for IPv6, except you need to look for neighbor discovery or router soliciation packets instead.)
Like the answer alluded to, if you have a switch to which you can telnet or use SNMP on, you can extract the MAC table. That will give you a list of MAC adresses on each port in the switch. If you want the IP addresses however, you still need to listen for ARP:s.
On the other hand, if you have access to the default gateway on the network, you can also look at the ARP table there. That will give you MAC and IP addresses for anyone that has recently (for different values of recently...) communicated with it.
If you have a managed switch of some kind, you could probably connect to that, that would be a fairly elegant method.
If you're on a domain, you can can get a list of all the machines joined to the domain from the domain controller.
Failing that, all I can think of is either a challenge/response thing (e.g. pinging them) or by detecting traffic sent from them (see this question maybe as a starting point?), neither of which strike me as an elegant approach.