Anyone knows how to publish Network cost information element (explained here https://msdn.microsoft.com/en-us/library/windows/hardware/dn391819.aspx) using dnsmasq or by any other means?
This is for vendors and WiFi-driver hackers. You can use something like 'hostapd' to add this to your hotspot. It is communicated inside the WLAN beacons so one need to knows a thing or two about WiFi drivers.
Related
I would like to be able to scan my local network, using either an existing command line tool or writing my own, that will look for a certain type of embedded device and then print a list over all devices found.
The embedded device I'm looking for has the lwIP TCP/IP stack implemented, and we are free to add functionality to it that will help us locate it.
Using the MAC address of the device is not an option because the user is free to configure this and it may not have been properly set.
How can I make my devices "scanable" on the LAN and how can I perform the scan with my PC?
let me try to answer this: your device will be added on a LAN, so will get an IP address. That's really what's critical to locate it. The IP address can be:
fixed, like defined by your device (something like 192.168.0.1), but it's a risky option because it might collide. In that case, you can just tell the user to reach this IP
dynamic, defined by DHCP. So your device will get an IP on your LAN like 192.168.3.178.
In case on DHCP, the issue is finding your device. You will find detailed answers there How to get a list of all valid IP addresses in a local network?, but there is basically 2 options:
nmap, a real scanner. This may be long, but super powerful. This also could be viewed as agressive, so if you're in a controlled environment (like the LAN of a entreprise), please ask your sys admin before doing that
arp, which is not as exhaustive
I would like to know what are the steps to get the exact port number of the switch my pc is connected to. I'm advised SNMP can solve that but i have so little background about networking. If it really can supply me the port number then how do you do it? If possible, I would like to ask the detailed steps like what do you need to download beforehand etc. And if there are any other simpler ways to get port numbers through the command prompt only, any help would be very much appreciated. Thanks in advance!
Basically you should correlate data from different MIB tables:
Management MIB2 Interfaces
Ethernet MIB dot3Stats
Management MIB2 dot1dBridge
How to create a Mobile Adhoc NETwork using bluetooth for transmission and j2me for programming? Where should I start?
You can start by first choosing an API for Bluetooth like Bluecove etc. Google the available APIs that support java and you can choose any one you find better for you. I have personally worked on Bluecove. But i have never created an Adhoc network. I think you need to create a PAN (personal area network) via bluetooth. Please elaborate how you want to use your ad-hoc network so can tell you something more about it.
I would like to write a software running in a networked device, i.e. PC. It can automatically detect the other network devices' types. For example, it can detect there is a PS3, a Wii, an IPad running in the same network. Any ideas? Thanks,
You have two problems: first, detecting that a device is connected to your network and at 192.168.1.x. Second, somehow detecting what that device is.
The first is easy-ish to accomplish: there's discovery protocols like UPnP and Bonjour. However, in a home networking scenario, the easiest and most reliable way to get a list of connected devices is probably to pull the DHCP reservations from your router. You might have to scrape data from the router's HTML-based management interface—hacky as that may be—but it would work. (If you're using .NET, consider the HTML Agility Pack to accomplish this.)
Once you have a list of IP addresses of connected devices, your next problem is to figure out what each device actually is. This will be more challenging. Some possibilities:
You may be able to use the MAC address to help detect the device's vendor. (Here's a list.)
If you're using UPnP, you can ask the device what it is.
Use IP fingerprinting to determine what the device is.
Couple thoughts. The broadcast IP address - 255.255.255.255 is where devices talk and say "here I am". Should be able to listen to this and find ip addresses and more. Second, if devices are assigned an IP address by a DHCP client (obviously) you can usually find a list on the dhcp device. Devices often have names, this is a higher level protocol, like windows SMB, that you may have to interface with in order to get that information.
I have 2 network devices that talk to each other over Ethernet. I would like to sniff the traffic using Wireshark. But the devices are going through a switch. The switch routes the traffic to only the ports that need the data.
At another location I have a hub. All the traffic is repeated across all the ports.
Is there a way to tell the switch to send the traffic down my port also?
EDIT: This is an unmanaged switch.
You might want to look into ARP spoofing.
http://en.wikipedia.org/wiki/ARP_poisoning
Since this is an unmanaged switch, the only way that I can think of is to temporarily put a hub between the switch and one of the devices you want to monitor, then plug a laptop into that hub to do the monitoring. The laptop should now see all traffic between the device and the switch.
This is pretty easy since you can do it at the location of one of the devices. You just need a hub, two more lengths of CAT cable and the computer you are using to monitor with.
The switch may have a management interface that lets you do that. Be warned that if you do, you'll wreck performance on the switch since everything attached to it will now have to deal with collisions.
If the switch is a managed switch, it likely has a mode to act like a hub. Just be careful not to leave it like that.
Some will also have ways to mirror ports and such as well. You need to find out what kind of switch it is.
RE Edit: If it is unmanaged, then you are boned. Use a hub, a managed switch or run wireshark on the computer(s) affected.
You could try a port redirector, like this one. You would configure one device to talk to your computer instead of the other device, and the redirector will send the data to the real target. There are several programs like this out there, or you could write your own.