Skip to Content.
Sympa Menu

perfsonar-dev - Multiple homeLS per IP address [Was :Re: [Fwd: Re: psUI demo] XQuery for subnet testing]

Subject: perfsonar development work

List archive

Multiple homeLS per IP address [Was :Re: [Fwd: Re: psUI demo] XQuery for subnet testing]


Chronological Thread 
  • From: Nina Jeliazkova <>
  • To: "" <>
  • Subject: Multiple homeLS per IP address [Was :Re: [Fwd: Re: psUI demo] XQuery for subnet testing]
  • Date: Thu, 14 Aug 2008 11:41:47 +0300
  • Openpgp: id=EEABA669

Hello all,

We had recently a discussion with Szymon and Maciej on the best way to resolve the case, where a query against gLS returns more than one possible homeLS.

The case was first reported for a traceroute Szymon used for a demo

1    49 ms    48 ms    48 ms  pionier-gw.rt1.poz.pl.geant2.net [62.40.124.182]

PerfsonarUI uses an XQuery (attached) to ask for subnets, matching given IP address and subnet mask (e.g.  62.40.124.182/32 in this case). The
The IP address (62.40.124.182) matches two home LS - the GN2 one with subnet /23 and Pionier one with /32 . The excerpt of the response is below:

http://loco4.man.poznan.pl:8180/xml-ls-gn2/services/LookupService
                <nmtl3:subnet>
                    <nmtl3:address type="ipv4">62.40.124.0</nmtl3:address>
                    <nmtl3:netmask>23</nmtl3:netmask>
                </nmtl3:subnet>
               
http://ls.perfsonar.pionier.net.pl:8080/xml-ls/services/LookupService
                <nmtl3:subnet>
                    <nmtl3:address type="ipv4">62.40.124.182</nmtl3:address>
                    <nmtl3:netmask>32</nmtl3:netmask>
                </nmtl3:subnet>


I've updated perfsonarUI to always select most specific subnet, if there are more than one, e.g. if there is /32 and /23 then /32 will allways be selected.  For the use case PerfsonarUI is dealing with, namely looking for matches for a list of  IP addresses coming from a traceroute (subnet mask /32 only) , it seems quite reasonable.

However, Maciej had a different view ( don't restrict the answer to one subnet, present everything to the user, see emails below ), so we thought it will be best to move the discussion into the developers mailing list.

In summary,  my question is as follows (having in mind only the use case when the user is asking for list of IPs coming from a traceroute and a given eventtype, i.e. subnet mask 32 )
  • Is there a chance, that information for a given IP and given eventtype (e.g. utilization) is provided by more than one (MA) service ?  
  • If yes, how do we visualize that and assure the information is consistent?
  • If not, what is the reason of looking into multiple options?
Discussion on other use cases are of course welcome :)

Best regards,
Nina

Maciej Glowiak написа:
Nina Jeliazkova wrote:
Szymon,

I've updated the SVN and the beta version available as Web start to handle this issue. The logic is to always select most specific subnet, if there are more than one, e.g. if there is /32 and /23 then /32 will allways be selected. It doesn't seem likely that there will be duplicates with netmask /32, for duplicates of other subnets it depends how the summarization is done. Perhaps Maciej can better explain if duplicate subnets are to be expected.

Nina,

Yes, duplicate subnets may occur. I think if there are several matched subnets all of them should be shown to the user. For instance we ask for 150.254.160.194

There are two LS-es having:

1. http://ls1.perfsonar.net:8080/xmlls
      150.254.160.194/32

2. http://ls2.perfsonar.net:8080/xmlls
      150.254.160.0/24

In fact responding user with only #1 is not so good, because LS1 has only that one address from the network (or doesn't do summarization) while the other one (LS2) may have full range of addresses from that network.

I'd respond with both addresses. Then two separate queries should be done - one to LS1 and the second one to LS2.

As far as I remember that way it was described in dLS algorithm. First we ask dLS (gLS here acts as dLS) for Lookup Services that MAY have the IP. Then we need to ask all LSes from result set. Of course it depends on strategy.

Maciej

Maciej,

Maciej Glowiak написа:
Nina,

My reasoning was based only for the case, where we are looking for a specific IP address - as in traceroute.  So, if we are looking for 150.254.160.194/32 , the first LS is an exact match and there is no need to respond with the second one.  If we are looking for e.g. 150.254.160.1 , then the first one is not a match at all , and the second (/24) is the only match; no need to respond with the first one.

The logic I've proposed is exactly the one followed by IP forwarding, when the router needs to select the interface where to forward the packets for given destination IP.
> Of course, in other scenarios, where we are interested not in a single
> IP, the logic might be different. Do you have examples of such use cases?


Yes, but the router must select the path as quick as possible and select the shortest path. The narrower mask the better choice it is.

We have different approach. We want to give a user opportunity to see all "sources" that may have information he wants.

The /32 mask is of course special "use case". I don't have stong opinion wheteher we should just response with one LS having /32 mask or give all LSes that matche subnet masks. I'd prefer the second choice.


Well, I will reformulate the question then, having in mind only the use case when the user is asking for list of IPs coming from a traceroute.

Is there a chance, that (utilization) information for a given IP is provided by more than one (MA) service ? 
If yes, how do we visualize that and assure the information is consistent?
If not, what is the reason of looking into multiple options?


Regards,
Nina

P.S. I've talked briefly with Michael Bischoff and he told me gLS API doesn't handle yet the case where more than one hLS are available for a given IP.

Maciej



-- 
---------------------------------
Dr. Nina Nikolova-Jeliazkova
Institute for Parallel Processing
Bulgarian Academy of Sciences
Acad. G. Bonchev St 25-A
1113 Sofia, Bulgaria
Tel: +359 886 802011
ICQ: 10705013
www: http://ambit.acad.bg/nina
---------------------------------
PGP Public Key
http://cert.acad.bg/pgp-keys/keys/nina-nikolova-0xEEABA669.asc
	8E99 8BAD D804 1A43 27B7  7F87 CF04 C7D1 EEAB A669
---------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?><nmwg:message type="LSQueryRequest" id="msg1" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"; xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/"; xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/"; xmlns:psui="http://ggf.org/ns/nmwg/tools/org/perfsonar-ui/1.0/"; >
<nmwg:metadata id="meta1">
<xquery:subject id="sub1">
declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";; 
declare namespace nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";; 
declare namespace perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";; 
declare namespace psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";; 
declare namespace xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";; 
declare namespace  psui="http://ggf.org/ns/nmwg/tools/org/perfsonar-ui/1.0/";;
declare namespace summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";;
declare namespace nmtl3="http://ogf.org/schema/network/topology/l3/20070828/";;
declare function psui:testPartSubnet($ip as xs:integer, $msb as xs:integer, $lsb as xs:integer, $sumip as xs:integer, $netmask as xs:integer)
as xs:boolean  {

	if ($ip &lt; 0) then false()
	else if ($msb &gt; $netmask ) then true()
	else if ($lsb &gt; $netmask ) then true()
	else if ($lsb = $msb) then ($ip mod 2) = ($sumip mod 2)
	else
		let $ip2 := $ip idiv 2
		let $sumip2 := $sumip idiv 2
		
		let $mod := $ip - $ip2
		let $smod := $sumip - $sumip2
		
		let $lsb := $lsb -1
		
		return ($mod = $smod) and psui:testPartSubnet($ip2,$msb,$lsb,$sumip2,$netmask)
		
};

declare function psui:isSubnet($ip as xs:string, $sumip as xs:string, $netmask as xs:integer) as xs:boolean {
	let $ips := fn:tokenize($ip,'\.')
	let $sumips := fn:tokenize($sumip,'\.')
	return
		psui:testPartSubnet(xs:integer(fn:number($ips[1])),1,8,xs:integer(fn:number($sumips[1])),$netmask) and
		psui:testPartSubnet(xs:integer(fn:number($ips[2])),9,16,xs:integer(fn:number($sumips[2])),$netmask) and
		psui:testPartSubnet(xs:integer(fn:number($ips[3])),17,24,xs:integer(fn:number($sumips[3])),$netmask) and
		psui:testPartSubnet(xs:integer(fn:number($ips[4])),25,32,xs:integer(fn:number($sumips[4])),$netmask)
		
};
&lt;psui:lookupInformation&gt;
{
for $m in /nmwg:store[@type='LSStore']/nmwg:metadata
let $service:=$m/perfsonar:subject/psservice:service
let $metaid:=data($m/@id)
let $summary:=/nmwg:store[@type='LSStore']/nmwg:data[@metadataIdRef=$m/@id]/nmwg:metadata/summary:subject
let $address:=$summary/nmtl3:network/nmtl3:subnet
return
 &lt;psui:lookupService&gt;
	 {$service} 
   {
	for $e in $summary/nmtl3:network
	where 
(
psui:isSubnet('62.40.124.182',$e/nmtl3:subnet/nmtl3:address,$e/nmtl3:subnet/nmtl3:netmask)
)
	return 
	$e
   }	
&lt;/psui:lookupService&gt;
}
&lt;/psui:lookupInformation&gt;

</xquery:subject>
<nmwg:eventType>service.lookup.xquery</nmwg:eventType>
</nmwg:metadata>
<nmwg:data metadataIdRef="meta1" id="d1"/>
</nmwg:message>



Archive powered by MHonArc 2.6.16.

Top of Page