Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I logged onto Ubuntu to realize that my Ethernet connection is not connected. It has worked fine until now. Any help would be appreciated. Also, I'm using Realtek Ethernet.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Open a Terminal with Ctrl+Alt+T and type:

ifconfig

You should get something like this:

eth0      Link encap:Ethernet  HWaddr 00:19:5b:5e:0a:5e  
          inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::219:5bff:fe5e:a5e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1884961 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1232492 errors:0 dropped:0 overruns:4 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2569144356 (2.5 GB)  TX bytes:114877090 (114.8 MB)
          Interrupt:19 Base address:0xc800 

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:4022 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4022 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:147433 (147.4 KB)  TX bytes:147433 (147.4 KB)

Notice how I have an inet addr defined. If you do not have an IP address then something is wrong, most likely it is a DHCP problem.

Can you ping 192.168.1.1 or ping 10.0.0.1? (Most likely your router's LAN ip is one of those)

If you can ping one of those, then you can see your router and you are not getting a IP from the router. This could be either your router DHCP not configured/setup or your system not requesting an IP from the router.

That is if you have a router.

In the Terminal type:

sudo gedit /etc/network/interfaces

and add this two lines in the bottom:

auto eth0
iface eth0 inet dhcp

Save the file and now, to restart your network, on a new Terminal type:

sudo /etc/init.d/networking restart

Finally, use the below commands enable/disable eth0:

sudo ifdown eth0

sudo ifup eth0

share|improve this answer
    
Everything that you said worked and gave me back a response except for the eth0 commands. It is saying ifdown: interface eth0 not configured –  user128638 Feb 16 '13 at 5:46
    
@user128638 I updated my post. –  efthialex Feb 16 '13 at 10:08
    
Whenever I used the restart command, the desktop disappears and terminal is left open. –  user128638 Feb 16 '13 at 16:24
    
Restart your computer and try to use the commands sudo ifdown eth0 sudo ifup eth0 –  efthialex Feb 16 '13 at 16:44
1  
I finally got it to show :D Thank you so much! –  user128638 Feb 16 '13 at 17:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.