[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cannot resolve hostname



On Sat, May 7, 2011 at 9:14 AM, AG <computing.account@googlemail.com> wrote:
>
> In what seems to be a string of related issues having to do with networking,
> I now find that not only has my IP address been changed from 192.168.1.40 to
> 192.168.1.64 but also that my machine's name (valhalla) cannot be resolved.
>
> This is the output of ifconfig:
> $ sudo ifconfig
> sudo: unable to resolve host valhalla
> eth0      Link encap:Ethernet  HWaddr 00:90:47:05:a3:07
>          inet addr:192.168.1.64  Bcast:192.168.1.255  Mask:255.255.255.0
>          inet6 addr: fe80::290:47ff:fe05:a307/64 Scope:Link
>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>          RX packets:47117 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:46335 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:1000
>          RX bytes:38194090 (36.4 MiB)  TX bytes:6237238 (5.9 MiB)
>          Interrupt:18 Base address:0xec00
>
> 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:7309 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:7309 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:0
>          RX bytes:2964856 (2.8 MiB)  TX bytes:2964856 (2.8 MiB)
>
> Any help would be appreciated in sorting this out, specifically:
>
> (1) How do I fix my IP address so that it remains as I originally configured
> it (i.e. 192.168.1.40) which will make it easier and more predictable for
> the print client to find the server machine?
>
> (2) How do I do so in such a way that I can access the Net once I reboot -
> which I was unable to do and hence - on good advice - changed the
> /etc/network/interfaces so that the stanza changed from iface eth0 inet
> *static* to *dhcp* .  This was the only thing that enabled this machine to
> access the Net after a reboot and I am loathe to change this back to
> something that didn't work.
>
> (3) Helping me to understand how/ why all of these changes have taken place?
>  What happened?  I had a perfectly running system - everything worked, and
> then yesterday I rebooted and I find this dog's breakfast of an arrangement.

sudo: What's the output of "cat /etc/hostname" and "cat /etc/hosts"?

static/dhcp: Do you have a dhcp server on which you can set
reservations and other options? If, yes, you can either specify that
the dhcp server hands out a specific address to valhalla or set
valhalla up with a static ip address and specify that the dhcp server
not hand out that address. (If you use a static ip address you also
have to set a default route for it to be able to access the internet.)


Reply to: