Find the answer to your Linux question:
Results 1 to 6 of 6
I just finished my installation and I can't ping to any sites, such as www.google.com , therefore I can't continue to install apache, etc. with the emerge command since it ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Posts
    2

    Can't ping outside LAN after installation


    I just finished my installation and I can't ping to any sites, such as www.google.com, therefore I can't continue to install apache, etc. with the emerge command since it can't resolve any sites.

    ANY help is greatly appreciated. I am a newbie to all this, as you can see... and it has been terribly trying to figure this out. I hope I don't have to start from scratch...

    THank you in advance,
    Alex

    Here is the output from /etc/resolve.conf

    # Generated by net-scripts for interface lo
    domain arahome



    Here is output from /sbin/route -n

    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
    0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0



    Here is output from ifconfig

    eth0 Link encap:Ethernet HWaddr 00:50:04:A4:49:96
    inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
    UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:470 errors:0 dropped:0 overruns:0 frame:0
    TX packets:279 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:49348 (48.1 Kb) TX bytes:38684 (37.7 Kb)
    Interrupt:17 Base address:0x2000

    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:4536 (4.4 Kb) TX bytes:4536 (4.4 Kb)

  2. #2
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    732
    I'm guessing you are getting unknown host errors when you try to connect to other hosts on the Internet.

    The problem appears to be your resolv.conf. You need a nameserver line in there to tell your computer where to look up hostnames.

    Code:
    nameserver 192.168.1.1
    Will probably do it but if not then change the IP to a suitable DNS server. If your network is set up by dhcp then this file will get overwritten on each boot. You should look at the setup of your dhcp server in that case, possibly turn it off for a few minutes if you have a simple home setup.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  3. #3
    Just Joined!
    Join Date
    Dec 2006
    Posts
    2
    Chris, first and foremost.. thank you for your thorough and prompt reply!!

    I tried saving changes with a nameserver in the resolve.conf file as nameserver ${XXX.XXX.XXX.XXX}, but then the entries were erased after a restart as you predicted. I am running DHCP, configured automatically during install. I have a netgear router assigning the IPs via DHCP. Not sure how to configure the networking, with this config, assumed it would be fairly automatic, but I guess not. Also, not sure what the 192.168.0.1 IP is from in my routing tables. I may have inadvertently thought that my router's address was this during the installation and entered it in some networking config setup step, but I can't remember which step that was in, and now, I don't know how to remove it from my routing tables. My default conection on eth0 is set to the proper gateway IP for my router, but it seems that the other info, such as genmask is wrong. Is there any way to edit this information manually?

    Any sugestions on steps to set it up properly (I am only taking guesses in the paragraph above) would be greatly appreciated!!)

    Thanks again,
    Alex

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    732
    As far as I can see your routing table is completely in order and nothing to worry about (assuming the 192.168.0.1 in your post was a typo). For a quick explanation:

    The routing table is about where to look for other networks. The destinations are network numbers. 127.0.0.0 with a netmask of 255.0.0.0 (commonly written as 127.0.0.0/8 ) means any IP from 127.0.0.1 to 127.255.255.255. In this case indicating that such IPs can be found on the loopback interface, and since the gateway is 0.0.0.0 it means that no additional routing is needed.

    Simlarly the first line is stating that 192.168.1.0/24 is directly attached to eth0. It is created by default when your set up the network card and wont be removed until you take down that interface.

    0.0.0.0/0 will match anything and is referred to as the default gateway. If none of the other routes match (from most specific to least) then it will be sent on this route. The gateway here being your connection to the Internet. Once there, getting it to the final host becomes the gateway's problem.

    To answer your actual question. The nameserver settings should be getting handed out by your router at the same time as IPs. Can I get you to run the following command so I can see what settings dhcpcd (gentoo's dhcp client) is running with.

    Code:
    ps ax | grep dhcp
    Although I doubt it, it is possible for dhcpcd to be set up to not respond to nameserver information. If we can rule that out we can look at the router.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  6. #5
    Just Joined!
    Join Date
    Dec 2006
    Posts
    1
    Hey kakariko81280(Chris), I saw this post and I am having the same difficulty with my gentoo install seeing the network port. I followed all your advice to troubleshoot the problem, and did as you mentioned in the last post "ps ax | grep dhcp" and I got "11489 pts/1 S+ 0:00 grep dhcp"... any advice? Thanks in advance. -Dave

    Quote Originally Posted by kakariko81280
    As far as I can see your routing table is completely in order and nothing to worry about (assuming the 192.168.0.1 in your post was a typo). For a quick explanation:

    The routing table is about where to look for other networks. The destinations are network numbers. 127.0.0.0 with a netmask of 255.0.0.0 (commonly written as 127.0.0.0/8 ) means any IP from 127.0.0.1 to 127.255.255.255. In this case indicating that such IPs can be found on the loopback interface, and since the gateway is 0.0.0.0 it means that no additional routing is needed.

    Simlarly the first line is stating that 192.168.1.0/24 is directly attached to eth0. It is created by default when your set up the network card and wont be removed until you take down that interface.

    0.0.0.0/0 will match anything and is referred to as the default gateway. If none of the other routes match (from most specific to least) then it will be sent on this route. The gateway here being your connection to the Internet. Once there, getting it to the final host becomes the gateway's problem.

    To answer your actual question. The nameserver settings should be getting handed out by your router at the same time as IPs. Can I get you to run the following command so I can see what settings dhcpcd (gentoo's dhcp client) is running with.

    Code:
    ps ax | grep dhcp
    Although I doubt it, it is possible for dhcpcd to be set up to not respond to nameserver information. If we can rule that out we can look at the router.

    Let us know how you get on,

    Chris...

  7. #6
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    732
    The result of the command you ran says that there are no processes with dhcp in the name running. Depending on your distribution that isn't a problem though. We will need to take a look at what you have set up already. Can I get you to run the following commands and paste the output into a new message.

    Code:
    ifconfig -a
    route -n
    cat /etc/resolv.conf
    ping www.google.com
    Also, is your network set up via dhcp or is it done statically? From that we should be able to diagnose your problem.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

Posting Permissions

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