FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Networking boring problem: DHCP and multiple devices





Da Rossa
Hi, I have some devices in my home, all able to connect to the internet using my router wirelessly. Many times I need to exchange data between them, and Dropbox is not a solution because some of those devices are short in storage. Also, this is about security: I'd like to turn DHCP off, and configuring all devices exclusive IPs. So I'll always know which device I'm dealing with by knowing its IP's last number.

But, I go to college everyday, and need to connect to their wireless network, which requires a boring authentication I can't help (and its not the issue) and needs the device to have a network with DHCP enabled. So everytime, I need to go, in my laptop running Windows 7, to the status of wireless connection, properties, TCP/IP ipv4 protocol, properties, then select the radio option "use dhcp". Tedious. I need it because I want my just-typed classnotes synched with dropbox ASAP. However, when I get home, I need to... go to the status again, blablabla, then uncheck the "use dhcp", and type in the ip adresses, default gateway and DNS servers by hand! This is counterprodutive.

So, what are your suggestions for making this less unpleasant? The ideal would be: when I'm home, no DHCP. When I'm at school, DHCP on. And I never want to type in any IPs again.

Thanks!
SonLight
You should be able to set up some kind of batch file to do it for you, so you would not always have to type in the details. When you got one place or the other, you would still have to open the "run" box and type in "nodhcp.bat" or something similar. Perhaps a nicer way would be to have an icon that you click in the notification area. The ideal would be to sense what wireless network is present, and run a script automatically which would turn dhcp on or off depending on the wireless access point name.
Da Rossa
Thanks SonLight, I get your point. All I could do was to make it semi-automatic using AutoHotKey. However, it is far from comfortable. I wish I could know what to put in the batch file, so I'd have to bats ready to be clicked... Or is it a registry matter?

Thanks!
jdelfire
batch file is a good idea because its faster...

one more thing that you can try is making a hardware profile but the problem is microsoft no longer

includes this feature since windows vista which kinda sucks

but here is a discussion on how one can create a hardware profile in windows 7


http://www.neowin.net/forum/topic/1058694-windows-7-and-hardware-profiles/
Da Rossa
Wow, I have never heard about hardware profiles! But what's the point? As far as I know, the hardware itself is not going to change... just a little annoying setting. And I'm using Win 7 so I'm afraid that won't help.... The thing is that I don't know how to write a batch file for this specific purpose...
badai
NetSetMan
http://www.netsetman.com
SonLight
It looks like NetSetMan is a good solution; someone's donNetSetMane the work of handling all the details and allowing to set up several profiles. We'd love to hear how well it works for you.

It still requires starting up a program and clicking an option though. I think it would be really neat if someone coud figure out a way to sense the presence of a particular access point and choose a profile from that without necessarily requiring to click or type anything. If someone knows how to sense the presence of an access point, maybe it can be wired up to NetSetMan, or maybe the NetSetMan developers would consider adding an automatic profile choice to their program.
badai
SonLight wrote:
It looks like NetSetMan is a good solution; someone's donNetSetMane the work of handling all the details and allowing to set up several profiles. We'd love to hear how well it works for you.

It still requires starting up a program and clicking an option though. I think it would be really neat if someone coud figure out a way to sense the presence of a particular access point and choose a profile from that without necessarily requiring to click or type anything. If someone knows how to sense the presence of an access point, maybe it can be wired up to NetSetMan, or maybe the NetSetMan developers would consider adding an automatic profile choice to their program.


you need rules (conditions) that computer can detect. in android you have something like tasker, albeit very limited capabilities compare to human senses.

it might take few years/decades/centuries down the road for that. especially one that a student can afford.

in the mean time i would settle for something like voice command:
"computer, we are at home. switch to fix IP profile"
"computer, we are at school, turn on wifi and use dhcp"
jdelfire
here is a batch command on how you can turn on DHCP

copy and paste script below to notepad then save it as a batch file for example "DHCP-ON.bat"


Code:
:: Start of Batch file
@echo off
:: "local area connection" is the adapter name
:: This command enables the DHCP of the adapter
netsh int ip set address "local area connection" dhcp
echo DHCP on
pause
:: End of Batch file



Note: "local area connection" <--- is the name of the adapter you are trying to configure - refer to your control panel because it can be named into anything like "local area connection 2" or "wireless connection"



To set a static ip
Edit the IP address,subnet mask and gateway to the correct info you will be using
save it to something like "StaticIP-on.bat"

Code:
:: Start of Batch File
@echo off
:: "local area connection" is the adapter name
:: netsh int ip set address "local area connection" static <ip address> <subnetmask> <default gateway> 1
netsh int ip set address "local area connection" static 172.8.11.170 255.255.255.0 172.8.11.1 1
echo Successfully Configured Static Ip address
pause
:: End of batch file

Note: just after the gateway on my example its 172.8.11.1 do not forget to put a space and 1 in the end.

If there is a need for you to change the DNS you need to add this in the batch file
to change DNS:
netsh int ip set dns "local area connection" static 172.8.11.254 primary
menino
I was going to suggest netsh command, but jdelfire beat me to it, and with examples.

I use netsh in 2 batch files, one for the company static ip, and the other at home dhcp.

just another suggestion, though, - instead of using the ip share, you could use the nameshare, or fqdn share name, so even if the ip changes, the computer name does not.
Da Rossa
Quote:
It looks like NetSetMan is a good solution; someone's donNetSetMane the work of handling all the details and allowing to set up several profiles. We'd love to hear how well it works for you.

It still requires starting up a program and clicking an option though. I think it would be really neat if someone coud figure out a way to sense the presence of a particular access point and choose a profile from that without necessarily requiring to click or type anything. If someone knows how to sense the presence of an access point, maybe it can be wired up to NetSetMan, or maybe the NetSetMan developers would consider adding an automatic profile choice to their program.


It worked, much better than manually setting (first finding) the network center here in my Windows 8 Consumer Preview. We're still a few clicks away, but much closer.

The problem is: they store one configuration for each adapter, and my OS made a mess with duplicate adapters. It's supposed to have only two: the wired and the wireless. I have some which are, by the way, undeleteable.

Sensing a new accesspoint would be nice Very Happy

Quote:


PostPosted: Mon Apr 30, 2012 5:55 pm Post subject: Report this post Reply with quote
SonLight wrote:
It looks like NetSetMan is a good solution; someone's donNetSetMane the work of handling all the details and allowing to set up several profiles. We'd love to hear how well it works for you.

It still requires starting up a program and clicking an option though. I think it would be really neat if someone coud figure out a way to sense the presence of a particular access point and choose a profile from that without necessarily requiring to click or type anything. If someone knows how to sense the presence of an access point, maybe it can be wired up to NetSetMan, or maybe the NetSetMan developers would consider adding an automatic profile choice to their program.


you need rules (conditions) that computer can detect. in android you have something like tasker, albeit very limited capabilities compare to human senses.

it might take few years/decades/centuries down the road for that. especially one that a student can afford.

in the mean time i would settle for something like voice command:
"computer, we are at home. switch to fix IP profile"
"computer, we are at school, turn on wifi and use dhcp"


This would be the nicest thing ever imagined.


@ jdelfire:

Is this what you're talking about when you said this?
Quote:
Note: "local area connection" <--- is the name of the adapter you are trying to configure - refer to your control panel because it can be named into anything like "local area connection 2" or "wireless connection"


Because network configurations are quite complicated, I must say, specially in Win 8. Where exactly do I find all the network connections/adapters currently stored in here?

Edit: NetSetMan is fantastic. Handy and simple. Thanks!

But I forgot to say that, when I said "multiple devices", I should have said that I own an iphone and an iPad too. does anyone know similar apps for their platform? Smile
Related topics
What is your operating system?
Debian Sarge and ATI =P
Windows Networking (easy problem)
Network Question..Router/switch/hub
how can i be less boring?
I'm trying to connect two computers via crossover cable...
Sleep or Shut down?
SMD soldering
Firefox/2.0.0.9, Issue with Memory
Transfer data between pages on different servers?
Intelligent Design - Science or Religion?
Rights of the parent ~ rights of the child
Man To Go Cashless For A Year
external pc?
Reply to topic    Frihost Forum Index -> Computers -> Computer Problems and Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.