0

I want to make a small LAN, not connected to the internet.

I open control panel/networking and find my Ethernet adapter.

I unchecked IPv6 and click on IPv4 and select "Properties".

I gave a fixed IP address of 192.168.1.1 butI can't ping 192.168.1.1

And a program I wrote can't access a MySql database on that address ... I am using Xampp, the program can access the database if its connect string says localhost, not 192.168.1.1 Also, I can access through PhpMyAdmin and invoking MySql from a Dos box - so, MySql seems to be ok

Wondering why I can't ping, I run IPCONFIG and my Ethernet adapter's address is the old one, not the new fixed one that I assigned


[UPDATE] I haven't attached a router yet, it's a stand-alone PC. Thanks for pointing out that the router, when added, will probably be 192.168.1.1 so I should probably make my PC 192.168.1.2

but my point here is that I can't ping what I thought I set as my static IP and, indeed, it does not show up when I run IPCONFIG - I get the previous value.

1
  • Can you ping the previous value? Have you checked the Alternate Configuration tab in the TCP/IP properties dialog?
    – JoshP
    Jun 19, 2012 at 15:33

3 Answers 3

1

I have run into some Windows 7 installs that have icmp echo requests (ping responses) blocked in the firewall by default.

Check your firewall settings and add the icmp exception if you need to.

Also, there is more to setting up a static IP address than just the address. Your subnet mask also needs to be correct. It should probably be 255.255.255.0 if you've never had a reason to set it otherwise.

Also, like some others have said, verify that the static IP that you assign to your Windows 7 install is actually unique on your network. Most routers do indeed default to 192.168.1.1.

Are you even using a router? If there's no internet access and you only want a basic LAN setup, you wouldn't need one... a switch would suffice.

1
  • +1 I haven't attached a router yet, it's a stand-alone PC, but suspect that I will need to change my PCs address to 192.168.1.2 Thanks. And, yes, the subnet mask is correct Jun 15, 2012 at 1:48
2

You do understand that localhost is 127.0.0.1 not 192.168.1.1 right?

I am going to guess is that your computer's local interanet address is NOT 192.168.1.1 that likely is your router.

localhost is the local computer. If the database is stored on the local computer you should use localhost instead of an ip address.

You really should give us more detail though. I just assume you have a router since 99.8% of routers default address is 192.168.1.1

4
  • 2
    The local address should be 192.168.1.1, because Mawg configured such an address in the network adapter Properties. Jun 14, 2012 at 11:47
  • @grawity - 127.0.0.1 is set to localhost because of an entry in the hosts file. Which exists unless removed or modified.
    – Ramhound
    Jun 15, 2012 at 0:47
  • Yes, I know that 127.0.0.1 is (by default) localhost. I want my PC to have address 192.168.1.1 and for it and others to be avble to address it that way. Uou may have a good point about router default IP address, so many I should make my PC 192.1.168.1.2 - but my point here is that I can't ping what I thought I set as my static IP and, indeed, it does not show up when I run IPCONFIG - I get the previous value. Jun 15, 2012 at 1:43
  • 1
    @Mawg - To a computer that is assigned 192.1.168.2 the local loopback address 127.0.0.1 and 192.1.168.2` is itself. If it does not show up in IPConfig then you are doing something wrong. You don't need the computer to reply to its own local ip address 192.1.168.2 using localhost would be a better configuration. If 192.1.168.3 attempted to ping 192.1.168.2 it should be reachable
    – Ramhound
    Jun 15, 2012 at 10:45
1

Probably you have 192.168.1.1 fixed on your router, or your ip range it is different.

1
  • 2
    Even if the router already has 192.168.1.1 assigned, there's nothing that should prevent the same address from being assigned to the computer. Windows would display a warning about duplicate addresses but accept the configuration. Jun 14, 2012 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .