
Hi Gun, I've CC'd this back to the WLUG mailing list where everyone else can help too.
I am going well with Linux. I have been learning basic commands and these past few days how to use the 'info' command. I have a network problem with my linux box. It is not on the nw. 'route' shows: eth0 192.168.2.0 eth1 192.168.1.0 subnet 255.255.225.0 for both eth0 connects to the adsl router with ip add. 192.168.1.1 eth1 connects to the switch/hub. The 2 other workstations are Windows XP with ip add. 192.168.1.4 and 192.168.1.3. I think the problem is with eth0 being 192.168.2.0 when it should be 192.168.1.2. If this is the case, how do I change the eth0 address. Is this clear enough? Any help you can offer would be much appreciated.
Assuming you're running Red Hat or Mandrake, try poking around /etc/sysconfig/network. There's a ifcfg-eth0 file in there that will contain all the parameters for your networking, that is loaded at boot time. If you change it, you can reload networking with something like '/etc/init.d/networking restart' or 'service network restart' - have a look in the /etc/init.d dir, poke around, Google, see what you can find. Otherwise, you can 'manually' reconfigure an interface with ifconfig; # ifconfig eth0 192.168.1.2 netmask 255.255.255.0 You probably shouldn't, however, have this setup. If your ADSL router is a router, and connects into your switch, you only need one network card, which connects into the switch as well. After you get this configuration going, you can look at doing trickier stuff. You may want, for ease of configuration, to use two different subnets if you're going to have a "router->linux box" and a "linux box->windows" LAN. If you have any more questions, you might like to start with RUTE's networking section at http://www.icon.co.za/~psheer/book/node28.html.gz. Craig

Craig Box wrote:
Hi Gun,
I've CC'd this back to the WLUG mailing list where everyone else can help too.
I am going well with Linux. I have been learning basic commands and these past few days how to use the 'info' command. I have a network problem with my linux box. It is not on the nw. 'route' shows: eth0 192.168.2.0 eth1 192.168.1.0 subnet 255.255.225.0 for both eth0 connects to the adsl router with ip add. 192.168.1.1 eth1 connects to the switch/hub. The 2 other workstations are Windows XP with ip add. 192.168.1.4 and 192.168.1.3. I think the problem is with eth0 being 192.168.2.0 when it should be 192.168.1.2. If this is the case, how do I change the eth0 address. Is this clear enough? Any help you can offer would be much appreciated.
In the future, please paste route tables rather than trying to convert it back into english. If you make eth0 on 192.168.1.0/255.255.255.0 you are going to have two routes on different physical interfaces pointing to the same network. This means the first interface to come up will "win" all the packets, meaning most likely you will be able to ping the router and use the internet from your linux box, but your windows boxes won't be connected. What you need to do is either put the router on the same _physical_ network (read: switch/hub) as the rest of the 192.168.1/24 logical network, or create two distinct logical networks, one for each interface. This could be as simple as changing the IP on the router to 192.168.2.254. What I suggest is the following: ADSL Router: 192.168.2.254 / 255.255.255.0 eth0 : 192.168.2.1 / 255.255.255.0 eth1 : 192.168.1.1 / 255.255.255.0 Windows boxes : 192.168.1.2-254 / 255.255.255.0 I highly recommend you also read up on DHCP and use this to configure all-other boxes rather than doing them manually. Regards James -- James Spooner http://www.wlug.org.nz/JamesSpooner Home: +64 7 8569440 Email: james(a)spoons.gen.nz Mobl: +64 21 447638 Fax: +64 7 858 5095
participants (2)
-
Craig Box
-
James Spooner