Disappearing and reappearing service if a text is changed

View: New views
19 Messages — Rating Filter:   Alert me  

Disappearing and reappearing service if a text is changed

by Florian Erfurth-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, I wrote two applications (1 for server and 1 for client). On
Server-Side a service-file (in /etc/avahi/services/...) is written if
service-text is changed. Sometimes on Client I got such DEBUG-Info:
avahithread.c(203): service REMOVE: service='Floh' type='_boxMySQL._tcp'
domain='local'
avahithread.c(195): NEW: service='Floh' type='_boxMySQL._tcp' domain='local'

Which means, the service disappeared and reappeared which is really ugly
for clients. :( It would help me if you could tell me why this happens
(and maybe how it can be avoided).
And seldom such bad thing happens (which must not happen :( ):
(Resolver) Failed to resolve service 'Floh' of type '_boxMySQL._tcp' in
domain 'local': Timeout reached

Is there a way to get out why Timeout is reached?
cu Floh

_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Florian Erfurth-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Florian Erfurth schrieb:
> And seldom such bad thing happens (which must not happen :( ):
> (Resolver) Failed to resolve service 'Floh' of type '_boxMySQL._tcp' in
> domain 'local': Timeout reached
>  
Hi, I found out, after timeout avahi tells me the host does have such
address like "169.254.9.181" which is wrong (true: "192.168.0.120").
Where the hell does avahi get such address? And why does it happen?

cu Floh
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Lennart Poettering-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 25.05.09 15:57, Florian Erfurth (f.erfurth@...) wrote:

> Hi, I wrote two applications (1 for server and 1 for client). On
> Server-Side a service-file (in /etc/avahi/services/...) is written if
> service-text is changed. Sometimes on Client I got such DEBUG-Info:
> avahithread.c(203): service REMOVE: service='Floh' type='_boxMySQL._tcp'
> domain='local'
> avahithread.c(195): NEW: service='Floh' type='_boxMySQL._tcp'
> domain='local'

Seems like the servcie refresh packets didn't get through.

> Which means, the service disappeared and reappeared which is really ugly
> for clients. :( It would help me if you could tell me why this happens
> (and maybe how it can be avoided).
> And seldom such bad thing happens (which must not happen :( ):
> (Resolver) Failed to resolve service 'Floh' of type '_boxMySQL._tcp' in
> domain 'local': Timeout reached
>
> Is there a way to get out why Timeout is reached?

The timeout is reached because we didn't get a reply in time.

You probably have some kind of packet loss on your network (or in the
local queuing).

mDNS is not a reliable protocol, by design. You should not make
reliability assumptions it cannot provide.

Lennart

--
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Lennart Poettering-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 26.05.09 12:12, Florian Erfurth (f.erfurth@...) wrote:

>
> Florian Erfurth schrieb:
> > And seldom such bad thing happens (which must not happen :( ):
> > (Resolver) Failed to resolve service 'Floh' of type '_boxMySQL._tcp' in
> > domain 'local': Timeout reached
> >  
> Hi, I found out, after timeout avahi tells me the host does have such
> address like "169.254.9.181" which is wrong (true: "192.168.0.120").
> Where the hell does avahi get such address? And why does it happen?

That's an IPv4LL address. It gets assigned by avahi-autoipd or a
similar tool. Most modern systems use it as fallback when no manual
configuration and no DHCP is available.

Lennart

--
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Florian Erfurth-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lennart Poettering schrieb:

> On Mon, 25.05.09 15:57, Florian Erfurth (f.erfurth@...) wrote:
>  
>> Hi, I wrote two applications (1 for server and 1 for client). On
>> Server-Side a service-file (in /etc/avahi/services/...) is written if
>> service-text is changed. Sometimes on Client I got such DEBUG-Info:
>> avahithread.c(203): service REMOVE: service='Floh' type='_boxMySQL._tcp'
>> domain='local'
>> avahithread.c(195): NEW: service='Floh' type='_boxMySQL._tcp'
>> domain='local'
>>    
> Seems like the servcie refresh packets didn't get through.
>  
So its not my fault (programming side)?

>> And seldom such bad thing happens (which must not happen :( ):
>> (Resolver) Failed to resolve service 'Floh' of type '_boxMySQL._tcp' in
>> domain 'local': Timeout reached
>>
>> Is there a way to get out why Timeout is reached?
>>    
>
> The timeout is reached because we didn't get a reply in time.
>
> You probably have some kind of packet loss on your network (or in the
> local queuing).
>  
I don't think I'm loosing packets often here, but I'll test it. Can I
increase the timeout-value?
> mDNS is not a reliable protocol, by design. You should not make
> reliability assumptions it cannot provide.
>  
Sure... but is there any alternative for keeping a list of hosts and its
IPs? I think not.
cu Floh
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Florian Erfurth-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lennart Poettering schrieb:

> On Tue, 26.05.09 12:12, Florian Erfurth (f.erfurth@...) wrote:
>  
>> Florian Erfurth schrieb:
>>    
>>> And seldom such bad thing happens (which must not happen :( ):
>>> (Resolver) Failed to resolve service 'Floh' of type '_boxMySQL._tcp' in
>>> domain 'local': Timeout reached
>>>      
>> Hi, I found out, after timeout avahi tells me the host does have such
>> address like "169.254.9.181" which is wrong (true: "192.168.0.120").
>> Where the hell does avahi get such address? And why does it happen?
>>    
> That's an IPv4LL address. It gets assigned by avahi-autoipd or a
> similar tool. Most modern systems use it as fallback when no manual
> configuration and no DHCP is available.
>  
Umm... on Server the IP is set manually to 192.168.0.120 so it has a
fixed address. This is why I'm wondering about the IPv4LL address
displayed on client. How can I get rid of this?
Sometime I just got "169.254.9.XXX". (this is bad)
Sometime I got "169.254.9.XXX" and after some seconds I got
"192.168.0.120". (this is ok)

cu Floh
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Lennart Poettering-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 27.05.09 15:42, Florian Erfurth (f.erfurth@...) wrote:

> >> avahithread.c(203): service REMOVE: service='Floh' type='_boxMySQL._tcp'
> >> domain='local'
> >> avahithread.c(195): NEW: service='Floh' type='_boxMySQL._tcp'
> >> domain='local'
> >>    
> > Seems like the servcie refresh packets didn't get through.
>
> So its not my fault (programming side)?

Dunno. I don't know your code.

> > The timeout is reached because we didn't get a reply in time.
> >
> > You probably have some kind of packet loss on your network (or in the
> > local queuing).
> >  
> I don't think I'm loosing packets often here, but I'll test it. Can I
> increase the timeout-value?

Sure. Check for the TIMEOUT_MSEC value in
avahi-core/resolve-host-name.c.

> > mDNS is not a reliable protocol, by design. You should not make
> > reliability assumptions it cannot provide.
> >  
> Sure... but is there any alternative for keeping a list of hosts and its
> IPs? I think not.

Uh? Dunno what you want to do. But what you just said here sounds like
a pretty generic problem, which could be solves by DNS too, heck, even
a /etc/hosts file.

Lennart

--
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Lennart Poettering-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 27.05.09 15:47, Florian Erfurth (f.erfurth@...) wrote:

> >> Hi, I found out, after timeout avahi tells me the host does have such
> >> address like "169.254.9.181" which is wrong (true: "192.168.0.120").
> >> Where the hell does avahi get such address? And why does it happen?
> >>    
> > That's an IPv4LL address. It gets assigned by avahi-autoipd or a
> > similar tool. Most modern systems use it as fallback when no manual
> > configuration and no DHCP is available.
> >  
>
> Umm... on Server the IP is set manually to 192.168.0.120 so it has a
> fixed address. This is why I'm wondering about the IPv4LL address
> displayed on client. How can I get rid of this?
> Sometime I just got "169.254.9.XXX". (this is bad)
> Sometime I got "169.254.9.XXX" and after some seconds I got
> "192.168.0.120". (this is ok)

It's not the client side that makes these adresses up. It's the host
itself which configures those addresses. On Linux use "ip addr" to
find out which addresses are assigned to your interface.

On a local network it shouldn't matter which adress is picked for
connection as long as it is a valid one. That's why it is not
deterministic which address is handed to applications when they try to
resolve a host name.

Lennart

--
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Florian Erfurth-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lennart Poettering schrieb:

> On Wed, 27.05.09 15:47, Florian Erfurth (f.erfurth@...) wrote:
>
>  
>>>> Hi, I found out, after timeout avahi tells me the host does have such
>>>> address like "169.254.9.181" which is wrong (true: "192.168.0.120").
>>>> Where the hell does avahi get such address? And why does it happen?  
>>>>        
>>> That's an IPv4LL address. It gets assigned by avahi-autoipd or a
>>> similar tool. Most modern systems use it as fallback when no manual
>>> configuration and no DHCP is available.
>>>      
>> Umm... on Server the IP is set manually to 192.168.0.120 so it has a
>> fixed address. This is why I'm wondering about the IPv4LL address
>> displayed on client. How can I get rid of this?
>> Sometime I just got "169.254.9.XXX". (this is bad)
>> Sometime I got "169.254.9.XXX" and after some seconds I got
>> "192.168.0.120". (this is ok)
>>    
> It's not the client side that makes these adresses up. It's the host
> itself which configures those addresses. On Linux use "ip addr" to
> find out which addresses are assigned to your interface.
>  
Ok, this means the host always(?) get 169.254.7.XXX-Address before
getting IP from /etc/network/interfaces, right? Thank you for your tip,
but I cannot use "ip addr" on client if I want to know the IP of the host.
> On a local network it shouldn't matter which adress is picked for
> connection as long as it is a valid one. That's why it is not
> deterministic which address is handed to applications when they try to
> resolve a host name.
>  
Sorry, you're saying "169.254.7.XXX"-Adress is a valid address? Here its
not valid since the network-setting is given (static IP, netmask ...).
If I try to ping from client, I get "Destination Net Unreachable".

Thank you.
cu Floh
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Lennart Poettering-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 28.05.09 13:21, Florian Erfurth (f.erfurth@...) wrote:

> Ok, this means the host always(?) get 169.254.7.XXX-Address before
> getting IP from /etc/network/interfaces, right? Thank you for your tip,
> but I cannot use "ip addr" on client if I want to know the IP of the
> host.

Uh? Not sure I understand what you mean.

Avahi only announces one address per host name and interface. It tries
to be smart and picks the routable address over the IPv4LL address if
both are configured on the same interface.

Other mDNS implementations my have implemented this differently, and
might even register both addresseson the network. When Avahi discovers
that it is not deterministc which one of those it picks.

> > On a local network it shouldn't matter which adress is picked for
> > connection as long as it is a valid one. That's why it is not
> > deterministic which address is handed to applications when they try to
> > resolve a host name.
> >  
> Sorry, you're saying "169.254.7.XXX"-Adress is a valid address? Here its
> not valid since the network-setting is given (static IP, netmask ...).
> If I try to ping from client, I get "Destination Net Unreachable".

Yes, of course. 169.254.x.x addresses are valid ipv4ll adresses. Some
older OSes/distros/stacks don't know them. However everything recent
knows it. In fact Windows knows them since 95b, MacOS X since about
forever. And the better Linux distributions since quite some time too.

Lennart

--
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

lLibavahi-qt4 not provided in OpenSuse repositories

by Daniel Wynne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Lennart!

Me again :-)

The libavahi-qt4 lib seems to be not provided in the OpenSuse standard
repos. Is this right, or am I just looking at the wrong place? All other
Avahi-libs are available.

Thanx

Daniel


On Sun, 2009-06-07 at 01:52 +0200, Lennart Poettering wrote:

> On Thu, 28.05.09 13:21, Florian Erfurth (f.erfurth@...) wrote:
>
> > Ok, this means the host always(?) get 169.254.7.XXX-Address before
> > getting IP from /etc/network/interfaces, right? Thank you for your tip,
> > but I cannot use "ip addr" on client if I want to know the IP of the
> > host.
>
> Uh? Not sure I understand what you mean.
>
> Avahi only announces one address per host name and interface. It tries
> to be smart and picks the routable address over the IPv4LL address if
> both are configured on the same interface.
>
> Other mDNS implementations my have implemented this differently, and
> might even register both addresseson the network. When Avahi discovers
> that it is not deterministc which one of those it picks.
>
> > > On a local network it shouldn't matter which adress is picked for
> > > connection as long as it is a valid one. That's why it is not
> > > deterministic which address is handed to applications when they try to
> > > resolve a host name.
> > >  
> > Sorry, you're saying "169.254.7.XXX"-Adress is a valid address? Here its
> > not valid since the network-setting is given (static IP, netmask ...).
> > If I try to ping from client, I get "Destination Net Unreachable".
>
> Yes, of course. 169.254.x.x addresses are valid ipv4ll adresses. Some
> older OSes/distros/stacks don't know them. However everything recent
> knows it. In fact Windows knows them since 95b, MacOS X since about
> forever. And the better Linux distributions since quite some time too.
>
> Lennart
>

_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: lLibavahi-qt4 not provided in OpenSuse repositories

by Lennart Poettering-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 08.06.09 17:55, Daniel Wynne (daniel.wynne@...) wrote:

> Hi Lennart!
>
> Me again :-)
>
> The libavahi-qt4 lib seems to be not provided in the OpenSuse standard
> repos. Is this right, or am I just looking at the wrong place? All other
> Avahi-libs are available.

No idea. Please ask the OpenSUSE folks.

Lennart

--
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Florian Erfurth-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lennart Poettering schrieb:

> On Thu, 28.05.09 13:21, Florian Erfurth (f.erfurth@...) wrote:
>
>  
>> Ok, this means the host always(?) get 169.254.7.XXX-Address before
>> getting IP from /etc/network/interfaces, right? Thank you for your tip,
>> but I cannot use "ip addr" on client if I want to know the IP of the
>> host.
>>    
>
> Uh? Not sure I understand what you mean.
>
> Avahi only announces one address per host name and interface. It tries
> to be smart and picks the routable address over the IPv4LL address if
> both are configured on the same interface.
>  
I found out, and maybe this is the cause of my problem. Below you can
see the output of 'ifconfig'. br0 is the bridge, which bridges between
eth0 and eth1. The Client is connected to eth1. It seems Avahi on server
sends IP-address from eth1-avah (169.254.9.181) instead of br0
(192.168.7.120) which is wrong. :( By the way, why is there no br0-avah?
Is this normal?

Simple question: What should I do, so that Avahi sends IP of br0
(192.168.7.120)?

cu Floh

 > br0       Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
 >           inet addr:192.168.7.120  Bcast:192.168.7.255  
Mask:255.255.255.0
 >           inet6 addr: fe80::2e0:f4ff:fe17:b1c6/64 Scope:Link
 >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 >           RX packets:2544939 errors:0 dropped:0 overruns:0 frame:0
 >           TX packets:98965 errors:0 dropped:0 overruns:0 carrier:0
 >           collisions:0 txqueuelen:0
 >           RX bytes:2079136680 (1.9 GB)  TX bytes:87863835 (83.7 MB)
 >
 > eth0      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
 >           inet6 addr: fe80::2e0:f4ff:fe17:b1c6/64 Scope:Link
 >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 >           RX packets:968050 errors:0 dropped:0 overruns:0 frame:0
 >           TX packets:455901 errors:0 dropped:0 overruns:0 carrier:0
 >           collisions:0 txqueuelen:1000
 >           RX bytes:803170840 (765.9 MB)  TX bytes:368065407 (351.0 MB)
 >           Interrupt:16 Base address:0xa000
 >
 > eth1      Link encap:Ethernet  HWaddr YY:YY:YY:YY:YY:YY
 >           inet6 addr: fe80::2e0:f4ff:fe17:b1c7/64 Scope:Link
 >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 >           RX packets:33171275 errors:0 dropped:0 overruns:0 frame:0
 >           TX packets:1117297 errors:0 dropped:0 overruns:0 carrier:0
 >           collisions:0 txqueuelen:1000
 >           RX bytes:1295982097 (1.2 GB)  TX bytes:867620730 (827.4 MB)
 >           Interrupt:17 Base address:0xc000
 >
 > eth2      Link encap:Ethernet  HWaddr ZZ:ZZ:ZZ:ZZ:ZZ:ZZ
 >           UP BROADCAST MULTICAST  MTU:1500  Metric:1
 >           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 >           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 >           collisions:0 txqueuelen:1000
 >           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
 >           Interrupt:18 Base address:0xe000
 >
 > eth0:avah Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
 >           inet addr:169.254.9.176  Bcast:169.254.255.255  
Mask:255.255.0.0
 >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 >           Interrupt:16 Base address:0xa000
 >
 > eth1:avah Link encap:Ethernet  HWaddr YY:YY:YY:YY:YY:YY
 >           inet addr:169.254.9.181  Bcast:169.254.255.255  
Mask:255.255.0.0
 >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 >           Interrupt:17 Base address:0xc000
 >
 > eth2:avah Link encap:Ethernet  HWaddr ZZ:ZZ:ZZ:ZZ:ZZ:ZZ
 >           inet addr:169.254.9.186  Bcast:169.254.255.255  
Mask:255.255.0.0
 >           UP BROADCAST MULTICAST  MTU:1500  Metric:1
 >           Interrupt:18 Base address:0xe000
 >
 > lo        Link encap:Local Loopback
 >           inet addr:127.0.0.1  Mask:255.0.0.0
 >           inet6 addr: ::1/128 Scope:Host
 >           UP LOOPBACK RUNNING  MTU:16436  Metric:1
 >           RX packets:7644 errors:0 dropped:0 overruns:0 frame:0
 >           TX packets:7644 errors:0 dropped:0 overruns:0 carrier:0
 >           collisions:0 txqueuelen:0
 >           RX bytes:551509 (538.5 KB)  TX bytes:551509 (538.5 KB)
 >
 > tun0      Link encap:UNSPEC  HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
 >           inet addr:192.168.99.130  P-t-P:192.168.99.130  
Mask:255.255.255.252
 >           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:8300  Metric:1
 >           RX packets:1052 errors:0 dropped:0 overruns:0 frame:0
 >           TX packets:1063 errors:0 dropped:0 overruns:0 carrier:0
 >           collisions:0 txqueuelen:500
 >           RX bytes:33687 (32.8 KB)  TX bytes:573338 (559.9 KB)
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Lennart Poettering-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 17.06.09 16:21, Florian Erfurth (f.erfurth@...) wrote:

> >> Ok, this means the host always(?) get 169.254.7.XXX-Address before
> >> getting IP from /etc/network/interfaces, right? Thank you for your tip,
> >> but I cannot use "ip addr" on client if I want to know the IP of the
> >> host.
> >
> > Uh? Not sure I understand what you mean.
> >
> > Avahi only announces one address per host name and interface. It tries
> > to be smart and picks the routable address over the IPv4LL address if
> > both are configured on the same interface.
> >  
> I found out, and maybe this is the cause of my problem. Below you can
> see the output of 'ifconfig'.

ifconfig is obsolete. Use "ip addr". I wished distros wouldn't install
ifconfig anymore by default. ifconfig doesn't really handle interfaces
with multiple addresses properly, and neither labeled adresses.

> br0 is the bridge, which bridges between
> eth0 and eth1. The Client is connected to eth1. It seems Avahi on server
> sends IP-address from eth1-avah (169.254.9.181) instead of br0
> (192.168.7.120) which is wrong. :( By the way, why is there no br0-avah?
> Is this normal?

Yes, if you use a legacy tool than all kinds of weird things
happen. ifconfig has been obsolete since about kernel 2.2.

> Simple question: What should I do, so that Avahi sends IP of br0
> (192.168.7.120)?

The source address for UDP packets is chosen automatically by the
kernel as part of the routing table logic.

Lennart

--
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Florian Erfurth-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lennart Poettering schrieb:
> On Wed, 17.06.09 16:21, Florian Erfurth (f.erfurth@...) wrote
>> I found out, and maybe this is the cause of my problem. Below you can
>> see the output of 'ifconfig'.
>>    
> ifconfig is obsolete. Use "ip addr". I wished distros wouldn't install
> ifconfig anymore by default. ifconfig doesn't really handle interfaces
> with multiple addresses properly, and neither labeled adresses.
>  
Oh, then I urgently should update my knownledge. :/
>> br0 is the bridge, which bridges between
>> eth0 and eth1. The Client is connected to eth1. It seems Avahi on server
>> sends IP-address from eth1-avah (169.254.9.181) instead of br0
>> (192.168.7.120) which is wrong. :( By the way, why is there no br0-avah?
>> Is this normal?
>>    
> Yes, if you use a legacy tool than all kinds of weird things
> happen. ifconfig has been obsolete since about kernel 2.2.
>  
I wish my colleagues would see that too. :/
>> Simple question: What should I do, so that Avahi sends IP of br0
>> (192.168.7.120)?
>>    
> The source address for UDP packets is chosen automatically by the
> kernel as part of the routing table logic.
>  
One question about that: Is such UDP packet sent only one time? Or twice
if a device contains 2 addresses (eth1/br AND eth1:avah)?

Thank you!
cu Floh
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Lennart Poettering-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 17.06.09 18:07, Florian Erfurth (f.erfurth@...) wrote:

> >> Simple question: What should I do, so that Avahi sends IP of br0
> >> (192.168.7.120)?
> >>
> > The source address for UDP packets is chosen automatically by the
> > kernel as part of the routing table logic.
> >
> One question about that: Is such UDP packet sent only one time? Or twice
> if a device contains 2 addresses (eth1/br AND eth1:avah)?

There's no such thing as "eth1:avah". That's just a compat kludge for
legacy tools like ifconfig. As mentioned, use "ip addr" insetad of
ifconfig and it will show as a normal labeled address assigned to that
interface.

Avahi distuingishes interfaces by their ifindex, not by their addresses.

Lennart

--
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Florian Erfurth-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lennart Poettering schrieb:

> On Wed, 17.06.09 18:07, Florian Erfurth (f.erfurth@...) wrote:
>
>  
>>>> Simple question: What should I do, so that Avahi sends IP of br0
>>>> (192.168.7.120)?
>>>>        
>>> The source address for UDP packets is chosen automatically by the
>>> kernel as part of the routing table logic.
>>>      
>> One question about that: Is such UDP packet sent only one time? Or twice
>> if a device contains 2 addresses (eth1/br AND eth1:avah)?
>>    
> There's no such thing as "eth1:avah". That's just a compat kludge for
> legacy tools like ifconfig. As mentioned, use "ip addr" insetad of
> ifconfig and it will show as a normal labeled address assigned to that
> interface.
>  
Ok:
 > 1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
 >     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
 >     inet 127.0.0.1/8 scope host lo
 >     inet6 ::1/128 scope host
 >        valid_lft forever preferred_lft forever
 > 2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc
pfifo_fast qlen 1000
 >     link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
 >     inet 169.254.9.176/16 brd 169.254.255.255 scope link eth0:avahi
 > 3: eth1: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast
qlen 1000
 >     link/ether yy:yy:yy:yy:yy:yy brd ff:ff:ff:ff:ff:ff
 >     inet 169.254.9.181/16 brd 169.254.255.255 scope link eth1:avahi
 >     inet6 fe80::2e0:f4ff:fe17:b1c7/64 scope link
 >        valid_lft forever preferred_lft forever
 > 4: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc
pfifo_fast qlen 1000
 >     link/ether zz:zz:zz:zz:zz:zz brd ff:ff:ff:ff:ff:ff
 >     inet 169.254.9.186/16 brd 169.254.255.255 scope link eth2:avahi
 > 5: wifi0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 199
 >     link/ieee802.11 aa:aa:aa:aa:aa:aa brd ff:ff:ff:ff:ff:ff
 > 6: ath0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop
 >     link/ether bb:bb:bb:bb:bb:bb brd ff:ff:ff:ff:ff:ff
 > 7: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,10000> mtu 8300 qdisc
pfifo_fast qlen 500
 >     link/[65534]
 >     inet 192.168.99.130/30 scope global tun0
 > 8: br0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue
 >     link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
 >     inet 192.168.7.120/24 brd 192.168.7.255 scope global br0
 >     inet6 fe80::2e0:f4ff:fe17:b1c6/64 scope link
 >        valid_lft forever preferred_lft forever

So avahi (often) sent IP from eth1 instead of br0. Again, is the
IP-Address of br0 not sent if avahi takes IP from eth1?
> Avahi distuingishes interfaces by their ifindex, not by their addresses.
>  
Not sure what ifindex is, you mean such one like eth0, eth1 etc.?

cu Floh
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Lennart Poettering-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 18.06.09 09:05, Florian Erfurth (f.erfurth@...) wrote:

> So avahi (often) sent IP from eth1 instead of br0. Again, is the
> IP-Address of br0 not sent if avahi takes IP from eth1?

Avahi treats every interface with an IP address assigned
independently.

I am not sure why you run avahi-autoipd on your bridge member ifaces
in the first place.

> > Avahi distuingishes interfaces by their ifindex, not by their addresses.
> >  
> Not sure what ifindex is, you mean such one like eth0, eth1 etc.?

No. I mean the ifindex, as returned by if_nametoindex().

Lennart

--
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi

Re: Disappearing and reappearing service if a text is changed

by Florian Erfurth-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lennart Poettering schrieb:

> On Thu, 18.06.09 09:05, Florian Erfurth (f.erfurth@...) wrote:
>  
>> So avahi (often) sent IP from eth1 instead of br0. Again, is the
>> IP-Address of br0 not sent if avahi takes IP from eth1?
>>    
> Avahi treats every interface with an IP address assigned
> independently.
>
> I am not sure why you run avahi-autoipd on your bridge member ifaces
> in the first place.
>  
You said it. It's not me but my colleague did it. Yesterday I already
told him not to use avahi-autiipd for bridge-member ifaces. But he
doesn't want hear me. *sigh*
But thank you very much, I'll talk with him again.

cu Floh
_______________________________________________
avahi mailing list
avahi@...
http://lists.freedesktop.org/mailman/listinfo/avahi