Problem with resolving domain name with static ip

Ben Edwards list4me2 at googlemail.com
Tue Dec 16 09:42:54 UTC 2008


On 14/12/2008, Rashkae <ubuntu at tigershaunt.com> wrote:
> Ben Edwards wrote:
>> I have the following in my /etc/network/interfaces
>>
>> auto eth1
>> iface eth1 inet static
>>         address 192.168.1.95
>>         netmask 255.255.255.0
>>         gateway 192.168.1.1
>>
>> I can ssh in from another box but when I try 'ping google.co.uk' I get
>> 'ping: unknown host google.co.uk'.
>>
>> But when I 'ping 66.249.93.104' it woks fine (I used another box to
>> extablish 66.249.93.104 was the ip for google.co.uk). so it seems it
>> is having a problem resolving the domain name (how do I check what dns
>> is being uses?).
>>
>> I am having a slimier problem on another box, it seems it I use static
>> I have this problem but if I user dhcp all is OK.
>>
>> route -n on a working bo gives me
>>
>> 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
>> eth1
>> 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0
>> eth1
>> 0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0
>> eth1
>>
>> So I think the 192.168.1.1 is the correct gateway.
>>
>> This seems to of happened since I started using ibex (I think).
>>
>> Any ideas?
>> Ben
>>
>
> Assuming 192.168.1.1 is one of these home router thingies with built in
> DNS, then add that to your /etc/resolf.conf file.
>
> nameserver 192.168.1.1
>
> Or you can use the System -> Administration -> Network to input the
> network settings.

Thanks everybody, it seemed to resolve itself.  Normally if you use
static ip would you have to set up /etc/resolf.conf.  I am guessing
that I have not had this problem as I normally start off with dhcp
which I guess sets up /etc/resolf.conf even when I subsequently go
static.

Ben

> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>




More information about the ubuntu-users mailing list