[Search] [pdf|bibtex] [Tracker] [Email] [Nits]

Versions: 00                                                            
Internet Engineering Task Force                               H. GUO Ed.
Internet-Draft                                                     CAICT
Intended status: Informational                              June 3, 2015
Expires: December 25, 2015






Interoperability Testing of the Application-Layer Traffic Optimization
                            (ALTO) Protocol
                  draft-guo-alto-interop-cases-00

Abstract

   The Application-Layer Traffic Optimization (ALTO) protocol is
   designed to allow entities with knowledge about the network
   infrastructure to export such information to applications that need
   to choose one or more endpoints to connect to among large sets of
   logically equivalent ones.  This document provides a collection of
   messages that may be used to test the functionality and
   interoperability of an ALTO client and an ALTO server.

Status of this Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on April 25, 2013.

Copyright Notice

   Copyright (c) 2012 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents



GUO.                    Expires December 5, 2015                [Page 1]


Internet-Draft                ALTO Interop                     June 2015


   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.



Table of Contents

   1.  Overview . . . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Maps: Network Map and Cost Map . . . . . . . . . . . . . . . .  3
   3.  Mandatory Cases  . . . . . . . . . . . . . . . . . . . . . . .  5
     3.1.  Information Resource Directory . . . . . . . . . . . . . .  5
       3.1.1  Case: Test-IRD-1  . . . . . . . . . . . . . . . . . . .  5
     3.2.  Maps Service . . . . . . . . . . . . . . . . . . . . . . .  6
       3.2.1  Case: Test-MAPS-1 . . . . . . . . . . . . . . . . . . .  6
       3.2.2  Case: Test-MAPS-2 . . . . . . . . . . . . . . . . . . .  7
       3.2.3  Case: Test-MAPS-3 . . . . . . . . . . . . . . . . . . .  8
     3.3.  Endpoint Property Service  . . . . . . . . . . . . . . . .  9
       3.3.1  Case: Test-EPS-1  . . . . . . . . . . . . . . . . . . . 10
       3.3.2  Case: Test-EPS-2  . . . . . . . . . . . . . . . . . . . 10
       3.3.3  Case: Test-EPS-3  . . . . . . . . . . . . . . . . . . . 11
       3.3.4  Case: Test-EPS-4  . . . . . . . . . . . . . . . . . . . 12
     3.4.  Protocol Errors  . . . . . . . . . . . . . . . . . . . . . 12
       3.4.1  Case: Test-ERR-1  . . . . . . . . . . . . . . . . . . . 13
       3.4.2  Case: Test-ERR-2  . . . . . . . . . . . . . . . . . . . 13
       3.4.3  Case: Test-ERR-3  . . . . . . . . . . . . . . . . . . . 14
       3.4.4  Case: Test-ERR-4  . . . . . . . . . . . . . . . . . . . 15
   4.  Optional Cases . . . . . . . . . . . . . . . . . . . . . . . . 16
     4.1.  Map-Filtering Service  . . . . . . . . . . . . . . . . . . 16
       4.1.1  Case: Test-FILTER-1 . . . . . . . . . . . . . . . . . . 16
       4.1.2  Case: Test-FILTER-2 . . . . . . . . . . . . . . . . . . 17
       4.1.3  Case: Test-FILTER-3 . . . . . . . . . . . . . . . . . . 18
     4.2.  Endpoint cost service  . . . . . . . . . . . . . . . . . . 19
       4.2.1  Case: Test-ECS-1  . . . . . . . . . . . . . . . . . . . 19
       4.2.2  Case: Test-ECS-2  . . . . . . . . . . . . . . . . . . . 20
       4.2.1  Case: Test-ECS-3  . . . . . . . . . . . . . . . . . . . 22
   5.  Security Considerations  . . . . . . . . . . . . . . . . . . . 23
   6.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 23
   7.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 23
     7.1.  Normative References . . . . . . . . . . . . . . . . . . . 23
     7.2.  Informative References . . . . . . . . . . . . . . . . . . 23
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 24





GUO.                    Expires December 5, 2015                [Page 2]


Internet-Draft                ALTO Interop                     June 2015


1.  Overview

   The Application-Layer Traffic Optimization (ALTO) protocol is
   designed to allow entities with knowledge about the network
   infrastructure to export such information to applications that need
   to choose one or more endpoints to connect to among large sets of
   logically equivalent ones.

   This document contains a set of messages that may be used to test the
   functionality and interoperability of an ALTO client and an ALTO
   server.

   This document is informational and is NOT NORMATIVE on any aspects of
   the ALTO protocol.  The normative behavior of ALTO entities is
   prescribed in [RFC7285].

   The key ALTO services include Information Resource Directory
   retrieval, Map Service, Map-Filtering Service, Endpoint Property
   Service, and Endpoint Cost Service. Some services MUST be provided by
   an ALTO server, and other services MAY be provided by an ALTO server.
   In [RFC7285], some services are defined as "MUST", others are defined
   as "MAY", this document categorizes the test cases into mandatory
   cases (MUST cases) and optional (MAY cases). The aim of the document
   is to focus on areas that highlight the key offerings of the ALTO
   protocol, rather than giving all possible cases.

   Note that it is not expected that an ALTO client and server
   implementation generate requests and responses in the same format as
   shown in this document. The syntax related to representing each
   request or response is left to each individual implementation as long
   as the payload is syntactically valid and semantically equivalent to
   any other representation of the same payload.

   In the test cases of this document, an ALTO server is assumed to be
   available at the URL http://alto.example.com.  Requests are directed
   towards it. This document assumes that the ALTO server URL has been
   discovered by the ALTO discovery protocol, however, it does not
   provide further details on the discovery protocol itself.  Wherever
   possible, relevant HTTP headers are shown in the test cases, however,
   for the sake of brevity not all headers are depicted.

2.  Maps: Network Map and Cost Map

   To uniformly interpret the contents of the ALTO messages, a default
   topology is presented below.  This topology is divided into a network
   map and a cost map.  The network map contains a series of PIDs, a
   provider-defined network location identifier as specified in
   [RFC7285]. In the test cases of this document, this network map is



GUO.                    Expires December 5, 2015                [Page 3]


Internet-Draft                ALTO Interop                     June 2015


   represented as "my-default-network-map".

          PID            IP Address Block
          -------------------------------
          mypid1         10.0.0.0/8, 15.0.0.0/8
          mypid2         192.168.0.0/16
          mypid3         192.168.10.0/24
          peeringpid1    128.0.0.0/16
          peeringpid2    130.0.0.0/16, 2001:DB8::/32
          transitpid1    132.0.0.0/16
          transitpid2    135.0.0.0/16
          defaultpid     0.0.0.0/0, ::/0

                    Figure 1: A Default Network Map

   A cost map corresponding to the above network map is shown below. The
   cost map defines path costs amongst sets of source and destination
   network locations. path cost is the end-to-end cost from the source
   to the destination. Path costs have Cost Metric and Cost Mode as
   their attributes. In this cost map, cost metrics are routingcost,
   cost modes are numerical and ordinal.

          Source      Destination        Cost Mode
          PID         PID           Numerical  Ordinal
          ---------------------------------------------
          mypid1      mypid1            0        1
            "         mypid2            0        1
            "         mypid3            0        1
            "         peeringpid1       0        1
            "         peeringpid2       0        1
            "         transitpid1       5        3
            "         transitpid2      10        7
            "         defaultpid        4        2
          mypid2      mypid1            0        1
            "         mypid2            0        1
            "         mypid3            0        1
            "         peeringpid1       0        1
            "         peeringpid2       0        1
            "         transitpid1       7        5
            "         transitpid2       8        6
            "         defaultpid        4        2
          mypid3      mypid1            0        1
            "         mypid2            0        1
            "         mypid3            0        1
            "         peeringpid1       0        1
            "         peeringpid2       0        1
            "         transitpid1       8        6
            "         transitpid2       8        6



GUO.                    Expires December 5, 2015                [Page 4]


Internet-Draft                ALTO Interop                     June 2015


            "         defaultpid        5.1      4

                  Figure 2: Corresponding Cost Map

   Note that the above represents a sparse cost map, i.e., the ALTO
   server is not defining a path cost from each source PID to each
   destination PID.  It is only defining the costs that it is interested
   in serving.


3.  Mandatory Cases

   Mandatory cases are corresponding to the services that MUST be
   provided in [RFC7285].

3.1.  Information Resource Directory

3.1.1  Case: Test-IRD-1

   The Information Resource Directory (IRD) enumerates URIs at which an
   ALTO server offers Information Resources to an ALTO client.

   GET /directory HTTP/1.1
   Host: alto.example.com
   Accept: application/alto-directory+json,application/alto-error+json

     HTTP/1.1 200 OK
     Content-Length: ****
     Content-Type: application/alto-directory+json

     {
       "meta" : {
          "cost-types": {
             "num-routing": {
                "cost-mode"  : "numerical",
                "cost-metric": "routingcost"
             },
             "ord-routing": {
                "cost-mode"  : "ordinal",
                "cost-metric": "routingcost"
             }
          },
          "default-alto-network-map" : "my-default-network-map"
       },
       "resources" : {
          "my-default-network-map" : {
             "uri" : "http://alto.example.com/networkmap",
             "media-type" : "application/alto-networkmap+json"



GUO.                    Expires December 5, 2015                [Page 5]


Internet-Draft                ALTO Interop                     June 2015


          },
          "numerical-routing-cost-map" : {
             "uri" : "http://alto.example.com/costmap/num/routingcost",
             "media-type" : "application/alto-costmap+json",
             "capabilities" : {
                "cost-type-names" : [ "num-routing" ]
             },
             "uses": [ "my-default-network-map" ]
          },
          "ordinal-routing-cost-map" : {
             "uri" : "http://alto.example.com/costmap/ord/routingcost",
             "media-type" : "application/alto-costmap+json",
             "capabilities" : {

                "cost-type-names" : [ "ord-routing" ]
             },
             "uses": [ "my-default-network-map" ]
          },
         "endpoint-property" : {
             "uri" : "http://alto.example.com/endpointprop/lookup",
             "media-type" : "application/alto-endpointprop+json",
             "accepts" : "application/alto-endpointpropparams+json",
             "capabilities" : {
               "prop-types" : [ "my-default-network-map.pid"]
             },
          },
          "endpoint-cost" : {
             "uri" : "http://alto.example.com/endpointcost/lookup",
             "media-type" : "application/alto-endpointcost+json",
             "accepts" : "application/alto-endpointcostparams+json",
             "capabilities" : {
                "cost-constraints" : true,
                "cost-type-names" : [ "num-routing", "ord-routing"]
             }
          }
       }
     }



3.2.  Maps Service

3.2.1  Case: Test-MAPS-1

   An ALTO client retrieves a complete network map from an ALTO server.

   GET /networkmap HTTP/1.1
   Host: alto.example.com



GUO.                    Expires December 5, 2015                [Page 6]


Internet-Draft                ALTO Interop                     June 2015


   Accept: application/alto-networkmap+json,application/alto-error+json

     HTTP/1.1 200 OK
     Content-Length: ***
     Content-Type: application/alto-networkmap+json

     {
      "meta" : {
       "vtag": {
           "resource-id": "my-default-network-map",
            "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
         }
      },
        "network-map" : {
           "mypid1" : {
              "ipv4" : [ "10.0.0.0/8", "15.0.0.0/8" ]
           },
           "mypid2" : {
              "ipv4" : [ "192.168.0.0/16" ]
           },
           "mypid3" : {
              "ipv4" : [ "192.168.10.0/24" ]
           },
           "peeringpid1" : {
              "ipv4" : [ "128.0.0.0/16" ]
           },
           "peeringpid2" : {
              "ipv4" : [ "130.0.0.0/16" ],
              "ipv6" : [ "2001:DB8::/32"]
           },
           "transitpid1" : {
              "ipv4" : [ "132.0.0.0/16" ]
           },
           "transitpid2" : {
              "ipv4" : [ "135.0.0.0/16" ]
           },
           "defaultpid" : {
              "ipv4" : [ "0.0.0.0/0" ],
              "ipv6" : [ "::/0" ]
           }
        }
      }
     }



3.2.2  Case: Test-MAPS-2




GUO.                    Expires December 5, 2015                [Page 7]


Internet-Draft                ALTO Interop                     June 2015


   An ALTO client retrieves a complete cost map for the numerical cost
   mode from an ALTO server. In the response, the version tag of the
   cost map ("dependent-vtag") corresponds to the network map of the
   same version shown in test case Test-MAPS-1. In this document, assume
   that all version tags correspond to the same network map.


   GET /costmap/num/routingcost HTTP/1.1
   Host: alto.example.com
   Accept: application/alto-costmap+json,application/alto-error+json


     HTTP/1.1 200 OK
     Content-Length: ***
     Content-Type: application/alto-costmap+json

     {
       "meta" : {
        "dependent-vtags" : [
           {"resource-id": "my-default-network-map",
            "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
           }
         ],
         "cost-type" : {"cost-mode"  : "numerical",
                        "cost-metric": "routingcost"
         }
       },
         "cost-map" : {
           "mypid1": { "mypid1" : 0,  "mypid2" : 0,  "mypid3" : 0,
                       "peeringpid1" : 0, "peerinpid2" :  0,
                       "transitpid1" : 5, "transitpid2" : 10,
                       "defaultpid" : 4},
           "mypid2": { "mypid1" : 0,  "mypid2" : 0,  "mypid3" : 0,
                       "peeringpid1" : 0, "peerinpid2" :  0,
                       "transitpid1" : 7, "transitpid2" : 8,
                       "defaultpid" : 4},
           "mypid3": { "mypid1" : 0,  "mypid2" : 0,  "mypid3" : 0,
                       "peeringpid1" : 0, "peerinpid2" :  0,
                       "transitpid1" : 8, "transitpid2" : 8,
                       "defaultpid" : 5.1}
         }
       }
     }


3.2.3  Case: Test-MAPS-3

   An ALTO client retrieves a complete cost map for the ordinal cost



GUO.                    Expires December 5, 2015                [Page 8]


Internet-Draft                ALTO Interop                     June 2015


   mode. In the response, the version tag of the cost map ("dependent-
   vtag") corresponds to the network map of the same version shown in
   test case Test-MAPS-1

   GET /costmap/ordinal/routingcost HTTP/1.1
   Host: alto.example.com
   Accept: application/alto-costmap+json,application/alto-error+json

     HTTP/1.1 200 OK
     Content-Length: ***
     Content-Type: application/alto-costmap+json

     {
       "meta" : {
        "dependent-vtags" : [
           {"resource-id": "my-default-network-map",
            "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
           }
         ],
         "cost-type" : {"cost-mode"  : "ordinal",
                        "cost-metric": "routingcost"
         }
       },
         "cost-map" : {
           "mypid1": { "mypid1" : 1,  "mypid2" : 1,  "mypid3" : 1,
                       "peeringpid1" : 1, "peeringpid2" :  1,
                       "transitpid1" : 3, "transitpid2" : 7,
                       "defaultpid" : 2},
           "mypid2": { "mypid1" : 1,  "mypid2" : 1,  "mypid3" : 1,
                       "peeringpid1" : 1, "peeringpid2" :  1,
                       "transitpid1" : 5, "transitpid2" : 6,
                       "defaultpid" : 2},
           "mypid3": { "mypid1" : 1,  "mypid2" : 1,  "mypid3" : 1,
                       "peeringpid1" : 1, "peeringpid2" :  1,
                       "transitpid1" : 6, "transitpid2" : 6,
                       "defaultpid" : 4}
         }
       }
     }







3.3.  Endpoint Property Service




GUO.                    Expires December 5, 2015                [Page 9]


Internet-Draft                ALTO Interop                     June 2015


   Endpoint Property Service provides information about endpoint
   properties to ALTO clients. An ALTO server MUST define "pid" endpoint
   property type. Note that the longest prefix match is used to retrieve
   the corresponding PID property.

3.3.1  Case: Test-EPS-1

   An ALTO client retrieves a PID for IPv4 address 192.168.1.23 from an
   ALTO Server.

  POST /endpointprop/lookup HTTP/1.1
  Host: alto.example.com
  Content-Length: ***
  Content-Type: application/alto-endpointpropparams+json
  Accept: application/alto-endpointprop+json,application/alto-error+json

  {
     "properties" : [ "my-default-network-map.pid" ],
     "endpoints" : [ "ipv4:192.168.1.23" ]
  }

     HTTP/1.1 200 OK
     Content-Length: ***

     {
       "meta" : {
         "dependent-vtags" : [
           {"resource-id": "my-default-network-map",
            "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
           }
         ]
       },
       "endpoint-properties": {
         "ipv4:192.168.1.23" : {"my-default-network-map.pid": "mypid2"}
       }
     }

3.3.2  Case: Test-EPS-2

   An ALTO client retrieves a PID for IPv4 address 192.168.10.23 from an
   ALTO server.

  POST /endpointprop/lookup HTTP/1.1
  Host: alto.example.com
  Content-Length: ***
  Content-Type: application/alto-endpointpropparams+json
  Accept: application/alto-endpointprop+json,application/alto-error+json




GUO.                    Expires December 5, 2015               [Page 10]


Internet-Draft                ALTO Interop                     June 2015


  {
     "properties" : [ "my-default-network-map.pid" ],
     "endpoints" : [ "ipv4:192.168.10.23" ]
  }

    HTTP/1.1 200 OK
    Content-Length: ***

    {
     "meta" : {
       "dependent-vtags" : [
         {"resource-id": "my-default-network-map",
          "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
         }
       ]
     },
     "endpoint-properties": {
       "ipv4:192.168.10.23" : { "my-default-network-map.pid": "mypid3" }
     }
    }

3.3.3  Case: Test-EPS-3

   An ALTO client retrieves a PID for IPv4 address 201.1.13.12 from an
   ALTO server.

  POST /endpointprop/lookup HTTP/1.1
  Host: alto.example.com
  Content-Length: ***
  Content-Type: application/alto-endpointpropparams+json
  Accept: application/alto-endpointprop+json,application/alto-error+json

  {
     "properties" : [ "my-default-network-map.pid" ],
     "endpoints" : [ "ipv4:201.1.13.12" ]
  }


    HTTP/1.1 200 OK
    Content-Length: ***
    Content-Type: application/alto-endpointprop+json

    {
     "meta" : {
       "dependent-vtags" : [
          {"resource-id": "my-default-network-map",
           "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
          }



GUO.                    Expires December 5, 2015               [Page 11]


Internet-Draft                ALTO Interop                     June 2015


        ]
     },
     "endpoint-properties": {
       "ipv4:192.168.10.23" : { "my-default-network-map.pid": "mypid3" }
     }
    }

3.3.4  Case: Test-EPS-4

   An ALTO client retrieves a PID for an IPv4 and IPv6 address from an
   ALTO server.

  POST /endpointprop/lookup HTTP/1.1
  Host: alto.example.com
  Content-Length: ***
  Content-Type: application/alto-endpointpropparams+json
  Accept: application/alto-endpointprop+json,application/alto-error+json


  {
    "properties" : [ "my-default-network-map.pid" ],
    "endpoints" : [ "ipv6:1234::192.168.1.23",
                    "ipv4:132.0.10.12" ]
  }

  HTTP/1.1 200 OK
  Content-Type: application/alto-endpointprop+json
  Content-Length: ***

  {
   "meta" : {
     "dependent-vtags" : [
       {"resource-id": "my-default-network-map",
        "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
       }
     ]
   },
   "endpoint-properties": {
     "ipv6:1234::192.168.1.23" : {
        "my-default-network-map.pid" : "defaultpid" },
     "ipv4:132.0.10.12" : {"my-default-network-map.pid" : "transitpid1"}
   }
  }



3.4.  Protocol Errors




GUO.                    Expires December 5, 2015               [Page 12]


Internet-Draft                ALTO Interop                     June 2015


3.4.1  Case: Test-ERR-1

   An ALTO client sends a parsing error body in the request --- a
   missing closing brace ('}').


  POST /endpointprop/lookup HTTP/1.1
  Host: alto.example.com
  Content-Length: ***
  Content-Type: application/alto-endpointpropparams+json
  Accept: application/alto-endpointprop+json,application/alto-error+json

  {
     "properties" : [ "my-default-network-map.pid" ],
     "endpoints" : [ "ipv4:192.168.10.23" ]



   The server returns an HTTP response code of 400 with ALTO error code
   of E_SYNTAX (c.f., Table 1 [RFC7285]).

       HTTP/1.1 400 Bad Request
       Content-Type: application/alto-error+json
       Content-Length: ***

       {
          "code": "E_SYNTAX"
       }


3.4.2  Case: Test-ERR-2
   An ALTO client sends a malformed request --- the "properties" member
   for the Endpoint Property service is missing.


















GUO.                    Expires December 5, 2015               [Page 13]


Internet-Draft                ALTO Interop                     June 2015


  POST /endpointprop/lookup HTTP/1.1
  Host: alto.example.com
  Content-Length: ***
  Content-Type: application/alto-endpointpropparams+json
  Accept: application/alto-endpointprop+json,application/alto-error+json

  {
     "properties" : [ ],
     "endpoints" : [ "ipv4:192.168.10.23" ]
  }


   The server returns an HTTP response code of 400 with ALTO error code
   of E_JSON_FIELD_MISSING (c.f., Table 1 [RFC7285]).

       HTTP/1.1 400 Bad Request
       Content-Type: application/alto-error+json
       Content-Length: ***

       {
          "code": "E_JSON_FIELD_MISSING"
       }


3.4.3  Case: Test-ERR-3
   An ALTO client sends a request with an unexpected type for a JSON
   value.


  POST /endpointprop/lookup HTTP/1.1
  Host: alto.example.com
  Content-Length: ***
  Content-Type: application/alto-endpointpropparams+json
  Accept: application/alto-endpointprop+json,application/alto-error+json

  {
     "properties" : [ "my-default-network-map.pid" ],
     "endpoints" : "ipv4:192.168.10.23"
  }

   The server returns an HTTP response code of 400 with ALTO error code
   of E_INVALID_FIELD_TYPE(c.f., Table 1 [RFC7285]).

       HTTP/1.1 400 Bad Request
       Content-Type: application/alto-error+json
       Content-Length: ***

       {



GUO.                    Expires December 5, 2015               [Page 14]


Internet-Draft                ALTO Interop                     June 2015


            "code": "E_INVALID_FIELD_TYPE"
       }

3.4.4  Case: Test-ERR-4

    An ALTO client sends a request with a wrong value for a correct
    field.












































GUO.                    Expires December 5, 2015               [Page 15]


Internet-Draft                ALTO Interop                     June 2015


  POST /endpointprop/lookup HTTP/1.1
  Host: alto.example.com
  Content-Length: ***
  Content-Type: application/alto-endpointpropparams+json
  Accept: application/alto-endpointprop+json,application/alto-error+json

  {
     "properties" : [ "my-default-network-map.pid" ],
     "endpoints" : [ "192.168.10.23" ]
  }


   The server returns an HTTP response code of 400 with ALTO error code
   of E_INVALID_FIELD_VALUE (c.f., Table 1 [RFC7285]).

       HTTP/1.1 400 Bad Request
       Content-Length: ***
       Content-Type: application/alto-error+json

       {
         "code": "E_INVALID_FIELD_VALUE"
       }

4.  Optional Cases

   Optional cases are corresponding to the services that MAY be provided
   in [RFC7285].

4.1.  Map-Filtering Service

4.1.1  Case: Test-FILTER-1

   An ALTO client sends a request to get a filtered network map of PID
   mypid2 from an ALTO server.


  POST /networkmap/filtered HTTP/1.1
  Host: alto.example.com
  Content-Length: ***
  Content-Type: application/alto-networkmapfilter+json
  Accept: application/alto-networkmap+json,application/alto-error+json

  {
    "pids": [ "mypid2" ]
  }


     HTTP/1.1 200 OK



GUO.                    Expires December 5, 2015               [Page 16]


Internet-Draft                ALTO Interop                     June 2015


     Content-Length: 255
     Content-Type: application/alto-networkmap+json

     {
       "meta" : {
         "vtag" : {
            "resource-id": "my-default-network-map",
            "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
         },
           "network-map" : {
              "mypid2" : {
                 "ipv4" : [ "192.168.0.0/16" ]
              }
           }
        }
     }

4.1.2  Case: Test-FILTER-2

   An ALTO client sends a request to get a filtered cost map from
   asource PID to a set of destination PIDs.

     POST /costmap/filtered HTTP/1.1
     Host: alto.example.com
     Content-Type: application/alto-costmapfilter+json
     Content-Length: ***
     Accept: application/alto-costmap+json,application/alto-error+json

     {
       "cost-type" : {"cost-mode" : "numerical",
                      "cost-metric" : "routingcost",
       },
       "pids" : {
         "srcs" : [ "mypid1", "mypid3" ],
         "dsts" : [ "mypid2", "peeringpid1", "transitpid2" ]
       }
     }

       HTTP/1.1 200 OK
       Content-Length: ***
       Content-Type: application/alto-costmap+json

       {
            "meta" : {
              "dependent-vtags" : [
                 {"resource-id": "my-default-network-map",
                  "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
                 }



GUO.                    Expires December 5, 2015               [Page 17]


Internet-Draft                ALTO Interop                     June 2015


                ],
              "cost-type": {"cost-mode" : "numerical",
                            "cost-metric" : "routingcost"
              }
            },
             "cost-map" : {
                "mypid1": { "mypid2": 0,  "peeringpid1": 0,
                            "transitpid2": 10 },
                "mypid3": { "mypid2": 0,  "peeringpid1": 0,
                            "transitpid2": 8 }
             }
       }

4.1.3  Case: Test-FILTER-3

   An ALTO client sends a request to get the cost map subject to certain
   constrains from an ALTO server.

     POST /costmap/filtered HTTP/1.1
     Host: alto.example.com
     Content-Type: application/alto-costmapfilter+json
     Content-Length: ***
     Accept: application/alto-costmap+json,application/alto-error+json

     {
       "cost-type" : {"cost-mode" : "numerical",
                      "cost-metric" : "routingcost",
       },
       "constrains" : ["gt 0", "le 10"],
       "pids" : {
         "srcs" : [ "mypid1", "mypid3" ],
         "dsts" : [ "mypid2", "peeringpid1", "transitpid2" ]
       }
     }

       HTTP/1.1 200 OK
       Content-Length: ***
       Content-Type: application/alto-costmap+json

       {
            "meta" : {
              "dependent-vtags" : [
                 {"resource-id": "my-default-network-map",
                  "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
                 }
                ],
              "cost-type": {"cost-mode" : "numerical",
                            "cost-metric" : "routingcost"



GUO.                    Expires December 5, 2015               [Page 18]


Internet-Draft                ALTO Interop                     June 2015


              }
            },
             "cost-map" : {
                "mypid1": { "transitpid2": 10 },
                "mypid3": { "transitpid2": 8 }
             }
       }

4.2.  Endpoint cost service

4.2.1  Case: Test-ECS-1

   An ALTO client requests cost information between individual endpoints
   from an ALTO server.


  POST /endpointcost/lookup HTTP/1.1
  Host: alto.example.com
  Content-Length: ***
  Content-Type: application/alto-endpointcostparams+json
  Accept: application/alto-endpointcost+json,application/alto-error+json

  {
   "cost-type": {"cost-mode" : "numerical",
                 "cost-metric" : "routingcost" },
   "endpoints" : {
     "srcs": [ "ipv4:10.0.0.0", "ipv4:192.168.11.0",
               "ipv4:192.168.10.0"],
     "dsts": [
       "ipv4:10.0.0.0",
       "ipv4:15.0.0.0",
       "ipv4:192.168.11.0",
       "ipv4:192.168.10.0",
       "ipv4:128.0.0.0",
       "ipv4:130.0.0.0",
       "ipv4:0.0.0.0",
       "ipv4:132.0.0.0",
       "ipv4:135.0.0.0"
     ]
   }
  }

     HTTP/1.1 200 OK
     Content-Length: ***
     Content-Type: application/alto-endpointcost+json

     {
        "meta": {



GUO.                    Expires December 5, 2015               [Page 19]


Internet-Draft                ALTO Interop                     June 2015


           "cost-type": {"cost-mode" : "numerical",
                         "cost-metric" : "routingcost"
        },
        "endpoint-cost-map": {
                      "ipv4:10.0.0.0": {
                       "ipv4:10.0.0.0": 0.000000,
                       "ipv4:15.0.0.0": 0.000000,
                       "ipv4:192.168.11.0": 0.000000,
                       "ipv4:192.168.10.0": 0.000000,
                       "ipv4:128.0.0.0": 0.000000,
                       "ipv4:130.0.0.0": 0.000000,
                       "ipv4:0.0.0.0": 4.000000,
                       "ipv4:132.0.0.0": 5.000000,
                        "ipv4:135.0.0.0": 10.000000
                   },
                   "ipv4:192.168.11.0": {
                        "ipv4:10.0.0.0": 0.000000,
                        "ipv4:15.0.0.0": 0.000000,
                        "ipv4:192.168.11.0": 0.000000,
                        "ipv4:192.168.10.0": 0.000000,
                        "ipv4:128.0.0.0": 0.000000,
                        "ipv4:130.0.0.0": 0.000000,
                        "ipv4:0.0.0.0": 4.000000,
                        "ipv4:132.0.0.0": 7.000000,
                        "ipv4:135.0.0.0": 8.000000
                   },
                   "ipv4:192.168.10.0": {
                         "ipv4:10.0.0.0": 0.000000,
                         "ipv4:15.0.0.0": 0.000000,
                         "ipv4:192.168.11.0": 0.000000,
                         "ipv4:192.168.10.0": 0.000000,
                         "ipv4:128.0.0.0":0.000000,
                         "ipv4:130.0.0.0": 0.000000,
                         "ipv4:0.0.0.0": 5.100000,
                         "ipv4:132.0.0.0": 8.000000,
                         "ipv4:135.0.0.0": 8.000000
                   }
        }
     }

4.2.2  Case: Test-ECS-2

   An ALTO client requests the ranking service for a source host to a
   set of destination hosts from an ALTO server.

  POST /endpointcost/lookup HTTP/1.1
  Host: alto.example.com
  Accept: application/alto-endpointcost+json,application/alto-error+json



GUO.                    Expires December 5, 2015               [Page 20]


Internet-Draft                ALTO Interop                     June 2015


  Content-Type: application/alto-endpointcostparams+json
  Content-Length: ***

  {
    "cost-type": {"cost-mode" : "ordinal",
                  "cost-metric" : "routingcost"},
    "endpoints" : {
      "srcs": [ "ipv6:2001:DB8::ABCD:6789", "ipv4:192.168.10.1" ],
      "dsts": [
        "ipv6:2001:DB8::2345:5678",
        "ipv4:135.0.29.1",
        "ipv4:192.168.10.23"
      ]
    }
  }

   The server response is shown below.  Note that the source IP adress
   of "ipv6:2001:DB8::ABCD:6789", which occurs in PID "peeringpid2", is
   omitted in the response.  This reflects the fact that the ALTO server
   does not know the source costs from the "peeringpid2" PID.































GUO.                    Expires December 5, 2015               [Page 21]


Internet-Draft                ALTO Interop                     June 2015


     HTTP/1.1 200 OK
     Content-Type: application/alto-endpointcost+json
     Content-Length: ***

     {
        "meta": {
           "cost-type": {"cost-mode" : "ordinal",
                         "cost-metric" : "routingcost"},
         "endpoint-cost-map": {
           "ipv4:192.168.10.1": {
             "ipv4:192.168.10.23": 1,
             "ipv6:2001:DB8::2345:5678": 1,
             "ipv4:135.0.29.1": 6
           }
         },
     }

4.2.1  Case: Test-ECS-3

   An ALTO client requests the cost service subject to certain
   constraints from an ALTO server.

  POST /endpoints/cost HTTP/1.1
  Host: alto.example.com
  Content-Length: ***
  Content-Type: application/alto-endpointcostparams+json
  Accept: application/alto-endpointcost+json,application/alto-error+json

  {
   "cost-type": {"cost-mode" : "numerical",
                 "cost-metric" : "routingcost"},
   "constraints": ["le 5", "ge 4"],
   "endpoints": {
     "dsts": [
       "ipv4:10.0.0.0",
       "ipv4:15.0.0.0",
       "ipv4:192.168.11.0",
       "ipv4:192.168.10.0",
       "ipv4:128.0.0.0",
       "ipv4:130.0.0.0",
       "ipv4:0.0.0.0",
       "ipv4:132.0.0.0",
       "ipv4:135.0.0.0"
     ],
     "srcs": [
       "ipv4:10.0.0.0",
       "ipv4:192.168.11.0",
       "ipv4:192.168.10.0"



GUO.                    Expires December 5, 2015               [Page 22]


Internet-Draft                ALTO Interop                     June 2015


     ]
   }
  }

       HTTP/1.1 200 OK
       Content-Length: ***
       Content-Type: application/alto-endpointcost+json
       {
           "meta": {
             "cost-type": {"cost-mode" : "numerical",
                           "cost-metric" : "routingcost"},
           "endpoint-cost-map": {
              "ipv4:10.0.0.0": {
                "ipv4:0.0.0.0": 4, "ipv4:132.0.0.0": 5
              },
              "ipv4:192.168.11.0": {"ipv4:0.0.0.0": 4}
            }
       }







5.  Security Considerations

   This document does not present any new security considerations above
   and beyond what is documented in the ALTO protocol [RFC7285].


6.  IANA Considerations

   This document does not require any action from IANA.


7.  References

7.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

7.2.  Informative References

   [RFC7285]  Almi, R., Penno, R., Yang, Y., Kiesel, S., Previdi, S.,
              Roome, W., Shalunov, S., and R. Woundy, "Application-Layer
              Traffic Optimization (ALTO) Protocol", RFC 7285, September



GUO.                    Expires December 5, 2015               [Page 23]


Internet-Draft                ALTO Interop                     June 2015


              2014.




Authors' Addresses

   Huaming Guo
   China Academy Information and Communication Technology

   Email: guohuaming@caict.ac.cn








































GUO.                    Expires December 5, 2015               [Page 24]