Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: RHEL, Debian, Gentoo when I'm brave.
Posts: 47
Rep:
im pritty noob myself, but i think i might be able to help here.
use "ifconfig" (as root) and see if eth0 is up,(i asume your using ethernet) if not use "ifconfig eth0 up" than, if you use dhcp, use "dhcpcd eth0", thats all i got. hope it helps.
use "ifconfig" (as root) and see if eth0 is up,(i asume your using ethernet) if not use "ifconfig eth0 up" than, if you use dhcp, use "dhcpcd eth0", thats all i got. hope it helps.
That will more than likely work but can be annoying to do everytime. which distro are u running?
You will just have to edit the net configuration, how is it when it doesn't work... and what does it look like when it is working? And what is the extent of not working? No internet, or just no DNS?
and what does it look like when it is working? And what is the extent of not working? No internet, or just no DNS?
I cant ping, I cant use firefox, cant use dselect, apt-get update doesnt work, cant use gaim... etc.
I have a dual boot with windows, and on windows the internet works correctly.
About the ifconfig, this is what I had when I have no connection. I have wrote it down on a piece of paper, and I am now typing it over, there could be some mistakes becouse of my bad handwryting:
That doesn't really mention what is wrong. Can you go to IP addresses, instead of web addresses? Then it is a simple DNS issue that can be resolved(no pun inteded) easily.
Try going to a few IPs like:
68.178.151.47
64.233.167.99
199.181.132.250
Let me know if that works when the internet is "dead"
Do you have 2 ethernet card? because u should see eth0 before eth1.
if u do have 2, do this in a console as root:
#ifconfig eth0 up
If u have a dynamic ip (more than likely) try this in a console as root:
#dhcpcd eth0
and/or
#dhcpcd eth1
then ifconfig should display about the same thing but u should have an ip addr assigned.
If u have a static ip u will have to assign it manually, i am not in linux right now so i cant find the command for that yet, but u probably have a dynamic.
Run those command and cut/paste any ouput u get for them, also post back ifconfig after running those if u still have problem.
The debian way is to edit the /etc/network/interfaces file.
In this file, it may look like:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
The above defines the loopback and the first ethernet device. It will use dhcp to assign the ip address. If you need a static ipaddress, then try the following for the eth0 device. Changing to an appropriate ip address.
auto eth0
iface eth0 inet static
address 192.168.0.2 <----- change address to reflect your network
netmask 255.255.255.0 <----- once again change appropriately
gateway 192.168.0.1 <----- put in the default gateway here, perhaps router address
If you always have the same IP number it does not means it is static. You could be using DHCP and it just that the server always assigns you the same IP. Try to check that on your Windows configuration (can't help you there, too long since the last time I was on Windows).
Next, I would try to make it work using ifconfig/ifup before editing /etc/network/interfaces. Doing so, you'll learn which is the problem, solve it and then to edit the file will be simple.
Also, since eth1 seems to work fine: Have you tried to use that one to connect to the internet? My guess is that you are using it to share the internet connection, but if not then it wouldn't hurt you to connect thru that one. (At least it may help you to isolate problems.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.