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.

Not sure what happened over the weekend (possibly the last sudo apt-get upgrade I ran this morning?), but I noticed that my computer's using my phone's internet connection (connected via USB and listed as "Wired Connection 2") instead of my ethernet connection ("Wired Connection 1").

I've tried restarting NetworkManager with sudo service network-manager start and stop, but that doesn't appear to fix anything. Rebooting doesn't change anything either. Adding my static IP address information to /etc/network/interfaces didn't help, so I removed that again. I tried the steps in this answer, but that didn't fix it either.

grep -i eth0 /var/log/syslog gets me:

Oct 15 10:27:30 bdares NetworkManager[772]: <info> (eth0): now managed
Oct 15 10:27:30 bdares NetworkManager[772]: <info> (eth0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Oct 15 10:27:30 bdares NetworkManager[772]: <info> (eth0): bringing up device.
Oct 15 10:27:30 bdares NetworkManager[772]: <info> (eth0): preparing device.
Oct 15 10:27:30 bdares NetworkManager[772]: <info> (eth0): deactivating device (reason 'managed') [2]
Oct 15 10:27:30 bdares kernel: [   21.419591] r8169 0000:03:00.0: eth0: link down
Oct 15 10:27:30 bdares kernel: [   21.419690] ADDRCONF(NETDEV_UP): eth0: link is not ready

ifconfig -a:

eth0      Link encap:Ethernet  HWaddr 30:85:a9:96:dc:17  
          UP 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:43 Base address:0xc000 

eth1      Link encap:Ethernet  HWaddr e6:ce:8f:c3:a2:b1  
          inet addr:172.20.10.2  Bcast:172.20.10.15  Mask:255.255.255.240
          inet6 addr: fe80::e4ce:8fff:fec3:a2b1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1269 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1321 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:635761 (635.7 KB)  TX bytes:189206 (189.2 KB)

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

Here you can see that my phone is called eth1.

What can I do?

share|improve this question
    
Do you know what could happened over the weekend ? A change (you made or not) to the phone settings for "Internet sharing". I said that cuz I was a "victim" of similar situation. Struggled over 2 hours in Ubuntu to figure out what happened and at the end the phone settings "Internet Share" wasn't enabled. Check it out. –  NikTh Oct 15 '12 at 1:59
    
I logged in this morning with my phone plugged in, saw updates available, and ran them. Turned on a Chrome window for slashdot. Then I ssh'd into a local server, noticed it was responding very slowly, and checked the Network Manager GUI and saw that it listed my normal connection as disconnected. Literally all I did. –  bdares Oct 15 '12 at 2:17
add comment

1 Answer 1

Try these following commands as root.

ifconfig eth0 x.x.x.x

route -add default gw x.x.x.y

You may also want to run dmesg to see if there is more information. What Ubuntu version is it?

share|improve this answer
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.