Re: Configure DSL and Linux network
From: Tim McCoy (tmccoy_at_hotPOP.com)
Date: 06/17/05
- Previous message: Bit Twister: "Re: Configure DSL and Linux network"
- In reply to: linuxquestion_at_yahoo.com: "Configure DSL and Linux network"
- Next in thread: Tim McCoy: "Re: Configure DSL and Linux network"
- Reply: Tim McCoy: "Re: Configure DSL and Linux network"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 17 Jun 2005 16:12:19 +1000
On Thu, 16 Jun 2005 19:32:04 -0700, linuxquestion wrote:
> Dear Experts,
>
> I have 2 XP/Linux dual boot machines.
>
> Previously, these machines were connected with a
> crossover cable, and they could talk to each other.
> But now, there is a DSL modem, and router that
> is not configured right.
>
> I have installed DSL on the XP side, and it is working well.
> Now, I'm trying to get it to work on Linux. First and
> foremost, I need the two Linux machines to talk to each
> other, through the router. Internet is secondary.
>
> So far, I can't even ping the modem, or router, so
> some fundamental configuration is needed.
>
>
> Hardware:
> The IP addresses are what is configured on the XP side.
>
> 2 XP/Linux dual boot machines
> 192.168.2.2 - white
> 192.168.2.3 - red
>
>
> (Westell) DSL modem with Verizon
> 192.168.1.1
>
>
> Belkin Wireless G router
> 192.168.2.1
> also
> 192.168.1.47
>
>
> Linux: Redhat 3.2
> Kernel: 2.4.21-27.0.2.ELorafw1
>
>
> I want the private network to be called:
> testrac.com
>
>
> The IP addresses need to be static.
>
>
> --------------------------
>
> Here is some analysis.
>
> [root@red notes]# ping 192.168.1.1
> connect: Network is unreachable
>
> [root@red notes]# ping 192.168.1.47
> connect: Network is unreachable
>
> Fortunately, the machine can ping itself.
>
>
> cat /etc/hosts
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 192.168.2.3 red.testrac.com red
> 192.168.2.2 white.testrac.com white
> 127.0.0.1 localhost.localdomain localhost
>
>
> route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
> 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0
> eth0
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
> lo
>
>
> cat /etc/sysconfig/network
> NETWORKING=yes
> HOSTNAME=red.testrac.com
>
>
> ifconfig -a
> eth0 Link encap:Ethernet HWaddr 00:07:E9:3C:E3:24
> inet addr:192.168.2.3 Bcast:192.168.2.255
> Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:917 errors:0 dropped:0 overruns:0 frame:0
> TX packets:743 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:189781 (185.3 Kb) TX bytes:53423 (52.1 Kb)
> Interrupt:10 Base address:0xdf40 Memory:fcffb000-fcffb038
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> UP LOOPBACK RUNNING MTU:16436 Metric:1
> RX packets:16505 errors:0 dropped:0 overruns:0 frame:0
> TX packets:16505 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:1750236 (1.6 Mb) TX bytes:1750236 (1.6 Mb)
>
>
> cat /etc/resolv.conf
> search testrac.com
>
> cat /etc/dhcpd.conf
> cat: /etc/dhcpd.conf: No such file or directory
>
>
> route add default gw 192.168.1.1
>
> SIOCADDRT: Network is unreachable
>
>
> --------------------------
>
>
> I've been looking for a good how-to on the web, but
> can't find anything concise. If you know of some
> good concise web pages, please refer me to them.
>
> Or, if you know what I need to do, please let
> me know.
>
>
> Thanks!
I get the feeling this has a lot to do with the setup of your network.
Windows is probably resolving the addresses magically, but Linux will
whinge and complain about strange network setups.
Firstly, I'd recommend lining up your Wireless and fixed network
addresses. Unless you have 500 machines (you did say 2!), then you'll only
need the one subnet. I'll advise with just the 192.168.1.x range.
192.168.1.1 -> modem
192.168.1.255 -> wireless gateway (responding to DHCP requests)
192.168.1.2 -> red
192.168.1.3 -> white
Alternatively, with the 192.168.2.x subnet:
192.168.2.1 -> modem
192.168.2.254 -> wireless gateway (responding to DHCP requests)
192.168.2.2 -> red
192.168.2.3 -> white
In windows, this is simple enough to configure. You need to hack out
something like /etc/network/interfaces in Linux, but to test it's
functionality, do the following manual.
Example for RED
ifconfig eth0 down
ifconfig eth0 192.168.1.2
route addd default gw 192.168.1.1
...then make some ping attempts. Interestingly, if you MUST have
everything on the 192.168.2 subnet, then that's also possible - just make
subsitutions as above. You can't add 192.168.1.1 as the default gateway at
the moment, as Linux is probably having issues with you connected to the
2.x network, and the gateway existing on 1.x. Maybe, maybe not, though.
Here is my network configuration file, but is for Debian. RedHat 3 might
be different.
tmccoy@hackbox:~$ cat /etc/network/interfaces
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
Simplify the network topology and work upwards. You'll also find that a
solid network config will be less likely to strangely die (as I've seen
many times before).
Note that all of this assumes your modem is doing NAT - the wirless router
should really only be doing wireless work.
Cheers
Tim
-- "Linux... because rebooting is for adding new hardware!" http://home.swiftdsl.com.au/~tmccoy MSN: timsy_01@hotmail.com ICQ: 160341067
- Previous message: Bit Twister: "Re: Configure DSL and Linux network"
- In reply to: linuxquestion_at_yahoo.com: "Configure DSL and Linux network"
- Next in thread: Tim McCoy: "Re: Configure DSL and Linux network"
- Reply: Tim McCoy: "Re: Configure DSL and Linux network"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|