LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-11-2005, 07:30 PM   #1
gunther
LQ Newbie
 
Registered: May 2005
Location: Montreal
Distribution: FC3
Posts: 10

Rep: Reputation: 0
Home network: connecting to a Linksys router for DHCP IP address - no ping


Hi all - I'm having trouble with my network connection on a Compaq Presario system on which I just installed FC3 (dual boots with WinXP). Under XP, the Linksys BEFSR41-CA (Canada) - running its own DHCP server) connects fine to my DSL isp and all is good. However, I'm getting no love from the setup,

FC3 Linux Box --> Linksys BEFSR41-CA --> DSL Modem (Westell Wirespeed)

When I configure the eth0 connection to obtain the IP address automatically from the ISP (as it should be, I believe - the ISP agrees wholeheartedly), the eth0 launch on boot fails and I get the following timeout/error message when I try an `ifup eth0`:

# ifup eth0 Determining IP information for eth0... failed.

My ethernet card appears to be detected fine:

VIA Technologies, Inc. VT6102 [Rhine-II]

By all accounts, this shouldn't be the source of any problem.

My ifconfig -a for eth0 is:

eth0 Link encap:Ethernet HWaddr 00:10C7:64:EF
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11

So it looks like the connection didn't come up because of its failed attempt to obtain an IP address. Accordingly, when I try a ping to my router at 192.168.1.1 (I thought it was worth a try - getting desparate, I guess) nothing flies.

When I change my network configs to a static IP address (I tried 192.168.1.4 with a mask of 255.255.255.0), I can bring up eth0, but still can't ping the router. Since DHCP is supposed to work, I didn't go much further than that with the static IP.

Other information that might (I hope) be useful.
ifcfg-eth0:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
USERCTL=no
PEERDNS=yes
TYPE=Ethernet
IPV6INIT=no

uname -a:
Linux localhost.localdomain 2.6.9-1.667 #1 Tue Nov 2 14:41:25 EST 2004 i686 athlon i386 GNU/Linux

I'll be more than happy to provide any additional information that would be useful. Thanks
ron
 
Old 05-11-2005, 08:21 PM   #2
phats_O
Member
 
Registered: Apr 2005
Distribution: debian
Posts: 38

Rep: Reputation: 15
quote:

Other information that might (I hope) be useful.
ifcfg-eth0:
DEVICE=eth0
onBOOT=yes
BOOTPROTO=dhcp
USERCTL=no
PEERDNS=yes
TYPE=Ethernet
IPV6INIT=no
:endquote

I am not an expert, but I think you should try putting a # in front of 'USERCTL=no' and reboot. I think that is what is keeping you from bringing up eth0
 
Old 05-11-2005, 08:24 PM   #3
phats_O
Member
 
Registered: Apr 2005
Distribution: debian
Posts: 38

Rep: Reputation: 15
I should have mentioned,just in case, that the # has the effect of commenting out that line, so it is ignored. Its the equivalent of deleting the line, but it allows you to retain it - if you end up needing it, you just delete the # and you're back in business.
 
Old 05-11-2005, 08:42 PM   #4
gunther
LQ Newbie
 
Registered: May 2005
Location: Montreal
Distribution: FC3
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for the quick reply Phats_O - I should have mentionned that I was running as root. Just in case, I gave it a go, but had no luck. I've now changed the ifcfg-eth0 to:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
USERCTL=yes
TYPE=Ethernet
IPV6INIT=no

I guess it won't do any harm while I'm getting this figured out.
ron
 
Old 05-11-2005, 10:49 PM   #5
phats_O
Member
 
Registered: Apr 2005
Distribution: debian
Posts: 38

Rep: Reputation: 15
ok, I just reread your post, and Im confused about exactly what you're trying to do. Your router should be connecting to your isp to obtain your internet (wan) ip address. Usually the router clones the mac address of your computer to display to the isp. Then your router's dhcp handles the assignment of ip addresses internally (lan). You don't really want to try to connect to your isp from the linux box, just to your router. I definitely suggest you include the GATEWAY=192.168.xx.xx in your ifcfg file. I don't know how much control your router gives you, but if it allows you to set static ip addresses for your LAN(like mine does), then that would solve your problem. Your ifcfg file would look something like:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
GATEWAY=192.168.xx.xx
NETMASK=255.255.255.0
IPADDR=192.168.xx.xx
TYPE=Ethernet

With this setup, your router handles the dynamic addressing from your isp, and handles the static address for your computer. Obviously, you'd want to replace the ip addresses with ones appropriate for your network.
I hope this helps.

PS. the 'onboot' above should be all caps. For some reason the 'on' becomes lowercase when I post it?!?!?
 
Old 05-11-2005, 10:52 PM   #6
phats_O
Member
 
Registered: Apr 2005
Distribution: debian
Posts: 38

Rep: Reputation: 15
To be clear, the ip address in the line GATEWAY=192.168.xx.xx is the gateway address of your router, NOT your isp!!!
 
Old 05-11-2005, 10:56 PM   #7
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
The problem is that his machine isn't getting an IP from the DHCP server in his router.

The fact that static IP also isn't working suggests that the NIC itself is having some sort of problem.

Now, you show that your NIC is being detected, but what is that ouput from? If you are using "lspci" it can show a device even if there is no module loaded for it.

Check the output of "lsmod" to see if a module has been loaded for your NIC.
 
Old 05-11-2005, 10:57 PM   #8
phats_O
Member
 
Registered: Apr 2005
Distribution: debian
Posts: 38

Rep: Reputation: 15
If you must use dhcp from the router, make sure you keep the gateway= line in the ifcfg file - it makes it much easier for the computer to find the dhcp server at boot time.
 
Old 05-11-2005, 11:12 PM   #9
phats_O
Member
 
Registered: Apr 2005
Distribution: debian
Posts: 38

Rep: Reputation: 15
quote:The fact that static IP also isn't working suggests that the NIC itself is having some sort of problem.:end quote

Ron, what is the exact message you get when you try to ping the router?

MS3FGX could very well be right about a problem with the nic, but theres still a fundamental difference between getting an ip address from your router, and trying to go through a router to obtain an address from the isp. If you want to get the address from your isp, then you don't need a router, and if you need a router, you dont need to get your ip from your isp.
 
Old 05-11-2005, 11:50 PM   #10
phats_O
Member
 
Registered: Apr 2005
Distribution: debian
Posts: 38

Rep: Reputation: 15
On the other hand, none of that matters if your nic isn't installed correctly.
I was thinking that since your mac address was showing in the ifconfig output, along with broadcast and multicast, that you had suceeded in installing your nic. After reading MS3FGX's post, I looked at the ifconfig output again....what stands out to me now, is that the TXpackets equal 0. You should have transmitted some packets, that you didn't, almost definitely means some problem with your nic.
 
Old 05-12-2005, 12:26 AM   #11
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,733
Blog Entries: 12

Rep: Reputation: 456Reputation: 456Reputation: 456Reputation: 456Reputation: 456
I had a similiar problem when I updated dnsmasq it also update resolvconf and overwrote the resolv.conf file.

Couldn't connect and when I tried to use something like Kmail it said invalid host for my pop3.

Had to manually add the gateway and dns nameservers and it worked.
 
Old 05-12-2005, 02:40 AM   #12
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Is the case of "onBOOT" important?
 
Old 05-12-2005, 02:41 AM   #13
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Is the case of "onBOOT" important in his eth0-cfg file?
 
Old 05-12-2005, 03:43 AM   #14
n0xvb
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; openSUSE 11.2
Posts: 255

Rep: Reputation: 32
After you set eth0 with static IP address, did you add routing for that interface as well? DHCP will automatically do this for you, but if you set a static address you'll need to add this as well.

Something like this after ifup eth0 (using your previous example):

Code:
route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0
route add default gw 192.168.1.4
Now you can attempt to ping or connect to IP addresses, if you want name resolution
you'll need to add the appropriate line(s) to your resolv.conf file:

Code:
nameserver 192.168.1.1
 
Old 05-12-2005, 04:46 AM   #15
gunther
LQ Newbie
 
Registered: May 2005
Location: Montreal
Distribution: FC3
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by phats_O
If you must use dhcp from the router, make sure you keep the gateway= line in the ifcfg file - it makes it much easier for the computer to find the dhcp server at boot time.
ok - I just added GATEWAY=192.168.1.1 to my ifcfg-eth0 and rebooted. Still no luck - networking fails to bring up eth0.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to my linksys router gbogle Linux - Newbie 3 05-02-2005 09:47 PM
Can't ping Linksys router on Fedora 2 with WMP54G freek sanders Linux - Wireless Networking 0 09-10-2004 12:21 PM
MAC address? DHCP - Home Network ntwkthtbtch Linux - Newbie 2 08-24-2004 07:08 AM
Home network using linksys router -- DHCP server? GoinEasy9 Linux - General 12 04-01-2004 11:32 PM
Connecting to Net with Surecom Network card and Linksys Router? EpicLinux Linux - Newbie 0 10-28-2003 02:04 PM


All times are GMT -5. The time now is 01:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration