Home » Questions » Computers [ Ask a new question ]

IP address of host of Wi-Fi ad-hoc network?

IP address of host of Wi-Fi ad-hoc network?

I often create a wireless ad-hoc network on my laptop running Windows 7. Now I'd like to connect to it using standard HTTP from my iPod Touch. I've tried 192.168.1.1 and that doesn't work. What should the address be so I can connect?

Asked by: Guest | Views: 263
Total answers/comments: 4
Guest [Entry]

It could be that Windows is using APIPA, so you could try an IP in the range of 169.254.0.1 to 169.254.255.254 (169.254.0.0/16). That tends to be what (from my experience) Windows uses in ad-hoc networks.
Guest [Entry]

"If running out of options, try to look at the Address Resolution Protocol (ARP) cache: arp -a or arp -a -v for verbose mode.

Then match the MAC address with the interface you're after. You can get the list of MAC addresses on your machine with ipconfig /all."
Guest [Entry]

"On an iPod Touch there are three sections: DHCP, BootIP, and Static Now in each section. There are several fields and the main ones are: IP Address:, Subnet Mask:, Router:, and DNS:. You can manually change the Static, if you know the IP address of your computer and router. Then statically assign your iPod Touch to an IP address that is free. The Subnet mask on a 192 address will be 255.255.255.0 as it is a class C network. The Router will be the IP address of your router (we think, if it doesn't work then change it to the PC). If your router acts as your DNS provider then enter this as your DNS.

Sourc : pie.boards.ie/vbulletin/… Edit: - you could use a free DNS provider, but this may screw up your resolving of devices within your home network. Not having done it without a server running DNS I couldn't tell you."
Guest [Entry]

"The poster asked the question 'how to determine what IP address was created after he created a WiFi ad-hoc network'.

The answer is to run, from the command prompt, 'ipconfig'.

Here's my output from a real ad-hoc network I created on my Windows 10 PC (with USB WiFi dongle):
image
You'll notice there is no default gateway (this is normal for the ad-hoc network host).

To connect to it from another WiFi-enabled device, the ad-hoc SSID (network name) should appear in the network list. If you're using a smartphone (ie. Samsung Galaxy 4 in my case) then you'll just tap on the network name, enter the password, and you're connected. Similarly, from my Windows 7 laptop (with built-in WiFi), the ad-hoc network name will appear in the list of available networks - I just click on it, click on the 'connect' button, enter the password, and I'm connected. If you do an ipconfig from the 'client' (my Win7 laptop) you'll see something like this:
image
Notice how it has a default gateway and DNS entry? This is normal.

Knowing the IP address of the ad-hoc server is only useful if you want to programatically connect to it via a socket (ie. for client/server communications).

From what I've read Windows XP would create wifi ad-hoc networks in the 169.254.173.0 Class C range. For Windows 7 and 10 the network would be in the 192.168.137.0 Class C range. I've no idea if this can be changed.

Also, what would I do if I wanted a network with a Class B range? Why? Class C would only allow me to have a private wifi network with 254 devices connected. A Class B network would allow 65,000+ connected devices.

For those of you interested in creating a wifi ad-hoc network on Win7 or Win10 desktop OS, from the command prompt type:
C:> netsh wlan set hostednetwork mode=allow ssid=myadhocnw key=12345678
C:> netsh wlan start hostednetwork
Read up on the netsh DOS command to learn more.

Also people, don't get confused between a wifi ad-hoc network and a wifi hotspot (an ad-hoc derivative). The hotspot version allows you to share your internet gateway over a ad-hoc network. Wikipedia has some good articles for you to learn more.

I hope this post helps others progress further with their understanding and ad-hoc setup."