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 |
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 |
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? |
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 HTH, Evo2. |
Thanks evo, I just noticed the comment at the top of the file "Generated by dhcpcd from eth0". So that explains it.
Cheers |
All times are GMT -5. The time now is 01:16 PM. |