LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to connect to internet via ethernet after tweaking interfaces and hosts file (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-connect-to-internet-via-ethernet-after-tweaking-interfaces-and-hosts-file-708019/)

ylawayjdp 02-27-2009 10:53 AM

Unable to connect to internet via ethernet after tweaking interfaces and hosts file
 
Hi I have been trying to set up a file server following the guide found here: http://www.howtoforge.com/ubuntu-home-fileserver-p3

I was having issues with ubuntu not finding the host name when I used the query host name -f (see step 5 of howtoforge guide)

I eventually realised I had not edited the /etc/hosts file and /etc/network/interfaces file properly

I edited them to match as suggested on the howto guide.

eventually I successfully found I that I was able to find the
host name and I moved onto the next step which was to update the system.

However I no longer have internet connection via Ethernet I look on the web for a solution and a suggestion for diagnostics was

Code:

sudo ifconfig
sudo route
ping -c 4 www.google.com

I did this and the output is below:
Code:

root@trimdonserv:/home/j# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:6e:a8:6d:a6 
          inet addr:192.168.1.145  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:6eff:fea8:6da6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:716 errors:0 dropped:0 overruns:0 frame:0
          TX packets:207 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:54137 (54.1 KB)  TX bytes:29071 (29.0 KB)
          Interrupt:23 Base address:0xc000

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

root@trimdonserv:/home/j# route
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.1.0    *              255.255.255.0  U    0      0        0 eth0
root@trimdonserv:/home/j# ping -c 4 www.google.com
ping: unknown host www.google.com
root@trimdonserv:/home/j#

I'm not sure what I have done to be honest and I am pretty annoyed with myself for messing it up.

I am running on a new install of ubuntu 8.10

Many thanks for any assistance

J

jdkaye 02-27-2009 11:09 AM

Have you set up a DNS server in your /etc/network/interfaces file?
If might be helpful if you posted the contents of that file.
cheers,
jdk

rsciw 02-27-2009 11:12 AM

looks weird if your address is 192.168.1.x but broadcast is 192.168.0.255

assigning ip via dhcp or static?


All times are GMT -5. The time now is 05:00 PM.