Re: Configure DSL and Linux network

From: Tim McCoy (tmccoy_at_hotPOP.com)
Date: 06/17/05

  • Next message: Tim McCoy: "Re: Configure DSL and Linux network"
    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
    

  • Next message: Tim McCoy: "Re: Configure DSL and Linux network"

    Relevant Pages

    • Re: GPS Unit for Timekeeping on Linux?
      ... You could do a network share between your two machines - 100' isn't ... your system crashes &/or 2) put your overall Linux on a bootable CD, ... >to manually update the time by the network every day; however, ...
      (sci.geo.satellite-nav)
    • Re: Advanced Security Question
      ... The upgrade will probably include thin clients (getting ... linux image by TFTP) and wireless. ... We want to control all of the traffic on the network to the point and ... You corrupt the ARP tables of the remote machines ...
      (comp.os.linux.security)
    • Re: networking
      ... I can ping my windows machine from the Linux box and can ping the Linux box from Windows. ... network servers in Linux it shows Windows Network. ... I have a home network set up and working with all other computers: Two other Windows machines and three Linux boxes, two of which are running Ubuntu and one running SUSE and they all work fine with both file sharing and print sharing. ...
      (linux.redhat.misc)
    • Re: eepc waste of money
      ... but I have a vista laptop and a 3g wireless modem. ... Worked perfectly first time in the native Xandros Linux, ... My EEPC had no trouble with the network. ... If you make a network of random Windows machines, ...
      (sci.electronics.design)
    • Re: Configure DSL and Linux network
      ... > I have 2 XP/Linux dual boot machines. ... I'm trying to get it to work on Linux. ... > So far, I can't even ping the modem, or router, so ... > I want the private network to be called: ...
      (linux.redhat.install)