Subject: Re: which interface to choose to send to destination link-local address - any RFC?

From: Parav Pandit <[email-masked]>
Date: Thu, 27 May 2010 04:28:26 -0700 (PDT)

Opening the thread again.

In my server I have #19 vlans configured on 10Gb Ethernet card.
I don't know on which vlan the destination link-local address is.

1. As a user am I supposed to do ping6 on all of them one by one?

2. How does the TCP will work? Open #19 connections to the destination link-local address with different scope id??
How does the application running on top of TCP stack know about the physical interfaces of the system?

Regards,
Parav Pandit

--- On Wed, 4/14/10, Mohacsi Janos <[email-masked]> wrote:

> From: Mohacsi Janos <[email-masked]>
> Subject: Re: which interface to choose to send to destination link-local address - any RFC?
> To: "Parav Pandit" <[email-masked]>
> Cc: [email-masked]
> Date: Wednesday, April 14, 2010, 3:01 PM
> 
> 
> 
> On Wed, 14 Apr 2010, Parav Pandit wrote:
> 
> > Hi,
> > 
> > In IPv6 stack implementation,
> > 
> > How IPv6 stack should select the outgoing interface to
> choose (when multiple interfaces) are available?
> > Typically when the destination is the link-local
> address which may be on-link on both the interfaces (before
> > the neighbor discovery) is done?
> > 
> > Should IPv6 stack do Neighbor discovery on all
> multiple interfaces in the host?
> > 
> > Which RFC defines this behavior? I referred RFC 3484
> (Default Address Selection for IPv6) but doesn't seem to
> > define this.
> > 
> > I hope I am asking on the right mailing list. If not
> please divert me to the correct one.
> 
> 
> The application should know which interface/link to choose
> in case of link-local address. The link-local is relevant to
> a specific link only.
> 
> e.g.
> 
> ping6 -I bge0 fe80::21b:63ff:fe9f:4527
> PING6(56=40+8+8 bytes) fe80::206:5bff:fef2:41c1%bge0 -->
> fe80::21b:63ff:fe9f:4527
> 16 bytes from fe80::21b:63ff:fe9f:4527%bge0, icmp_seq=0
> hlim=64 time=7.292 ms
> 16 bytes from fe80::21b:63ff:fe9f:4527%bge0, icmp_seq=1
> hlim=64 time=0.656 ms
> ^C
> --- fe80::21b:63ff:fe9f:4527 ping6 statistics ---
> 2 packets transmitted, 2 packets received, 0.0% packet
> loss
> round-trip min/avg/max/std-dev = 0.656/3.974/7.292/3.318
> ms
> 
> 
> ping6 fe80::21b:63ff:fe9f:4527
> ping6: UDP connect: Network is unreachable
> 
> If the application knows which link to use then IPv6
> protocol stack might use ND to dicover/reach the node.
> 
> Best Regards,
>         Janos Mohacsi
>

---

From: Mikael Abrahamsson <[email-masked]>
Date: Thu, 27 May 2010 13:36:01 +0200 (CEST)

> I don't know on which vlan the destination link-local address is.

Well, you pretty much know that to send packets to it. A link-local 
address is not just an address, you need to provide what interface you're 
referring to. It's of local signifance only.

> 1. As a user am I supposed to do ping6 on all of them one by one?

That is one way.

> How does the application running on top of TCP stack know about the physical interfaces of the system?

Basically this is not how you're supposed to use LL, that's why your 
questions doesn't really "compute". LL is address+interface, otherwise 
it's not complete.

-- 
Mikael Abrahamsson    email: [email-masked]

---

From: Parav Pandit <[email-masked]>
Date: Thu, 27 May 2010 05:08:46 -0700 (PDT)

Hi Miakel,

Thanks for your quick inputs.

Just confirming,

In that case how reliable is it to perform ping6 and use the scope_id(=interface_id) during starting the TCP connection?
So that TCP connect() is done only once.

My understanding is, 
RFC 4443 of ICMPv6 mandates ECHO request and response processing.
so I believe it should be o.k to rely on ping6 to get the right interface_id.

Regards,
Parav Pandit

--- On Thu, 5/27/10, Mikael Abrahamsson <[email-masked]> wrote:

> From: Mikael Abrahamsson <[email-masked]>
> Cc: "Mohacsi Janos" <[email-masked]>, [email-masked]
> Date: Thursday, May 27, 2010, 5:06 PM
> Well, you pretty much know that to send packets to it. A
> link-local address is not just an address, you need to
> provide what interface you're referring to. It's of local
> signifance only.
> 
> > 2. How does the TCP will work? Open #19 connections to
> the destination link-local address with different scope
> id??
> > How does the application running on top of TCP stack
> know about the physical interfaces of the system?
> 
> Basically this is not how you're supposed to use LL, that's
> why your questions doesn't really "compute". LL is
> address+interface, otherwise it's not complete.
> 
> -- Mikael Abrahamsson    email: [email-masked]
>

---

From: Brian Haberman <[email-masked]>
Date: Thu, 27 May 2010 09:28:28 -0400

Parav,

On 5/27/10 8:08 AM, Parav Pandit wrote:
> In that case how reliable is it to perform ping6 and use the
> scope_id(=interface_id) during starting the TCP connection? So that
> TCP connect() is done only once.

You will need the scope_id in order to use ping6.  In order to send any
packet to a link-local address, you will need the scope_id first.

> 
> My understanding is, RFC 4443 of ICMPv6 mandates ECHO request and
> response processing. so I believe it should be o.k to rely on ping6
> to get the right interface_id.

See above.

Regards,
Brian

> Regards, Parav Pandit
>> From: Mikael Abrahamsson <[email-masked]> Subject: Re: which
>> interface to choose to send to destination link-local address - any
>> RFC? To: "Parav Pandit" <[email-masked]> Cc: "Mohacsi Janos"
>> <[email-masked]>, [email-masked] Date: Thursday, May 27, 2010, 5:06
>> PM On Thu, 27 May 2010, Parav Pandit wrote:
>> 
>> address is not just an address, you need to provide what interface
>> you're referring to. It's of local signifance only.
>> 
>> the destination link-local address with different scope id??
>> Basically this is not how you're supposed to use LL, that's why
>> your questions doesn't really "compute". LL is address+interface,
>> otherwise it's not complete.
>> 
> -------------------------------------------------------------------- 
> IETF IPv6 working group mailing list [email-masked] Administrative
> Requests: https://www.ietf.org/mailman/listinfo/ipv6 
> --------------------------------------------------------------------

---

From: Suresh Krishnan <[email-masked]>
Date: Thu, 27 May 2010 10:34:07 -0400

> packet to a link-local address, you will need the scope_id first.

+1. So my question to you is, how did you get the LL address in the 
first place? That should give you clues as to what interface you need 
the ping to go out on. If you are really at a loss and you need to brute 
force probe, you can write a small bash script to do this for you. 
Something like

for i in `ip address | grep "^[0-9]" | cut -d ":" -f 2`; do echo 
"Pinging scope %${i}"; ping6 -c 1 <The_Link_Local_Address>%${i}; done

Cheers
Suresh

---

From: Parav Pandit <[email-masked]>
Date: Thu, 27 May 2010 08:25:10 -0700 (PDT)

Hi Suresh,

Thanks for the script.

The IPv6 LL addresses are shared using out of band protocol which works more at upper layer agnostic of L2 properties and gives consolidated list of LL IP addresses for all the VLANs.

Parav

--- On Thu, 5/27/10, Suresh Krishnan <[email-masked]> wrote:

> From: Suresh Krishnan <[email-masked]>
> Cc: "[email-masked]" <[email-masked]>
> Date: Thursday, May 27, 2010, 8:04 PM
> +1. So my question to you is, how did you get the LL
> address in the first place? That should give you clues as to
> what interface you need the ping to go out on. If you are
> really at a loss and you need to brute force probe, you can
> write a small bash script to do this for you. Something
> like
> 
> for i in `ip address | grep "^[0-9]" | cut -d ":" -f 2`; do
> echo "Pinging scope %${i}"; ping6 -c 1
> <The_Link_Local_Address>%${i}; done
> 
> Cheers
> Suresh
> 
>

---

From: Brian Zill <[email-masked]>
Date: Thu, 27 May 2010 16:54:39 +0000

Hi Parav,

>The IPv6 LL addresses are shared using out of band protocol which works more at upper layer agnostic of L2 properties and gives consolidated list of LL IP addresses for all the VLANs.

This is the part of your system that is broken.  Your out-of-band protocol should not be taking the link-local addresses out of scope (i.e. losing track of what link they are valid on).  Instead, it should either (a) should maintain the corresponding link information somehow, or (b) use addresses that are valid in that scope (i.e. global addresses).

Typically, any reasonable protocol that uses link-local addresses will learn any peer's addresses by receiving packets from that peer on that particular link.  The protocol will then keep both the link-local address *and* the scope-id for that address for later use in contacting that peer.

You should never need to resort to trying all links to "find" the right one that has a machine with an interface using that link-local address.  Such an approach is very error-prone.  Since link-local addresses are only guaranteed to be unique per link, you could have different machines on different VLANs using the same link-local address, and the one you find first may not be the intended machine.

--Brian

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Parav Pandit
Sent: Thursday, 27 May, 2010 08:25
To: Suresh Krishnan
Cc: [email-masked]
Subject: Re: which interface to choose to send to destination link-local address - any RFC?

Hi Suresh,

Thanks for the script.

Parav

      
--------------------------------------------------------------------
IETF IPv6 working group mailing list
[email-masked]
Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
--------------------------------------------------------------------

---

From: Bob Hinden <[email-masked]>
Date: Thu, 27 May 2010 09:58:18 -0700

> You should never need to resort to trying all links to "find" the right one that has a machine with an interface using that link-local address.  Such an approach is very error-prone.  Since link-lo…

+1

Bob

---

From: james woodyatt <[email-masked]>
Date: Thu, 27 May 2010 11:00:11 -0700

On May 27, 2010, at 09:54, Brian Zill wrote:
> [...]
> [...]

And this is where I step in and mention that both <http://tools.ietf.org/html/draft-cheshire-dnsext-multicastdns> and <http://tools.ietf.org/html/draft-cheshire-dnsext-dns-sd> comprise an excellent and field-proven example of such a protocol, and I hope it isn't too controversial to suggest that it's worth looking to, at least, for inspiration.

Of course, one hopes those drafts will emerge from IESG review sometime before the they're old enough to buy whiskey.

--
james woodyatt <[email-masked]>
member of technical staff, communications engineering

---

From: Parav Pandit <[email-masked]>
Date: Thu, 27 May 2010 13:59:48 -0700 (PDT)

--- On Thu, 5/27/10, Brian Zill <[email-masked]> wrote:

> From: Brian Zill <[email-masked]>
> Subject: RE: which interface to choose to send to destination link-local address - any RFC?
> Date: Thursday, May 27, 2010, 10:24 PM
> Hi Parav,
> 
> >The IPv6 LL addresses are shared using out of band
> protocol which works more at upper layer agnostic of L2
> properties and gives consolidated list of LL IP addresses
> for all the VLANs.
> 
> This is the part of your system that is broken.  Your
> out-of-band protocol should not be taking the link-local
> addresses out of scope (i.e. losing track of what link they
> are valid on).  Instead, it should either (a) should
> maintain the corresponding link information somehow, or (b)
> use addresses that are valid in that scope (i.e. global
> addresses).
> 
> Typically, any reasonable protocol that uses link-local
> addresses will learn any peer's addresses by receiving
> packets from that peer on that particular link.  The
> protocol will then keep both the link-local address *and*
> the scope-id for that address for later use in contacting
> that peer.
> 
> You should never need to resort to trying all links to
> "find" the right one that has a machine with an interface
> using that link-local address.  Such an approach is
> very error-prone.  Since link-local addresses are only
> guaranteed to be unique per link, you could have different
> machines on different VLANs using the same link-local
> address, and the one you find first may not be the intended
> machine.
> 
[Parav] 
This is the exact reason, I asked to double check on thought of doing ping6 on multiple interfaces. I was not convinced to perform ping6 on all the valid interfaces in unavailability of scope id. Let me revisit our out of band protocol and how can I modify it to ensure it goes out on the correct vlan.
I really appreciate your inputs. Thanks.

Parav

> From: [email-masked]
> [mailto:[email-masked]]
> On Behalf Of Parav Pandit
> Subject: Re: which interface to choose to send to
> destination link-local address - any RFC?
> 
> Hi Suresh,
> 
> Thanks for the script.
> 
> The IPv6 LL addresses are shared using out of band protocol
> which works more at upper layer agnostic of L2 properties
> and gives consolidated list of LL IP addresses for all the
> VLANs.
> 
> Parav
> 
> 
> > Subject: Re: which interface to choose to send to
> destination link-local address - any RFC?
> > > packet to a link-local address, you will need
> the
> > scope_id first.
> >