Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #156860 > unrolled thread
| Started by | rlharris@oplink.net |
|---|---|
| First post | 2015-08-27 09:10 +0200 |
| Last post | 2015-08-30 05:10 +0200 |
| Articles | 4 on this page of 24 — 11 participants |
Back to article view | Back to linux.debian.user
what is the static ip address I assigned to eth0? rlharris@oplink.net - 2015-08-27 09:10 +0200
[solved] Re: what is the static ip address I assigned to eth0? rlharris@oplink.net - 2015-08-27 09:30 +0200
Re: [solved] Re: what is the static ip address I assigned to eth0? Jörg-Volker Peetz <jvpeetz@web.de> - 2015-08-27 12:50 +0200
Re: what is the static ip address I assigned to eth0? Gene Heskett <gheskett@wdtv.com> - 2015-08-27 10:30 +0200
Re: what is the static ip address I assigned to eth0? Renaud (Ron) OLGIATI <renaud@olgiati-in-paraguay.org> - 2015-08-27 12:10 +0200
Re: what is the static ip address I assigned to eth0? Hans <hans.ullrich@loop.de> - 2015-08-27 12:30 +0200
Re: what is the static ip address I assigned to eth0? David Wright <deblis@lionunicorn.co.uk> - 2015-08-27 20:40 +0200
Re: what is the static ip address I assigned to eth0? "Thomas Schmitt" <scdbackup@gmx.net> - 2015-08-27 12:30 +0200
Re: what is the static ip address I assigned to eth0? Gene Heskett <gheskett@wdtv.com> - 2015-08-27 18:10 +0200
Re: what is the static ip address I assigned to eth0? Elimar Riesebieter <riesebie@lxtec.de> - 2015-08-27 12:00 +0200
Re: what is the static ip address I assigned to eth0? David Wright <deblis@lionunicorn.co.uk> - 2015-08-27 20:40 +0200
Re: what is the static ip address I assigned to eth0? Elimar Riesebieter <riesebie@lxtec.de> - 2015-08-28 01:00 +0200
Re: what is the static ip address I assigned to eth0? David Wright <deblis@lionunicorn.co.uk> - 2015-08-28 06:40 +0200
Re: what is the static ip address I assigned to eth0? Curt <curty@free.fr> - 2015-08-28 12:10 +0200
Re: what is the static ip address I assigned to eth0? Brian <ad44@cityscape.co.uk> - 2015-08-28 13:10 +0200
Re: what is the static ip address I assigned to eth0? Reco <recoverym4n@gmail.com> - 2015-08-28 13:50 +0200
Re: what is the static ip address I assigned to eth0? Brian <ad44@cityscape.co.uk> - 2015-08-28 15:40 +0200
Re: what is the static ip address I assigned to eth0? Reco <recoverym4n@gmail.com> - 2015-08-28 16:10 +0200
Re: what is the static ip address I assigned to eth0? Brian <ad44@cityscape.co.uk> - 2015-08-28 16:50 +0200
Re: what is the static ip address I assigned to eth0? Curt <curty@free.fr> - 2015-08-28 18:20 +0200
Re: what is the static ip address I assigned to eth0? Brian <ad44@cityscape.co.uk> - 2015-08-28 18:40 +0200
Re: what is the static ip address I assigned to eth0? David Wright <deblis@lionunicorn.co.uk> - 2015-08-31 02:10 +0200
Re: what is the static ip address I assigned to eth0? Reco <recoverym4n@gmail.com> - 2015-08-31 09:00 +0200
Re: what is the static ip address I assigned to eth0? David Wright <deblis@lionunicorn.co.uk> - 2015-08-30 05:10 +0200
Page 2 of 2 — ← Prev page 1 [2]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2015-08-28 18:40 +0200 |
| Message-ID | <q2uR4-iE-15@gated-at.bofh.it> |
| In reply to | #156988 |
On Fri 28 Aug 2015 at 16:13:34 +0000, Curt wrote: > On 2015-08-28, Brian <ad44@cityscape.co.uk> wrote: > > > > I think I'll leave this topic at this point before I get in over my > > head, but the implication here is that a resolver not giving 127.0.0.1 > > for localhost is broken in some way. > > > > So I'm not broken somehow. No. But we hope you are house-trained.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2015-08-31 02:10 +0200 |
| Message-ID | <q3kPD-7SX-1@gated-at.bofh.it> |
| In reply to | #156967 |
Quoting Reco (recoverym4n@gmail.com): > On Fri, 28 Aug 2015 14:35:09 +0100 > Brian <ad44@cityscape.co.uk> wrote: > > On Fri 28 Aug 2015 at 14:45:32 +0300, Reco wrote: > > > On Fri, 28 Aug 2015 12:09:08 +0100 > > > Brian <ad44@cityscape.co.uk> wrote: > > > > On Fri 28 Aug 2015 at 10:01:59 +0000, Curt wrote: > > > > > On 2015-08-28, David Wright <deblis@lionunicorn.co.uk> wrote: > > > > > > > > > > > > $ host localhost > > > > > > Host localhost not found: 3(NXDOMAIN) > > > > > > $ ping localhost > > > > > > PING localhost (127.0.0.1) 56(84) bytes of data. > > > > > > 64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.032 ms > > > > > > > > > > curty@einstein:~$ host localhost > > > > > localhost has address 127.0.0.1 > > > > > localhost has IPv6 address ::1 > > > > > > > > To complete the picture: > > > > > > > > brian@desktop:~$ dig -x 127.0.0.1 > > > > > > > > ; <<>> DiG 9.9.5-9-Debian <<>> -x 127.0.0.1 [...] > > > > ;; ANSWER SECTION: > > > > 1.0.0.127.in-addr.arpa. 10800 IN PTR localhost. [...] > > > > host and dig use only the DNS. > > > > > > > > Elimar's suggestion to use 'host $(hostname)' will work if hostname is > > > > a FQDN. But it shouldn't (or wouldn't) be on a stock Debian system. > > > > > > Not unless said 'stock Debian system' has 'search <domain>' stanza > > > in /etc/resolv.conf. > > > > Does "search example.org" count? :) > > It should count for the hosts in this domain. Provided, of course, that > one needs to resolve 'bare' hostnames (i.e. non-FQDN). > > > What is not understandable (to me) is why 'host localhost' resolves for > > some but not for others and why it is thought 'host $(hostname)' should > > resolve in the DNS. > > Stock Debian BIND configuration includes this wonderful snippet > (/etc/bind/db.local): > > ; > ; BIND data file for local loopback interface > ; > $TTL 604800 > @ IN SOA localhost. root.localhost. ( > 2 ; Serial > 604800 ; Refresh > 86400 ; Retry > 2419200 ; Expire > 604800 ) ; Negative Cache TTL > ; > @ IN NS localhost. > @ IN A 127.0.0.1 > @ IN AAAA ::1 > > Translating this to English - every BIND installed on Debian considers > itself the final authority on "localhost" zone and always returns > 127.0.0.1 for A queries (IPv4) and ::1 for AAAA queries (IPv6). > Other Linux distributions can store zone files elsewhere, but the > principle is the same. > Interpreting /etc/bind/db.127 (PTR entries) is left for an exercise for > the readers. > > So - 'host localhost' *should* work given an ideal world (because in > ideal world everyone will use an ideal DNS, which is BIND). Why on earth would I want to use BIND on my LAN at home? Just so I have to read and understand RFC1035? No, I just put the hostnames and addresses into /etc/hosts. (And script it because I have five to do.) Debian correctly puts 127.0.0.1 localhost into /etc/hosts and hosts: files mdns4_minimal [NOTFOUND=return] dns into /etc/nsswitch.conf. So it's the hosts file that resolves localhost. DNS is not involved. BIND has to know the answer *in case* it's asked, not because it's *got to be* asked. My earlier posting (included above) was to show that, of the many suggestions made in this thread, "host" was not a good choice on a typical correctly-configured system. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Reco <recoverym4n@gmail.com> |
|---|---|
| Date | 2015-08-31 09:00 +0200 |
| Message-ID | <q3rep-5o-11@gated-at.bofh.it> |
| In reply to | #157153 |
Hi. On Sun, 30 Aug 2015 19:00:55 -0500 David Wright <deblis@lionunicorn.co.uk> wrote: > Quoting Reco (recoverym4n@gmail.com): > > On Fri, 28 Aug 2015 14:35:09 +0100 > > Brian <ad44@cityscape.co.uk> wrote: > > > On Fri 28 Aug 2015 at 14:45:32 +0300, Reco wrote: > > > > On Fri, 28 Aug 2015 12:09:08 +0100 > > > > Brian <ad44@cityscape.co.uk> wrote: > > > > > On Fri 28 Aug 2015 at 10:01:59 +0000, Curt wrote: > > > > > > On 2015-08-28, David Wright <deblis@lionunicorn.co.uk> wrote: > > > > > > > > > > > > > > $ host localhost > > > > > > > Host localhost not found: 3(NXDOMAIN) > > > > > > > $ ping localhost > > > > > > > PING localhost (127.0.0.1) 56(84) bytes of data. > > > > > > > 64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.032 ms > > > > > > > > > > > > curty@einstein:~$ host localhost > > > > > > localhost has address 127.0.0.1 > > > > > > localhost has IPv6 address ::1 > > > > > > > > > > To complete the picture: > > > > > > > > > > brian@desktop:~$ dig -x 127.0.0.1 > > > > > > > > > > ; <<>> DiG 9.9.5-9-Debian <<>> -x 127.0.0.1 > [...] > > > > > ;; ANSWER SECTION: > > > > > 1.0.0.127.in-addr.arpa. 10800 IN PTR localhost. > [...] > > > > > host and dig use only the DNS. > > > > > > > > > > Elimar's suggestion to use 'host $(hostname)' will work if hostname is > > > > > a FQDN. But it shouldn't (or wouldn't) be on a stock Debian system. > > > > > > > > Not unless said 'stock Debian system' has 'search <domain>' stanza > > > > in /etc/resolv.conf. > > > > > > Does "search example.org" count? :) > > > > It should count for the hosts in this domain. Provided, of course, that > > one needs to resolve 'bare' hostnames (i.e. non-FQDN). > > > > > What is not understandable (to me) is why 'host localhost' resolves for > > > some but not for others and why it is thought 'host $(hostname)' should > > > resolve in the DNS. > > > > Stock Debian BIND configuration includes this wonderful snippet > > (/etc/bind/db.local): > > > > ; > > ; BIND data file for local loopback interface > > ; > > $TTL 604800 > > @ IN SOA localhost. root.localhost. ( > > 2 ; Serial > > 604800 ; Refresh > > 86400 ; Retry > > 2419200 ; Expire > > 604800 ) ; Negative Cache TTL > > ; > > @ IN NS localhost. > > @ IN A 127.0.0.1 > > @ IN AAAA ::1 > > > > Translating this to English - every BIND installed on Debian considers > > itself the final authority on "localhost" zone and always returns > > 127.0.0.1 for A queries (IPv4) and ::1 for AAAA queries (IPv6). > > Other Linux distributions can store zone files elsewhere, but the > > principle is the same. > > Interpreting /etc/bind/db.127 (PTR entries) is left for an exercise for > > the readers. > > > > So - 'host localhost' *should* work given an ideal world (because in > > ideal world everyone will use an ideal DNS, which is BIND). > > Why on earth would I want to use BIND on my LAN at home? Just so I > have to read and understand RFC1035? No, I just put the hostnames > and addresses into /etc/hosts. (And script it because I have five > to do.) If you have one PC and one router - BIND is redundant indeed (although useful to combat those pesky NXDOMAIN hijackers). Once the number of PCs (tablets, phones, whatever) grows, the need of DNS usually comes by itself. > Debian correctly puts 127.0.0.1 localhost into /etc/hosts and > hosts: files mdns4_minimal [NOTFOUND=return] dns > into /etc/nsswitch.conf. So it's the hosts file that resolves > localhost. DNS is not involved. BIND has to know the answer *in case* > it's asked, not because it's *got to be* asked. Assuming that you use the sane software which respects nsswitch.conf - that's true. Sadly, not all software is sane (and no, I'm not meaning dig, nslookup and host). Also, *your* nsswitch.conf clearly shows that your are: 1) Using mDNS for name resolution (and it can complicate things with it's .local domain). 2) Definitely allowing the host to use DNS :) > My earlier posting (included above) was to show that, of the many > suggestions made in this thread, "host" was not a good choice on a > typical correctly-configured system. That's true indeed. On a local host "ifconfig" or "ip a" is more than enough. Reco
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2015-08-30 05:10 +0200 |
| Message-ID | <q31ah-4PE-1@gated-at.bofh.it> |
| In reply to | #156964 |
Quoting Brian (ad44@cityscape.co.uk): > On Fri 28 Aug 2015 at 14:45:32 +0300, Reco wrote: > > On Fri, 28 Aug 2015 12:09:08 +0100 > > Brian <ad44@cityscape.co.uk> wrote: > > > On Fri 28 Aug 2015 at 10:01:59 +0000, Curt wrote: > > > > On 2015-08-28, David Wright <deblis@lionunicorn.co.uk> wrote: > > > > > $ host localhost > > > > > Host localhost not found: 3(NXDOMAIN) > > > > > $ ping localhost > > > > > PING localhost (127.0.0.1) 56(84) bytes of data. > > > > > 64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.032 ms > > > > > > > > curty@einstein:~$ host localhost > > > > localhost has address 127.0.0.1 > > > > localhost has IPv6 address ::1 > > > > > > To complete the picture: > > > > > > brian@desktop:~$ dig -x 127.0.0.1 > > > > > > ; <<>> DiG 9.9.5-9-Debian <<>> -x 127.0.0.1 [...] > > > ;; ANSWER SECTION: > > > 1.0.0.127.in-addr.arpa. 10800 IN PTR localhost. [...] > > > host and dig use only the DNS. > > > > > > Elimar's suggestion to use 'host $(hostname)' will work if hostname is > > > a FQDN. But it shouldn't (or wouldn't) be on a stock Debian system. > > > > Not unless said 'stock Debian system' has 'search <domain>' stanza > > in /etc/resolv.conf. > > Does "search example.org" count? :) > > What is not understandable (to me) is why 'host localhost' resolves for > some but not for others Is it as simple as: routers with a caching nameserver can resolve hostnames (because they've either been told it or issued it) whereas those without can't (even if they issued it with their DHCP server). > and why it is thought 'host $(hostname)' should > resolve in the DNS. Is it because, having no dots, the router's caching nameserver should not query the external nameservers, but can resolve the name itself, so it does so (à la RFC6761). In my own instance, hostname == domainname (and no search), and my router has no DNS function, only DHCP. Cheers, David.
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.debian.user
csiph-web