LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-15-2007, 10:27 PM   #1
pdgardin
LQ Newbie
 
Registered: Jul 2006
Location: Canada
Distribution: Ubuntu/Slackware/Knoppix/Mandrake...
Posts: 7

Rep: Reputation: 0
Question Apache over crossover cable?


Hi,

I am getting a bit frusterated with the following issue, and I'm hoping someone might have a few tips to get me going.

In a nutshell, I want to have Apache on my linux computer be able to serve pages through a crossover cable to my winXP computer. Besides the crossover connection, both computers are wirelessly connected to a router (And I'd prefer to leave it that way and not share their net connection for various reasons).

I have apache installed and working fine, but I can't ever access it from my winXP computer. My router won't let me ping the IP address of the wireless connection on the linux machine from the XP machine. I'd like it if I could just be able to get pages served from Apache through the crossover cable regardless of anything else and without breaking my wireless connections.

Right now I have Ubuntu 7.04 running, but I'm willing to change if something else would make it easier, doesn't really matter to me.

Here is a crude ASCII diagram if my explanation wasn't clear:

Code:
----{Internet}
---------|
-[Wireless - Router]
-|-----------------|
[XP]<--crossover->[Linux]
----Apache port80
Thanks in advance,
-pdgardin

Last edited by acid_kewpie; 11-17-2007 at 08:13 AM. Reason: tried to fix diagram and failed
 
Old 11-16-2007, 12:50 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
You didn't really give all the details on your setup, so I don't know for sure how you have it working; but since both machines connect wirelessly to the router and also have the physical NICs connected, the wireless and wired networks should really be separate subnets.

So if the wireless network has IPs in the 192.168.1.x range, then make the two wired NICs have IPs like 192.168.2.1 and 192.168.2.2. Then you can bind Apache to the 192.168.2.x interface only, so it won't serve pages over the wireless interface.

When the XP machine wants to connect to the Apache server directly, it won't be using the wireless interface because the IP you are giving it isn't even on the wireless network. This would allow you to force all of the HTTP traffic over the cross-over cable, and not involve the wireless network at all.
 
Old 11-16-2007, 09:27 AM   #3
pdgardin
LQ Newbie
 
Registered: Jul 2006
Location: Canada
Distribution: Ubuntu/Slackware/Knoppix/Mandrake...
Posts: 7

Original Poster
Rep: Reputation: 0
hm... I believe I was trying something similar, although maybe not exactly this.

The wireless router is 192.168.0.1 and assigns IPs in the form 192.168.0.X. I assigned the two physical NICs IPs in the form 192.168.1.X and assigned both the wired and wireless Subnet masks of 255.255.255.0

This didn't really seem to be working but I'll try again, I may have been doing something a bit different - Ill check when I get home.

I guess then my other question though is, if I use a Web browser (or Ping or whatever) to try and talk to an address on the wired network (in the form 192.168.1.x), will the OS always automatically know which network interface to use? (i.e. what prevents it from trying to dial 192.168.1.x addresses over the wireless or trying to dial external internet addresses over the wired crossover cable?)

Otherwise, thanks again, I'll look into the setup of the subnets more when I get home.

-pdgardin
 
Old 11-16-2007, 09:45 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
On the Linux machine, check the output of /sbin/route. You may not have the routes setup.
 
Old 11-16-2007, 11:03 AM   #5
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Quote:
I guess then my other question though is, if I use a Web browser (or Ping or whatever) to try and talk to an address on the wired network (in the form 192.168.1.x), will the OS always automatically know which network interface to use? (i.e. what prevents it from trying to dial 192.168.1.x addresses over the wireless or trying to dial external internet addresses over the wired crossover cable?)
This is where the concept of default routes come into play, as jschiwal suggested.

Basically, the operating system has a list of default routers that it uses to link itself to other networks. If the machine can't contact a host on it's immediate network, it will by default send it to the default router that has been configured with the assumption that the router will know what to do with it.

With multiple interfaces and network configurations, each interface can have it's own default router to use, which helps shape traffic to where it needs to go. There are more advanced things you can do with routes, but that is the basic concept.
 
Old 11-17-2007, 12:22 AM   #6
pdgardin
LQ Newbie
 
Registered: Jul 2006
Location: Canada
Distribution: Ubuntu/Slackware/Knoppix/Mandrake...
Posts: 7

Original Poster
Rep: Reputation: 0
Thumbs up

It works! Just needed a bit of messing with the routing settings in winXP and Linux. Thanks very much for your time, MS3FGX and jschiwal.

-pdgardin
 
  


Reply

Tags
apache, crossover, server, ubuntu, xp



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crossover cable WolfCub Linux - Hardware 20 09-05-2009 01:20 PM
crossover cable or switch? acid_kewpie Linux - Networking 5 11-30-2006 07:05 PM
Data over a Crossover Cable unihiekka Linux - Networking 2 09-30-2006 09:00 AM
crossover cable Fuzia Linux - Networking 3 04-11-2006 06:49 AM
Crossover cable eggoz Linux - Networking 4 03-14-2004 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration