LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-16-2012, 08:38 PM   #1
archnemesis
Member
 
Registered: Dec 2009
Posts: 31

Rep: Reputation: 0
Can't get internet working without dhcpcd


I've just set up a new adsl2 modem/router, and tried to get the internet working on my PC by manually assigning an address and default route with the ip command:

ip addr add 192.168.1.10/24 dev eth0;
ip route add default via 192.168.1.1;

Using the ip show addr and ip show route commands I see everything looking the same as when using dhcpcd, and eth0 is up.

However it doesn't work. It's like I've forgotten some essential command needed to activate it. Any ideas?

Cheers
 
Old 02-16-2012, 09:04 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

is it a nameserver issue? What is in your /etc/resolv.conf? Can you ping IP addresses?
Eg
Code:
ping 8.8.8.8
Evo2.
 
Old 02-16-2012, 09:09 PM   #3
archnemesis
Member
 
Registered: Dec 2009
Posts: 31

Original Poster
Rep: Reputation: 0
Yes, that works.

EDIT: I have two nameservers in my /etc/resolv.conf though. I checked my ISP's site as well just to make sure they are correct. Is this not being read except when using dhcpcd for some reason?

Last edited by archnemesis; 02-16-2012 at 09:20 PM.
 
Old 02-16-2012, 09:22 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

so you should just need to define a nameserver in /etc/resolv.conf. Your router should probably provide one, so the following should work:
Code:
echo "nameserver 192.168.1.1" >> /etc/resolv.conf
However, your distro might provide some other way of managing that file. Have a look in your reslov.conf to see if there are any comments/instructions.

HTH,

Evo2.
 
Old 02-16-2012, 09:27 PM   #5
archnemesis
Member
 
Registered: Dec 2009
Posts: 31

Original Poster
Rep: Reputation: 0
Thanks evo, I just noticed the comment at the top of the file "Generated by dhcpcd from eth0". So that explains it.
Cheers
 
  


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
dhcpcd not working jimerickso Linux - Wireless Networking 1 04-02-2007 08:13 AM
Why has DHCPCD stopped working? the-yikes Linux - Wireless Networking 1 02-25-2007 01:07 PM
dhcpcd not working with working wlan0 mclinkor Linux - Wireless Networking 1 12-20-2005 11:12 AM
dhcpcd not working? [LAG] Prude Linux - Wireless Networking 7 03-24-2005 02:00 AM
blfs - dhcpcd - not working bauld Linux From Scratch 1 06-30-2002 12:55 PM


All times are GMT -5. The time now is 04:47 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration