On Fri, Jun 29, 2018 at 12:13:39AM +0200, [email protected] wrote:
> On 06/28 09:04, Mick wrote:
> > On Thursday, 28 June 2018 17:55:12 BST [email protected] wrote:
> > > Hi,
> > >
> > > I am "dicovering" (what a great word :) the IP address of my Raspberry
> > > Pi now via ahavi/nss-mdns.
> > >
> > > When pinging my PC on my Raspberry Pi I get the IPv4-address (good!) -
> > > when pinging my Raspberry I only get the IPv6-address(wierd-looking) . The
> > > commands are identical.
> > >
> > > ifconfig on my Raspberry shows me, that the interface gets a ip4 and a
> > > ipv6 address.
> > >
> > > What do I need where to tweak to get ipv4 address shown when pinging?
> > >
> > > Thanks a lot for any help in advance!
> > > Cheers
> > > Meino
> >
> > ping -4 -c 3 <IP address>
> >
> > --
> > Regards,
> > Mick
>
>
> Hi Mick,
>
> thanks for your help! :)
>
> But...sorry I asked not exactly enough (no native speaker).
>
> I dont want to change the ping options...I am searching for
> a global setting, which seems to different on both machines,
> since the output of an unaltered ping call on each of them
> produces different output...
>
> What config should I modify?
>
/etc/nsswitch.conf, the line that starts with 'host:'.
Mine looks like this:
hosts: files mdns_minimal [NOTFOUND=return] dns mdns
you can specify mdns4_minimal/mdns4 instead of mdns_minimal/mdns to only
get ipv4 results. With mdns either ipv4 or ipv6 will be returned, but
apparently ipv6 is preferred.