Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.