Static IP address without removing DHCP
Douglas Stanley
douglas.m.stanley at gmail.com
Sun Oct 26 14:11:10 UTC 2014
On Oct 26, 2014 8:56 AM, "Dotan Cohen" <dotancohen at gmail.com> wrote:
>
> Yes, I just checked on one of the Windows machines here and I see that
> it is using 10.0.0.138 for DNS, so I see that it is safe to use. The
> lines should just simple be this?
>
> auto eth0
> iface eth0 inet static
> address 10.0.0.7
> netmask 255.255.255.0
> gateway 10.0.0.138
> dns-nameservers 10.0.0.138
> dns-search 10.0.0.138
>
Actually DNS search would be your domain that would get appended to host
names that aren't fully qualified.
So if you put home.local in your search and then you try to ping a machine
named files, it'll try files and then files.home.local
So in search put your local domain name, or remove it if you don't have one.
Glad I could actually help,
Doug
> Thank you Douglas!
>
>
> On Sun, Oct 26, 2014 at 2:54 PM, Douglas Stanley
> <douglas.m.stanley at gmail.com> wrote:
> >
> > On Oct 26, 2014 8:49 AM, "Dotan Cohen" <dotancohen at gmail.com> wrote:
> >>
> >> On Sun, Oct 26, 2014 at 2:41 PM, Douglas Stanley
> >> <douglas.m.stanley at gmail.com> wrote:
> >> > Don't forget to add the options:
> >> >
> >> > dns-nameservers
> >> > dns-search
> >> >
> >> > Otherwise you may not be able to resolve DNS.
> >> >
> >> > Doug
> >>
> >>
> >> Thank you! For some reason I seem to be using a loopback, but I don't
> >> see where the configuration outside is handled:
> >>
> >> $ cat /etc/resolv.conf
> >> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by
> >> resolvconf(8)
> >> # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
> >> nameserver 127.0.1.1
> >> search Home
> >>
> >> $ diggmail.com
> >>
> >> ; <<>> DiG 9.9.5-3-Ubuntu <<>>gmail.com
> >> ;; global options: +cmd
> >> ;; Got answer:
> >> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22197
> >> ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
> >>
> >> ;; QUESTION SECTION:
> >> ;gmail.com. IN A
> >>
> >> ;; ANSWER SECTION:
> >>gmail.com. 181 IN A 173.194.113.85
> >>gmail.com. 181 IN A 173.194.113.86
> >>
> >> ;; Query time: 62 msec
> >> ;; SERVER: 127.0.1.1#53(127.0.1.1)
> >> ;; WHEN: Sun Oct 26 14:45:49 IST 2014
> >> ;; MSG SIZE rcvd: 59
> >>
> >>
> >> Perhaps I am running a DNS server locally? I don't remember doing that
> >> but it is possible that I just forgot. I do see that I'm listening on
> >> port 53:
> >>
> >> $ netstat -ntulp | grep 53
> >> tcp 0 0127.0.1.1:53 0.0.0.0:*
> >> LISTEN -
> >> udp 0 0127.0.1.1:53 0.0.0.0:*
> >> -
> >> udp 0 00.0.0.0:5353 0.0.0.0:*
> >> -
> >> udp6 0 0 :::5353 :::*
> >> -
> >>
> >>
> >>
> >> How should I go about diagnosing this? I would have assumed that my
> >> DNS would point to the same address as the default gateway as the
> >> router does do DNS.
> >>
> > Yes, so the default uses a local DNS server and puts your upstream DNS
> > server in the local DNS servers config. Does that make sense? I don't
> > remember where you can find what actual DNS server you got from dhcp,
but if
> > you know the gateway does DNS resolving, just use that IP.
> >
> > Doug
> >
> >> --
> >> Dotan Cohen
> >>
> >>http://gibberish.co.il
> >>http://what-is-what.com
>
>
>
> --
> Dotan Cohen
>
>http://gibberish.co.il
>http://what-is-what.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20141026/0694a186/attachment.html>
More information about the ubuntu-server
mailing list