Networking help for XAMPP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Networking help for XAMPP

Postby moonrad » 27. July 2012 15:37

Hi all, I've been searching through the forums for a solution to my problem, and so far I have been unable to locate a solution.

Here is my situation:
Image

I have three routers in the locations shown above and a local website and MySQL database on a laptop. The Main router is the default gateway (DHCP is disabled on the other two routers), and all devices used on the network have their own static IP's.

I can currently access the local website on the laptop from the desktop PC at location 1, regardless of the location of the laptop. i.e. The laptop could be in location 3, and I can still access the website from location 1 (on the PC only). However, I am unable to access the website or database from any mobile device, unless I am in the same location as the laptop.
I can also connect to the NAS Drive from any location on the network from any device.

i.e. if the laptop is in location 3 and I wish to access the website using an iPad it works, but if I move to location 2 or 1, then I am unable to access it.

I have tried altering the XAMPP config files to allow the ip addresses of the mobile devices, but it still won’t connect.

Eventually, I intend to setup the website and database on a desktop server, but for development purposes, I have been using the laptop.

Any help would be greatly appreciated.
Self-taught HTML, CSS, PHP, MySQL noob.
User avatar
moonrad
 
Posts: 6
Joined: 11. July 2012 11:19
Location: UK
Operating System: Windows 7

Re: Networking help for XAMPP

Postby JonB » 27. July 2012 15:54

I'd guess that the mobile devices are getting IP's that are on the subnet that is at '3'

Good Luck
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Networking help for XAMPP

Postby moonrad » 27. July 2012 16:00

All devices should be getting the same subnet (255.255.255.0) from the main router.
Self-taught HTML, CSS, PHP, MySQL noob.
User avatar
moonrad
 
Posts: 6
Joined: 11. July 2012 11:19
Location: UK
Operating System: Windows 7

Re: Networking help for XAMPP

Postby JonB » 27. July 2012 20:40

You have a problem that has nothing to with XAMPP - it has to do with networking and routing.

All devices should be getting the same subnet (255.255.255.0) from the main router
.

That is a misunderstanding - 255.255.255.0 is the subnet 'MASK' - which expresses the permissible range of the IP's on that particular subnet - 255.255.255.0 means all IPv4 addresses in the subnet are valid (members of the same host range).

Routers are like fences, they divide networks into segments, and -- generally -- you can't see from one segment into another (that is likely the problem). Segments have nothing to do with subnets 'other' than indirectly.

I am very unsure why you have three routers, and not one router and two switches. Does the WAN cable on #3 go into a LAN port on #2, and then the #2 Wan port lead to a LAN port on #1? Or is there a different cabling scheme?

Which router has the wireless radio enabled? What specific IP's are used/obtained when the mobile devices attach?


As a statement, although I am helping you with this, this is out of scope.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Networking help for XAMPP

Postby moonrad » 28. July 2012 11:16

Hey JonB! thanks for the help.

To answer your questions:

I am using three routers because they're what I had available without purchasing extra. Also they all have 4 LAN ports and are all wifi enabled. I have connected router 1, 2, and 3 via Ethernet (as you said, wired from one LAN port to another) mainly because we use a variety of wireless and wired equipment. I have the wifi network setup on the same SSID and channel on all routers.

Router 1 has the IP address 192.168.0.1
Router 2 has the IP address 192.168.0.2
Router 3 has the IP address 192.168.0.3
DHCP range is from 192.168.0.4 - 192.168.0.100
And all other devices have a static IP above 192.168.0.100
Router 2 & 3 have DHCP disabled

I thought it was a setting with XAMPP because I can access the different resources on the network from any location. I.e. I can access the NAS drive (wired) at location 3 from the iPad connected wirelessly at location 1.

Again, I appreciate your help, and apologies if it's out of scope.
Self-taught HTML, CSS, PHP, MySQL noob.
User avatar
moonrad
 
Posts: 6
Joined: 11. July 2012 11:19
Location: UK
Operating System: Windows 7

Re: Networking help for XAMPP

Postby JonB » 28. July 2012 17:21

You did something unnecessary. At the end there may be a simpler solution than router-chaining

Is the default gateway address for ALL devices and ALL DHCP router settings 192.168.0.1?

Just from a 'thought experiment basis' I'm guessing your server (laptop) is on a fixed IP and you access it via that IP rather than a domain name or hosts entry. No matter where it is - that server is still 'serving exactly the same soup'. Little pile of stones/thus/therefore - if you cannot 'see it' on a given segment, you have a connectivity problem. The server can't control what the network delivers. Routers turn LANs into segments, and to some extent how that is done is a function of the router design (for example some routers cannot handle recursive NAT). I suspect we are dealing with a segmentation issue that is caused by a non-apparent setting in the routers (are they all the same?). [That is why I asked how it was cabled]

The using same SSID could be part of your issue, I'm not sure (the idea has my wifi brain in a catatonic state LOL). I have chained routers working perfectly OK, but there are lots of caveats.

OK here are two fix suggestions:

First try this -

1. Fix the ambiguous SSID issue with 3 'zone' names - Router-1, Router-2, Router -3 (or something more imaginative :mrgreen: )

testy testy testy

No worky?

leave that in place -

Now do this:

the cable from 3 to 2 - plug it into a LAN port on 3
the cable from 2 to 1 - plug it into a LAN port on 2

reset everything

You now have a ONE segment LAN, switches are transparent and can be daisy-chained until the MAC tables have problems OR you have a spanning-tree issue.

AND writing this i know the problem - :idea: :idea: :idea: :idea: :idea: :idea: :idea:

it is a segmentation issue.

on 2 and 3 the wireless devices can't GET a DHCP lease - its turned off, and because they are on a segment - they can't see the only router handing out addresses.


Hope this is not too confusing... :shock: This may need one more iteration to get there -- I am thinking about it...

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Networking help for XAMPP

Postby moonrad » 30. July 2012 11:52

JonB wrote:You did something unnecessary. At the end there may be a simpler solution than router-chaining

Is the default gateway address for ALL devices and ALL DHCP router settings 192.168.0.1?

Just from a 'thought experiment basis' I'm guessing your server (laptop) is on a fixed IP and you access it via that IP rather than a domain name or hosts entry. No matter where it is - that server is still 'serving exactly the same soup'. Little pile of stones/thus/therefore - if you cannot 'see it' on a given segment, you have a connectivity problem. The server can't control what the network delivers. Routers turn LANs into segments, and to some extent how that is done is a function of the router design (for example some routers cannot handle recursive NAT). I suspect we are dealing with a segmentation issue that is caused by a non-apparent setting in the routers (are they all the same?). [That is why I asked how it was cabled]

The using same SSID could be part of your issue, I'm not sure (the idea has my wifi brain in a catatonic state LOL). I have chained routers working perfectly OK, but there are lots of caveats.

OK here are two fix suggestions:

First try this -

1. Fix the ambiguous SSID issue with 3 'zone' names - Router-1, Router-2, Router -3 (or something more imaginative :mrgreen: )

testy testy testy

No worky?

leave that in place -

Now do this:

the cable from 3 to 2 - plug it into a LAN port on 3
the cable from 2 to 1 - plug it into a LAN port on 2

reset everything

You now have a ONE segment LAN, switches are transparent and can be daisy-chained until the MAC tables have problems OR you have a spanning-tree issue.

AND writing this i know the problem - :idea: :idea: :idea: :idea: :idea: :idea: :idea:

it is a segmentation issue.

on 2 and 3 the wireless devices can't GET a DHCP lease - its turned off, and because they are on a segment - they can't see the only router handing out addresses.


Hope this is not too confusing... :shock: This may need one more iteration to get there -- I am thinking about it...

Good Luck
8)



Hey Jon

Default gateway for all is 192.168.0.1

Router is on fixed IP, to access, I simply type the ip address followed by the htdocs folder: I.e. 192.168.0.101/website/ which brings up the index.php page.
What I can't understand is why I can access the website using that method from the desktop at location 1, when the laptop is at location 3, but I can't with an iPad.

Routers aren't all the same.
Main router - Netgear DG834N
Router 2 - Netgear DG834G
Router 3 - Edimax AR-7266WNA

I can also access any router from anywhere on the network from any device.

I had the three router on separate SSIDs before and I still couldn't access the 'server' with mobile devices on different areas of the network. I just changed the SSID to the same for all to make it easier for other users not having to select a different WIFI network if they slightly overlapped.

Not quite sure what you mean with the cable idea to make one segment LAN.

Again, thanks for the help, my apologies for taking so much of your time.
Self-taught HTML, CSS, PHP, MySQL noob.
User avatar
moonrad
 
Posts: 6
Joined: 11. July 2012 11:19
Location: UK
Operating System: Windows 7

Re: Networking help for XAMPP

Postby JonB » 30. July 2012 13:48

Provided you have not done 'something special' in the wireless device configurations (i.e. made SSID specific changes) - they rely on the router they attach to to give them a DHCP lease. You can look in 'Attached Devices' on the routers to see what is happening.

A wireless device can't see the network AT ALL until it gets a lease and then connects. As I understand what you have done - 2 and 3 do not have DHCP active. i.e. unless you are connected to 1 (or have a lease that is still valid from being in 'Zone 1') you can't join the network. I'm betting they ONLY actually attach to 1.

One last question - do you rely on a wifi link for the laptop?

About cabling - what I am saying is don't use the WAN ports to link the segments, you will have a switch system.

Good Luck
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Networking help for XAMPP

Postby moonrad » 06. August 2012 09:46

Hey Jon

Sorry for the delay, I've been busy the last couple of days and haven't had much time spare.

Yes, the laptop is connected wirelessly.

The routers don't have any WAN ports, only LAN ports.
Self-taught HTML, CSS, PHP, MySQL noob.
User avatar
moonrad
 
Posts: 6
Joined: 11. July 2012 11:19
Location: UK
Operating System: Windows 7

Re: Networking help for XAMPP

Postby JonB » 06. August 2012 14:32

The routers don't have any WAN ports, only LAN ports.


'WAN port' is synonymous with 'Internet port' (because not all routers connect to the Internet). That was also my tip-off here. (I didn't check the router specs, assuming (bad JonB) they were Ethernet routers)

Although I may not be able to come up with the technical 'talking-through' needed here, you 'have' what I have tried to describe - a segmentation problem. Its a pure network design (and in this case - equipment) issue.

Routers are, effectively, two-way funnels/tunnels. You can't see what is on the far side, you can only see what is in the local pool (subnet). Anything outside the local pool has to be routed through the tunnel.

In your case - your 'routers' are not working as routers at all - they are effectively switches. They are not working as routers because they are special subclass of router - an ADSL2 modem router. They don't have a WAN port because they are designed to interface with an ISP's DSLAM over a Telco line via an RJ11 jack & microfilter. What ever programming you may do to devices 2 and 3 has no effect, as none of the traffic flows through the routing circuitry, all the traffic is switched.

IF your 'stuff' covers a large area, get two WI-fi-capable Ethernet routers (pure routers) to replace devices 2 & 3. You will need to create subnets and you may need static routes plus naming the SSID's differently.

If your signal from the primary router is strong enough, disable the radios on 2 & 3, and things may work as is (switched only). Point all your devices at the only working Router - device 1.

I should also tell you it is past 'bad practice' to put a server on a WI-fi link, when you want the laptop to act a server to other devices, use a cable to connect it to the closest switched port.

Good Luck.
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Networking help for XAMPP

Postby moonrad » 06. August 2012 21:54

Hey Jon.

I'll have a look at some routers to replace the ones I have, it seems the simplest solution.

As for the website, I'll be putting it on a wired server once I've finished with the programming.

Again, thanks for all your help.

Regards

Moonrad
Self-taught HTML, CSS, PHP, MySQL noob.
User avatar
moonrad
 
Posts: 6
Joined: 11. July 2012 11:19
Location: UK
Operating System: Windows 7

Re: Networking help for XAMPP

Postby JonB » 06. August 2012 22:04

OK - Good Luck

let us know what happens

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 74 guests