Thread: strange ubuntu problem

  1. #1
    Registered User Stonehambey's Avatar
    Join Date
    Jan 2008
    Location
    Kent, UK
    Posts
    118

    strange ubuntu problem

    hey guys,

    I'm having a rather strange but annoying problem with my ubuntu machine. We recently had to change routers from an o2 one to an old router we had lying around. Well we managed to get it up and working and I was able to connect fine on ubuntu. Then one evening late at night I turned on my laptop and was unable to connect. I went to bed and by the morning my laptop connected again. When I got back from work in the afternoon I was also able to connect and was connected until I had to restart my laptop around 10pm, after which I was unable to connect again.

    All other machines in the house are having no connection troubles and the only variable I seem to see is the time of day. This is somewhat frustrating as I have to keep my laptop on all afternoon and evening if I want to keep connected!

    Any help would be much appreciated

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Are you able to ping the other machines that are behind the router while you are having connectivity issues? Do you have a valid IP address at the time?

    My guess is that you are having trouble getting a DHCP lease sometimes, and this is what is causing the connectivity issues.

    If the problem is that you are not getting an IP address, try running "dhclient eth0" (where eth0 is your interface).

  3. #3
    Registered User Stonehambey's Avatar
    Join Date
    Jan 2008
    Location
    Kent, UK
    Posts
    118
    Quote Originally Posted by bithub View Post
    Are you able to ping the other machines that are behind the router while you are having connectivity issues? Do you have a valid IP address at the time?

    My guess is that you are having trouble getting a DHCP lease sometimes, and this is what is causing the connectivity issues.

    If the problem is that you are not getting an IP address, try running "dhclient eth0" (where eth0 is your interface).
    Thanks for the reply

    Forgive my ignorance but you might have to explain your solution in a more n00b friendly manner :P

    Well it's the morning now, I'm about to head out to work, and my laptop connected straight away (created this thread using my iphone)

  4. #4
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Stonehambey View Post
    Thanks for the reply
    Forgive my ignorance but you might have to explain your solution in a more n00b friendly manner :P
    Good luck with linux!

    Seriously, you don't say a thing about your connection method*, so this looks more like a story about something than a request for technical opinions and advice.

    On a tangent, I have had this weird problem since I compiled the 2.6.28.7 kernel where I have to leave ping running in the background all the time in order to maintain my connection.

    *I presume that ubuntu is automatic, so you mean "it just does not connect". If you want to troubleshoot this you will have to do a little reading and investigating of how that happens. It probably involves the commands ifconfig and dhclient.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  5. #5
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Forgive my ignorance but you might have to explain your solution in a more n00b friendly manner
    The next time you can't connect, run "ifconfig" on the command line. You should see something like:

    Code:
    eth0      Link encap:Ethernet  HWaddr 00:13:d4:7b:2a:b6  
              inet addr:10.221.212.156  Bcast:10.221.212.255  Mask:255.255.255.0
              inet6 addr: fe80::213:d4ff:fe7b:2ab6/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:145386142 errors:0 dropped:0 overruns:22613 frame:0
              TX packets:19957863 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:251024087 (239.3 MB)  TX bytes:4290447913 (3.9 GB)
              Interrupt:17 
    
    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:905778324 errors:0 dropped:0 overruns:0 frame:0
              TX packets:905778324 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:2700953286 (2.5 GB)  TX bytes:2700953286 (2.5 GB)
    See how there is an IP address listed for eth0? Check and see if your interface gets an IP address the next time you have connection issues.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strange problem with GETLINE
    By wco5002 in forum C++ Programming
    Replies: 13
    Last Post: 07-07-2008, 09:57 AM
  2. Strange problem
    By G4B3 in forum C Programming
    Replies: 6
    Last Post: 05-14-2008, 02:07 PM
  3. Strange problem with classes in header files
    By samGwilliam in forum C++ Programming
    Replies: 2
    Last Post: 02-29-2008, 04:55 AM
  4. Strange problem
    By ~Kyo~ in forum Game Programming
    Replies: 0
    Last Post: 02-14-2006, 10:35 PM