Hi, My wife and I live in a two-storey flat, and we have a small home LAN (100% CentOS 5) with a "classical" configuration: On the ground floor, there is the telephone jack with the DSL modem router (192.168.1.254). This modem has a mini-switch with two Ethernet jacks to it, and the two are used by: - the server (192.168.1.1), a "black box" running in a cupboard 24/7 - the wireless AP (192.168.1.253) Then, on the first floor, everything is connected by wireless, and for the moment, configured statically: - my desktop PC (192.168.1.2) - my laptop (192.168.1.3) - my wife's laptop (192.168.1.4) I have an older laptop here, a Fujitsu Siemens Amilo D, that I'd like to use as a simple build box. It's physically installed next to my desktop PC. It doesn't have a wireless card, so I vaguely thought: is it somehow possible to connect this laptop with an Ethernet cable to my desktop PC's unused Ethernet card, and then connect it to the internet? In that case, I wonder if I have to bridge the desktop PC's network interfaces (wlan0 and eth0). That said, I don't even know if the driver for wlan0 (rt61) allows any bridging. Or maybe simply configure a different subnet, but then, what would the network configuration look like on the laptop and on the desktop PC? Any suggestions for that? Cheers, Niki
Niki Kovacs <contact at kikinovak.net> wrote:> I have an older laptop here, a Fujitsu Siemens Amilo D, that I'd like to > use as a simple build box. It's physically installed next to my desktop > PC. It doesn't have a wireless card, so I vaguely thought: is it somehow > possible to connect this laptop with an Ethernet cable to my desktop > PC's unused Ethernet card, and then connect it to the internet? In that > case, I wonder if I have to bridge the desktop PC's network interfaces > (wlan0 and eth0). That said, I don't even know if the driver for wlan0 > (rt61) allows any bridging. Or maybe simply configure a different > subnet, but then, what would the network configuration look like on the > laptop and on the desktop PC?You need what's called a crossover cable between the laptop and your desktop. Think of a crossover cable as being like a "null modem" built into the cable for networking. The tx wire at one end becomes the rx wire at the other for all wires in the cable. This will allow the two systems to "talk". The laptop's LAN settings should be set to have your desktop as it's gateway and I think you'll need to manually add a host route on the desktop for the laptop using the wired NIC as the interface. You'll have to Google or get more advice from the list if you want to have the laptop be able to get onto the internet. It should be possible to set up your desktop to route packets from the laptop through your wireless LAN. I just don't know how. If you can't get the wireless NIC to bridge with the regular NIC, it should be possible to do something with iptables rules to just forward packets that aren't for the desktop to your wireless modem/router. If you're trying to get this done over the weekend, respond to me directly if you have any questions. I get the CentOS list as a digest so I won't see any other questions until Monday. Cheers, Dave -- Politics, n. Strife of interests masquerading as a contest of principles. -- Ambrose Bierce
On Sun, 2008-02-17 at 07:34 +0100, Niki Kovacs wrote:> Hi, > > My wife and I live in a two-storey flat, and we have a small home LAN > (100% CentOS 5) with a "classical" configuration: > > On the ground floor, there is the telephone jack with the DSL modem > router (192.168.1.254). This modem has a mini-switch with two Ethernet > jacks to it, and the two are used by: > > - the server (192.168.1.1), a "black box" running in a cupboard 24/7 > - the wireless AP (192.168.1.253) > > Then, on the first floor, everything is connected by wireless, and for > the moment, configured statically: > > - my desktop PC (192.168.1.2) > - my laptop (192.168.1.3) > - my wife's laptop (192.168.1.4) > > I have an older laptop here, a Fujitsu Siemens Amilo D, that I'd like to > use as a simple build box. It's physically installed next to my desktop > PC. It doesn't have a wireless card, so I vaguely thought: is it somehow > possible to connect this laptop with an Ethernet cable to my desktop > PC's unused Ethernet card, and then connect it to the internet? In that > case, I wonder if I have to bridge the desktop PC's network interfaces > (wlan0 and eth0). That said, I don't even know if the driver for wlan0 > (rt61) allows any bridging. Or maybe simply configure a different > subnet, but then, what would the network configuration look like on the > laptop and on the desktop PC? > > Any suggestions for that? >Unless you really want to spend the time learning the networking configs on CentOS, I'd suggest getting a simple Ethernet to 802.11 bridge. These are commonly called "game adaptors" here in the US.
Niki Kovacs wrote:> Hi, > > My wife and I live in a two-storey flat, and we have a small home LAN > (100% CentOS 5) with a "classical" configuration: > > On the ground floor, there is the telephone jack with the DSL modem > router (192.168.1.254). This modem has a mini-switch with two Ethernet > jacks to it, and the two are used by: > > - the server (192.168.1.1), a "black box" running in a cupboard 24/7 > - the wireless AP (192.168.1.253) > > Then, on the first floor, everything is connected by wireless, and for > the moment, configured statically: > > - my desktop PC (192.168.1.2) > - my laptop (192.168.1.3) > - my wife's laptop (192.168.1.4) > > I have an older laptop here, a Fujitsu Siemens Amilo D, that I'd like > to use as a simple build box. It's physically installed next to my > desktop PC. It doesn't have a wireless card, so I vaguely thought: is > it somehow possible to connect this laptop with an Ethernet cable to > my desktop PC's unused Ethernet card, and then connect it to the > internet? In that case, I wonder if I have to bridge the desktop PC's > network interfaces (wlan0 and eth0). That said, I don't even know if > the driver for wlan0 (rt61) allows any bridging. Or maybe simply > configure a different subnet, but then, what would the network > configuration look like on the laptop and on the desktop PC? > > Any suggestions for that? > > Cheers, > > NikiThis one qualifies for "There's more than one way to skin a cat". Your final thought is what *I* would do; indeed, what I have done to share a dialup connection before DSL was available here. 1. Leave your current working LAN untouched. 2. Physically connect your desktop PC and the older laptop with a rollover cable. 3. Create a second network on your desktop PC using eth0. 192.168.2.1 would work fine. 4. Add the laptop to the new network, assigning it 192.168.2.2 (or whatever) At this point, you should be able to ping the desktop from the laptop and vice versa. 5. Forward the new network to the old one. On the desktop, as root, enter: # echo 1 > /proc/sys/net/ipv4/ip_forward 6. You should now be able to access the Internet from the hard-wired laptop. 7. To make the change in (5) persist across reboots, etc., edit /etc/sysctl.conf as root and change net.ipv4.ip_forward = 0 --to-- net.ipv4.ip_forward = 1 As far as the rollover cable, I was fortunate enough to stumble upon some RJ-45 reversing couplers so that I never have to worry about the "here it comes" and "there it goes" pairs. Saves wear & tear on crimpers. :-)