setting static DNS

Home Forums Conduit: mLinux Model setting static DNS

Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #20499
    Nicola Mondello
    Participant

    Hi, I’m not able to set a static DNS for the Conduit eth0 interface. How can I do it?

    The following is my interfaces configuration:

    auto eth0
    iface eth0 inet static
    address 192.168.2.111
    netmask 255.255.255.0
    gateway 192.168.2.1
    #20500
    Jeff Hatch
    Keymaster

    Nicola,

    You should be able to specify the DNS nameservers in /etc/network/interfaces like so:

    dns-nameservers 1.1.1.1 2.2.2.2

    Jeff

    #20501
    Nicola Mondello
    Participant

    I’m sorry but it doesn’t work. /etc/network/interfaces is:

    auto eth0
    iface eth0 inet static
    address 192.168.2.111
    netmask 255.255.255.0
    gateway 192.168.2.1
    dns-nameservers 8.8.8.8

    this works:

    root@mtcdt:~# ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=47.3 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=46.5 ms

    this not works:

    root@mtcdt:~# ping google.com
    ping: unknown host google.com
    #20507
    Jeff Hatch
    Keymaster

    Nicola,

    Have you tried putting a nameserver entry in /etc/resolv.conf?

    Jeff

    #20508
    Nicola Mondello
    Participant

    Perfect! I was missing this!
    Now it works.

    Thank you

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.