Find the answer to your Linux question:
Results 1 to 6 of 6
Hi all, I've just intalled Kubuntu 7.04 and now I'm having problem connecting to internet. I connect using dynamic IP through gateway 192.168.0.1, when I ping the gateway it always ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2007
    Posts
    11

    'Host unreachable' when pinging the gateway


    Hi all,

    I've just intalled Kubuntu 7.04 and now I'm having problem connecting to internet. I connect using dynamic IP through gateway 192.168.0.1, when I ping the gateway it always returns 'host unreachable' messages. I've also tried assigning static IP with no luck.

    I tried to executed collectNWData.sh script when IP setting is dynamic and the result is as follows:

    Code:
    collectNWData.sh V0.4.5
    --- What's the type of networktopology?
    --- (1) DSL modem <---> LinuxClient
    --- On which host is the script executed?
    --- (1) LinuxClient
    !!! The system can't ping an external IP address.
    >>> Check your default gateway setting. Gateway's IP is 0.0.0.0 and interface is eth0
    !!! The system can't resolve an external DNS name.
    !!! No nameserver defined in /etc/resolv.conf
    ==================================================================================================
    ==================================================================================================
    *** uname -a 
    Linux PromisedLand 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux
    ==================================================================================================
    *** cat /etc/SuSE-release 
    cat: /etc/SuSE-release: No such file or directory
    ==================================================================================================
    *** cat /etc/resolv.conf | grep -v "^#" | grep -v "^$" 
    ==================================================================================================
    *** cat /etc/hosts | grep -v "^#" | grep -v "^$" | grep -v "::" 
    127.0.0.1 localhost
    ==================================================================================================
    *** cat /proc/sys/net/ipv4/ip_forward 
    0
    ==================================================================================================
    *** /sbin/iptables -t nat -L 
    Chain PREROUTING (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain POSTROUTING (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    ==================================================================================================
    *** /sbin/route -n 
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
    169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
    0.0.0.0         0.0.0.0         0.0.0.0         U     1000   0        0 eth0
    ==================================================================================================
    *** /usr/sbin/arp -n 
    ==================================================================================================
    *** /sbin/ifconfig 
    eth0      Link encap:Ethernet  HWaddr 00:14:C2:E4:83:06  
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:20 errors:0 dropped:0 overruns:0 frame:0
              TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:6580 (6.4 KiB)  TX bytes:6327 (6.1 KiB)
              Interrupt:16 
    
    eth1      Link encap:Ethernet  HWaddr 00:12:F0:6D:03:05  
              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:23 Base address:0x2000 Memory:d0000000-d0000fff 
    
    eth0:avah Link encap:Ethernet  HWaddr 00:14:C2:E4:83:06  
              inet addr:169.254.6.111  Bcast:169.254.255.255  Mask:255.255.0.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:16 
    
    eth1:avah Link encap:Ethernet  HWaddr 00:12:F0:6D:03:05  
              inet addr:169.254.3.95  Bcast:169.254.255.255  Mask:255.255.0.0
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              Interrupt:23 Base address:0x2000 Memory:d0000000-d0000fff 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:56 errors:0 dropped:0 overruns:0 frame:0
              TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:3996 (3.9 KiB)  TX bytes:3996 (3.9 KiB)
    
    ==================================================================================================
    *** pingTests 
    169.254.6.111 : Ping OK
    169.254.3.95 : Ping OK
    127.0.0.1 : Ping OK
    195.135.220.3 : No ping response
    ping: unknown host www.suse.de
    www.suse.de : No ping response
    ==================================================================================================
    *** /usr/bin/lspci 
    00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)
    00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
    00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
    00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03)
    00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
    00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
    00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
    00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
    00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
    00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d3)
    00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
    00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 03)
    00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 03)
    00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 03)
    00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03)
    02:04.0 Network controller: Intel Corporation PRO/Wireless 2200BG Network Connection (rev 05)
    02:06.0 CardBus bridge: Texas Instruments PCIxx21/x515 Cardbus Controller
    02:06.1 CardBus bridge: Texas Instruments PCIxx21/x515 Cardbus Controller
    02:06.2 FireWire (IEEE 1394): Texas Instruments OHCI Compliant IEEE 1394 Host Controller
    02:06.3 Mass storage controller: Texas Instruments PCIxx21 Integrated FlashMedia Controller
    02:06.4 Generic system peripheral [0805]: Texas Instruments PCI6411/6421/6611/6621/7411/7421/7611/7621 Secure Digital Controller
    02:06.5 Communication controller: Texas Instruments PCI6411/6421/6611/6621/7411/7421/7611/7621 Smart Card Controller
    02:0e.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5705M Gigabit Ethernet
    ==================================================================================================
    *** /usr/sbin/lsusb 
    Bus 005 Device 004: ID 0ea0:2168 Ours Technology, Inc. Transcend JetFlash 2.0 / Astone USB Drive
    Bus 005 Device 003: ID 067b:2507 Prolific Technology, Inc. 
    Bus 005 Device 001: ID 0000:0000  
    Bus 004 Device 001: ID 0000:0000  
    Bus 001 Device 004: ID 046d:c001 Logitech, Inc. N48/M-BB48 [FirstMouse Plus]
    Bus 001 Device 001: ID 0000:0000  
    Bus 003 Device 001: ID 0000:0000  
    Bus 002 Device 001: ID 0000:0000  
    ==================================================================================================
    *** /sbin/lsmod 
    Module                  Size  Used by
    iptable_nat             8580  0 
    nf_nat                 19372  1 iptable_nat
    nf_conntrack_ipv4      19468  2 iptable_nat
    nf_conntrack           62600  3 iptable_nat,nf_nat,nf_conntrack_ipv4
    nfnetlink               7704  3 nf_nat,nf_conntrack_ipv4,nf_conntrack
    ip_tables              13796  1 iptable_nat
    x_tables               16388  2 iptable_nat,ip_tables
    nls_iso8859_1           5120  1 
    nls_cp437               6784  1 
    vfat                   14208  1 
    fat                    53916  1 vfat
    i915                   24448  2 
    drm                    81044  3 i915
    rfcomm                 40856  0 
    l2cap                  25728  5 rfcomm
    bluetooth              55908  4 rfcomm,l2cap
    ppdev                  10116  0 
    speedstep_centrino      9920  0 
    cpufreq_ondemand        9228  1 
    cpufreq_stats           7360  0 
    freq_table              5792  3 speedstep_centrino,cpufreq_ondemand,cpufreq_stats
    cpufreq_powersave       2688  0 
    cpufreq_userspace       5408  0 
    cpufreq_conservative     8200  0 
    pcc_acpi               13184  0 
    sony_acpi               6284  0 
    dev_acpi               12292  0 
    tc1100_wmi              8068  0 
    battery                10756  0 
    container               5248  0 
    ac                      6020  0 
    sbs                    15652  0 
    i2c_ec                  5888  1 sbs
    i2c_core               22784  1 i2c_ec
    video                  16388  0 
    asus_acpi              17308  0 
    dock                   10268  0 
    backlight               7040  1 asus_acpi
    button                  8720  0 
    sbp2                   23812  0 
    lp                     12452  0 
    fuse                   46612  0 
    pcmcia                 39212  0 
    irtty_sir               9600  0 
    joydev                 10816  0 
    snd_intel8x0           34204  3 
    snd_ac97_codec         98336  1 snd_intel8x0
    sir_dev                17156  1 irtty_sir
    ac97_bus                3200  1 snd_ac97_codec
    snd_pcm_oss            44544  0 
    snd_mixer_oss          17408  1 snd_pcm_oss
    snd_pcm                79876  4 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
    snd_seq_dummy           4740  0 
    snd_seq_oss            32896  0 
    sdhci                  18700  0 
    snd_seq_midi            9600  0 
    snd_rawmidi            25472  1 snd_seq_midi
    snd_seq_midi_event      8448  2 snd_seq_oss,snd_seq_midi
    usbhid                 26592  0 
    pcspkr                  4224  0 
    mmc_core               26756  1 sdhci
    snd_seq                52592  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
    ipw2200               148040  0 
    irda                  201276  2 irtty_sir,sir_dev
    hid                    27392  1 usbhid
    serio_raw               7940  0 
    yenta_socket           27532  2 
    ieee80211              34760  1 ipw2200
    ieee80211_crypt         7040  1 ieee80211
    parport_pc             36388  1 
    parport                36936  3 ppdev,lp,parport_pc
    crc_ccitt               3072  1 irda
    tifm_7xx1              10240  0 
    tifm_core               9856  1 tifm_7xx1
    psmouse                38920  0 
    snd_timer              23684  3 snd_pcm,snd_seq
    snd_seq_device          9100  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
    iTCO_wdt               11812  0 
    iTCO_vendor_support     4868  1 iTCO_wdt
    shpchp                 34324  0 
    rsrc_nonstatic         14080  1 yenta_socket
    pcmcia_core            40852  3 pcmcia,yenta_socket,rsrc_nonstatic
    snd                    54020  14 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
    soundcore               8672  1 snd
    snd_page_alloc         10888  2 snd_intel8x0,snd_pcm
    pci_hotplug            32576  1 shpchp
    intel_agp              25116  1 
    agpgart                35400  3 drm,intel_agp
    af_packet              23816  8 
    tsdev                   8768  0 
    evdev                  11008  4 
    usb_storage            72256  1 
    ext3                  133128  1 
    jbd                    59816  1 ext3
    mbcache                 9604  1 ext3
    libusual               17936  1 usb_storage
    sg                     36252  0 
    sr_mod                 17060  0 
    cdrom                  37664  1 sr_mod
    sd_mod                 23428  5 
    generic                 5124  0 [permanent]
    ata_piix               15492  2 
    ata_generic             9092  0 
    libata                125720  2 ata_piix,ata_generic
    scsi_mod              142348  6 sbp2,usb_storage,sg,sr_mod,sd_mod,libata
    tg3                   109700  0 
    ohci1394               36528  0 
    ieee1394              299448  2 sbp2,ohci1394
    ehci_hcd               34188  0 
    uhci_hcd               25360  0 
    usbcore               134280  6 usbhid,usb_storage,libusual,ehci_hcd,uhci_hcd
    thermal                14856  0 
    processor              31048  1 thermal
    fan                     5636  0 
    fbcon                  42656  0 
    tileblit                3584  1 fbcon
    font                    9216  1 fbcon
    bitblit                 6912  1 fbcon
    softcursor              3200  1 bitblit
    vesafb                  9220  0 
    capability              5896  0 
    commoncap               8192  1 capability
    ==================================================================================================
    *** /sbin/iptables -L -vn 
    Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
     pkts bytes target     prot opt in     out     source               destination         
    
    Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
     pkts bytes target     prot opt in     out     source               destination         
    
    Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
     pkts bytes target     prot opt in     out     source               destination         
    ==================================================================================================
    *** cat /etc/sysconfig/SuSEfirewall2 | grep -v "^#" | grep -v "^$" 
    cat: /etc/sysconfig/SuSEfirewall2: No such file or directory
    ==================================================================================================
    *** cat /etc/sysconfig/network/config | grep -v "^#" | grep -v "^$" 
    cat: /etc/sysconfig/network/config: No such file or directory
    ==================================================================================================
    *** cat /etc/sysconfig/sysctl | grep -v "^#" | grep -v "^$" 
    cat: /etc/sysconfig/sysctl: No such file or directory
    ==================================================================================================
    *** cat /etc/sysconfig/network/dhcp | grep -v "^#" | grep -v "^$" 
    cat: /etc/sysconfig/network/dhcp: No such file or directory
    ==================================================================================================
    *** cat /etc/sysconfig/proxy | grep -v "^#" | grep -v "^$" 
    cat: /etc/sysconfig/proxy: No such file or directory
    ==================================================================================================
    *** cat /etc/sysconfig/ssh | grep -v "^#" | grep -v "^$" 
    cat: /etc/sysconfig/ssh: No such file or directory
    ==================================================================================================
    *** /sbin/iwconfig | /bin/sed "s/\(Encryption key:\)\([^o][^f][^f][^ ]*\)\(.*\)/\1xx xxx-xxxx-xxxx-xxxx-xxxx-xxxxxxx\3/" 
    lo        no wireless extensions.
    
    eth0      no wireless extensions.
    
    eth1      radio off  ESSID:""  
              Mode:Managed  Channel:0  Access Point: Not-Associated   
              Bit Rate:0 kb/s   Tx-Power=off   Sensitivity=8/0  
              Retry limit:7   RTS thr:off   Fragment thr:off
              Encryption key:off
              Power Management:off
              Link Quality:0  Signal level:0  Noise level:0
              Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
              Tx excessive retries:0  Invalid misc:0   Missed beacon:0
    
    ==================================================================================================
    *** catMyConfig 
    ls: /etc/sysconfig/network/ifcfg-*: No such file or directory
    This problem does not always happen. One day I can connect to internet just fine for the rest of the day, the other day I just can't connect no matter what I do.

    Before installing Kubuntu 7.04, I tried OpenSuse 10.2 and also had the same problem. But with Windows I can connect just fine.

    I'm not a network guy and I'm also fairly new to Linux.

    Any help would greatly appreciated.


    Best Regards,

    Setya
    Attached Files Attached Files

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    The answer is there in the output.

    a) You have no default gateway specified.
    b) You have a bogus IP address assigned. 169.254.x.x is assigned when dhcp can not get an address. This is probably caused by (a).

    You can add your default gateway from the command line, but it will probably easier for you to do this through yast. Once you've added a default gateway, either restart the network service or the entire box.

  3. #3
    Linux Newbie framp's Avatar
    Join Date
    Jul 2006
    Location
    Stuttgart, Germany
    Posts
    240
    It looks like you use a router instead of a modem to connect to the internet and your router doesn't act as a dhcp server.
    Try to configure your router as a dhcp server or give your client an IP address which is in the same network as your router.
    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds

  4. #4
    Just Joined!
    Join Date
    Jul 2007
    Posts
    11
    Quote Originally Posted by anomie View Post
    The answer is there in the output.

    a) You have no default gateway specified.
    b) You have a bogus IP address assigned. 169.254.x.x is assigned when dhcp can not get an address. This is probably caused by (a).

    You can add your default gateway from the command line, but it will probably easier for you to do this through yast. Once you've added a default gateway, either restart the network service or the entire box.
    I thought you don't have to specify default gateway if you use DHCP ?

    Again, I'm not a network expert so I might be wrong here.

    How to specify default gateway from command line in Kubuntu ?

    Best Regards,

    Setya

  5. #5
    Just Joined!
    Join Date
    Jul 2007
    Posts
    11
    Quote Originally Posted by framp View Post
    It looks like you use a router instead of a modem to connect to the internet and your router doesn't act as a dhcp server.
    Try to configure your router as a dhcp server or give your client an IP address which is in the same network as your router.
    If that's the case, I won't be able to connect from Windows, will I ?
    From Window I can connect just fine, or since I'm not a network expert, am I missing something here ?

    I'm more concerned about interface eth0:avah & eth1:avah, what are they ?

    Regards,

    Setya

  6. #6
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Quote Originally Posted by Setya View Post
    How to specify default gateway from command line in Kubuntu ?
    See here for an example:
    http://www.linuxforums.org/forum/478484-post2.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •