Re: Network Problem: Redirection

2024-02-04 Thread Gremlin

On 2/4/24 09:03, Marco Moock wrote:

Am 04.02.2024 um 07:12:50 Uhr schrieb Gremlin:


I also slay all the mDNS non sense.


mDNS works fine if the host names are properly set and no other way of
setting the addresses (Unicast DNS, /etc/hosts) is being used.



It is not needed if the network is setup correctly with DNS.





Re: Network Problem: Redirection

2024-02-04 Thread Marco Moock
Am 04.02.2024 um 07:12:50 Uhr schrieb Gremlin:

> I also slay all the mDNS non sense.

mDNS works fine if the host names are properly set and no other way of
setting the addresses (Unicast DNS, /etc/hosts) is being used.

-- 
kind regards
Marco

Spam und Werbung bitte an ichschickerekl...@cartoonies.org



Re: Network Problem: Redirection

2024-02-04 Thread Gremlin

On 2/4/24 02:39, Marco Moock wrote:

Am 02.02.2024 um 17:12:06 Uhr schrieb Gremlin:


On 2/2/24 16:28, Greg Wooledge wrote:

On Fri, Feb 02, 2024 at 02:03:46PM -0700, Charles Curley wrote:

root@hawk:~# host samba
samba.localdomain is an alias for hawk.localdomain.
hawk.localdomain has address 192.168.100.6


host(1) looks in DNS only.  It doesn't do the standard name
resolution that applications do.
   


host gremlin
gremlin.home.arpa has address 192.168.1.4
gremlin.home.arpa has IPv6 address fe80::a940:6c49:a620:4c09


You have to check from where the other IP address comes.



What other IP addresses.

His "problem" could have been resolved by properly setting up a DNS 
server. I also slay all the mDNS non sense.


# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: files
group:  files
shadow: files
gshadow:files

hosts:  files  dns
networks:   files

protocols:  db files
services:   db files
ethers: db files
rpc:db files

netgroup:   nis





Re: Network Problem: Redirection

2024-02-04 Thread hw
On Fri, 2024-02-02 at 16:47 -0700, Charles Curley wrote:
> On Fri, 2 Feb 2024 15:52:41 -0700
> Charles Curley  wrote:
> 
> > But I don't think that will solve the routing problem.
> 
> Well, I was wrong. That did solve the routing problems.
> 
> I moved the apt-proxy line for the VMs' benefit into a VM's /etc/hosts
> and took it out of hawk's /etc/hosts. samba is now an alias in the
> virtual zone, so I don't need that line at all.
> 
> Thanks, Greg, for spotting that. Sometimes I'm dense. It took me a
> while to realize what you were getting at.
> 

This is not a routing problem in the first place.

If you have a DNS server configured that can resolve for you LAN(s)
(like you should), you don't need to (and should not) change anything
in /etc/hosts.  When you specify different addresses for the same host
at arbitrary places, you're likely to create confusion, especially
when you're using addresses that are supposed to have the same
meaning.  If you need to specify different names for the same host,
use CNAME records.  If you need to specify different addresses for the
same host, use different host names (at least I don't have a better
idea for that).

If you have vlans in use, make sure the addresses in the networks do
not overlap.  Otherwise your networks may not be as virtual as you
think, vlans or not, and you may create something that looks like a
routing problem.  If you're not using vlans and want virtual netwoks,
it's probably a very good idea to use vlans (and to use routing if
desirable and necessary).



Re: Network Problem: Redirection

2024-02-03 Thread Marco Moock
Am 02.02.2024 um 17:12:06 Uhr schrieb Gremlin:

> On 2/2/24 16:28, Greg Wooledge wrote:
> > On Fri, Feb 02, 2024 at 02:03:46PM -0700, Charles Curley wrote:  
> >> root@hawk:~# host samba
> >> samba.localdomain is an alias for hawk.localdomain.
> >> hawk.localdomain has address 192.168.100.6  
> > 
> > host(1) looks in DNS only.  It doesn't do the standard name
> > resolution that applications do.
> >   
> 
> host gremlin
> gremlin.home.arpa has address 192.168.1.4
> gremlin.home.arpa has IPv6 address fe80::a940:6c49:a620:4c09

You have to check from where the other IP address comes.

-- 
Gruß
Marco

Spam und Werbung bitte an ichschickerekl...@cartoonies.org



Re: Network Problem: Redirection

2024-02-02 Thread Charles Curley
On Fri, 2 Feb 2024 15:52:41 -0700
Charles Curley  wrote:

> But I don't think that will solve the routing problem.

Well, I was wrong. That did solve the routing problems.

I moved the apt-proxy line for the VMs' benefit into a VM's /etc/hosts
and took it out of hawk's /etc/hosts. samba is now an alias in the
virtual zone, so I don't need that line at all.

Thanks, Greg, for spotting that. Sometimes I'm dense. It took me a
while to realize what you were getting at.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: Network Problem: Redirection

2024-02-02 Thread Charles Curley
On Fri, 2 Feb 2024 16:52:48 -0500
Greg Wooledge  wrote:

> Well, we don't know what's "right" or "wrong" on your networks.  These
> are private (non-routable) addresses with no meaning to anyone but you
> and your fellow network denizens.

Agree.

> 
> If you need different name resolution depending on whether you're
> running on the host vs. running on the guest, then I would imagine
> there is some well-known way to define that.  Perhaps a different
> hosts file that's only used by guests?  I don't know virtualization
> stuff well.

Yup. I took a quick and dirty route to solve a problem, and it leaked
over into another area. Sigh. The solution I took depends on the fact
that the libvirtual stuff uses dnsmasq for DNS and DHCP. And dnsmasq
reads the host machine's hosts file. Nice. But, as you pointed out, so
does the host machine's DNS lookup stuff. Sigh.

Possibly the solution to this problem is to see if I can take it out of
hosts, add it to dnsmasq directly, and finagle dnsmasq to only be
visible to the virtual machines.

But I don't think that will solve the routing problem.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: Network Problem: Redirection

2024-02-02 Thread Gremlin

On 2/2/24 16:28, Greg Wooledge wrote:

On Fri, Feb 02, 2024 at 02:03:46PM -0700, Charles Curley wrote:

root@hawk:~# host samba
samba.localdomain is an alias for hawk.localdomain.
hawk.localdomain has address 192.168.100.6


host(1) looks in DNS only.  It doesn't do the standard name resolution
that applications do.



host gremlin
gremlin.home.arpa has address 192.168.1.4
gremlin.home.arpa has IPv6 address fe80::a940:6c49:a620:4c09





Re: Network Problem: Redirection

2024-02-02 Thread Greg Wooledge
> > > # For the benefit of virtual machines.
> > > 192.168.100.12 apt-proxy
> > > 192.168.122.1 samba samba.localdomain  
> > 
> > And that's where it came from (/etc/hosts).  If this IP address is
> > wrong, then it shouldn't be in here.
> 
> Gnrrr. It's right for the virtual network (192.168.122.0). But
> shouldn't that work even if it isn't the "right" address?

Well, we don't know what's "right" or "wrong" on your networks.  These
are private (non-routable) addresses with no meaning to anyone but you
and your fellow network denizens.

If you need different name resolution depending on whether you're
running on the host vs. running on the guest, then I would imagine there
is some well-known way to define that.  Perhaps a different hosts file
that's only used by guests?  I don't know virtualization stuff well.



Re: Network Problem: Redirection

2024-02-02 Thread Charles Curley
On Fri, 2 Feb 2024 22:10:19 +0100
Marco Moock  wrote:

> Sorry for the first post.
> Your problem is located in the name resolution.
> 
> Show /etc/nsswitch.conf

I have not touched this.

root@hawk:~# cat /etc/nsswitch.conf 
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: files systemd
group:  files systemd
shadow: files
gshadow:files

hosts:  files mdns4_minimal [NOTFOUND=return] dns mymachines
networks:   files

protocols:  db files
services:   db files
ethers: db files
rpc:db files

netgroup:   nis
root@hawk:~# 


-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: Network Problem: Redirection

2024-02-02 Thread Charles Curley
On Fri, 2 Feb 2024 16:28:06 -0500
Greg Wooledge  wrote:

> > However, when I try to ping samba by host name:
> > 
> > root@hawk:~# ping samba
> > PING samba (192.168.122.1) 56(84) bytes of data.  
> 
> Note that this is a *different* IP address.

Good catch, thank you.

> 
> > # For the benefit of virtual machines.
> > 192.168.100.12 apt-proxy
> > 192.168.122.1 samba samba.localdomain  
> 
> And that's where it came from (/etc/hosts).  If this IP address is
> wrong, then it shouldn't be in here.

Gnrrr. It's right for the virtual network (192.168.122.0). But
shouldn't that work even if it isn't the "right" address?

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: Network Problem: Redirection

2024-02-02 Thread Greg Wooledge
On Fri, Feb 02, 2024 at 02:03:46PM -0700, Charles Curley wrote:
> root@hawk:~# host samba
> samba.localdomain is an alias for hawk.localdomain.
> hawk.localdomain has address 192.168.100.6

host(1) looks in DNS only.  It doesn't do the standard name resolution
that applications do.

> root@hawk:~# ping 192.168.100.6
> PING 192.168.100.6 (192.168.100.6) 56(84) bytes of data.
> 64 bytes from 192.168.100.6: icmp_seq=1 ttl=64 time=0.083 ms

> However, when I try to ping samba by host name:
> 
> root@hawk:~# ping samba
> PING samba (192.168.122.1) 56(84) bytes of data.

Note that this is a *different* IP address.

> # For the benefit of virtual machines.
> 192.168.100.12 apt-proxy
> 192.168.122.1 samba samba.localdomain

And that's where it came from (/etc/hosts).  If this IP address is
wrong, then it shouldn't be in here.



Re: Network Problem: Redirection

2024-02-02 Thread Marco Moock
Am 02.02.2024 um 14:03:46 Uhr schrieb Charles Curley:

> root@hawk:~# host samba
> samba.localdomain is an alias for hawk.localdomain.
> hawk.localdomain has address 192.168.100.6


> root@hawk:~# ping samba
> PING samba (192.168.122.1) 56(84) bytes of data.


Sorry for the first post.
Your problem is located in the name resolution.

Show /etc/nsswitch.conf


-- 
kind regards
Marco

Spam und Werbung bitte an ichschickerekl...@cartoonies.org



Re: Network Problem: Redirection

2024-02-02 Thread Marco Moock
Am 02.02.2024 um 14:03:46 Uhr schrieb Charles Curley:

> From apt-proxy (192.168.100.12): icmp_seq=2 Redirect Host(New
> nexthop: hawk.localdomain (192.168.100.6))

Check the routing table on apt-proxy.
ICMP redirect happens if you have 2 routers on the same ethernet link
and the router you try to contact know a better route to the
destination.
Although, both routes need to point to the same direction.

-- 
Gruß
Marco

Spam und Werbung bitte an ichschickerekl...@cartoonies.org