Connect Linux box to the Internet via Linksys WRT54G router

Akshay Lamba alamba-zCpon8wu3duE88LZEN7QYV6hYfS7NtTn at public.gmane.org
Thu Mar 24 06:15:43 UTC 2005


Your routing table has a small error. Run the following 2 commands:

$ route del 192.168.1.0
$ route add 192.168.0.0 mask 255.255.255.0 gw 192.168.1.1

Regards,
Akshay

  ----- Original Message ----- 
  From: Michael Yang 
  To: tlug-lxSQFCZeNF4 at public.gmane.org 
  Sent: Thursday, March 24, 2005 10:43 AM
  Subject: Re: [TLUG]: Connect Linux box to the Internet via Linksys WRT54G router


  Hello all,

  Thank you very much to you all for your quick responses. I still have problems with the Internet connection. I updated the linux version to Mandrake 10.1 today, problem still exists. Below are the status after I manualy assign eth0 with 192.168.1.100. During startup, i selected dhcp and eth0 can not be brought up. The NIC card is a an old 3Com 509B ISAPNP card. would this be the cause of the problem? I did a few google search and it reports the card is supported. I am a little confused.

  [root at localhost michael]# ifconfig
  eth0      Link encap:Ethernet  HWaddr 00:20:AF:CC:45:50
            inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
            inet6 addr: fe80::220:afff:fecc:4550/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:1 errors:16 dropped:0 overruns:0 carrier:1
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 b)  TX bytes:23388 (22.8 Kb)
            Interrupt:5 Base address:0x220

  lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Mask:255.0.0.0
            inet6 addr: ::1/128 Scope:Host
            UP LOOPBACK RUNNING  MTU:16436  Metric:1
            RX packets:3063 errors:0 dropped:0 overruns:0 frame:0
            TX packets:3063 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0
            RX bytes:240954 (235.3 Kb)  TX bytes:240954 (235.3 Kb)

  [root at localhost michael]# route -n
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
  0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
  [root at localhost michael]#
  [root at localhost michael]# ping 192.168.1.1
  PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
  From 192.168.1.100 icmp_seq=1 Destination Host Unreachable
  From 192.168.1.100 icmp_seq=2 Destination Host Unreachable

  --- 192.168.1.1 ping statistics ---
  4 packets transmitted, 0 received, +2 errors, 100% packet loss, time 2999ms
  , pipe 2
  [root at localhost michael]#

  I appreciate all your kind help, should i read something more in-depth. XP connected to the router in no effort, i was expecting similar exprience with Linux. Maybe the way they deal wiht the connections are different. Any recommended reading?

  All the best,

  Michael

  Walter Dnes <waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org> wrote:
    On Tue, Mar 22, 2005 at 09:28:57PM -0500, Michael L Yang wrote
    > Hello everyone,
    > 
    > Good day!
    > 
    > I have just purchased a Linksys WRT54G router for my home network
    > (one pc and one windows laptop). The pc has both WinXP and Redhat
    > 7.3 on it. The wired connection is as below:
    > 
    > 
    > PC ------------
    > \
    > WRT54G router ---- Rogers Cable Modem ------Internet
    > (192.168.1.1)
    > /
    > Laptop-------
    > 
    > Under windows XP, both computers can access internet no problem. But
    > when I switch to RH on the PC, the networking is not working at
    > all. I can not even ping the router (192.168.1.1). I have turned on
    > dhcp via 'Network Configuration'. I wonder whether some one could
    > point me to the right direction.

    Two starting points...
    1) In linux, as root, execute the command...

    route -n

    What result do you get?

    2) Reboot the PC to Windows, connect to network, and check what your
    network settings show (IP address, gateway, netmask, etc). Write them
    down, and try to duplicate them in linux.

    -- 
    Walter Dnes 
    An infinite number of monkeys pounding away on keyboards will
    eventually produce a report showing that Windows is more secure,
    and has a lower TCO, than linux.
    --
    The Toronto Linux Users Group. Meetings: http://tlug.ss.org
    TLUG requests: Linux topics, No HTML, wrap text below 80 columns
    How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





------------------------------------------------------------------------------
  Post your free ad now! Yahoo! Canada Personals
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20050324/7cd559fb/attachment.html>


More information about the Legacy mailing list