idnits 2.17.1 draft-guo-alto-interop-cases-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 5 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == There are 5 instances of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (June 3, 2015) is 3240 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Unused Reference: 'RFC2119' is defined on line 973, but no explicit reference was found in the text Summary: 0 errors (**), 0 flaws (~~), 5 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force H. GUO Ed. 3 Internet-Draft CAICT 4 Intended status: Informational June 3, 2015 5 Expires: December 25, 2015 7 Interoperability Testing of the Application-Layer Traffic Optimization 8 (ALTO) Protocol 9 draft-guo-alto-interop-cases-00 11 Abstract 13 The Application-Layer Traffic Optimization (ALTO) protocol is 14 designed to allow entities with knowledge about the network 15 infrastructure to export such information to applications that need 16 to choose one or more endpoints to connect to among large sets of 17 logically equivalent ones. This document provides a collection of 18 messages that may be used to test the functionality and 19 interoperability of an ALTO client and an ALTO server. 21 Status of this Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at http://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on April 25, 2013. 38 Copyright Notice 40 Copyright (c) 2012 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (http://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 56 2. Maps: Network Map and Cost Map . . . . . . . . . . . . . . . . 3 57 3. Mandatory Cases . . . . . . . . . . . . . . . . . . . . . . . 5 58 3.1. Information Resource Directory . . . . . . . . . . . . . . 5 59 3.1.1 Case: Test-IRD-1 . . . . . . . . . . . . . . . . . . . 5 60 3.2. Maps Service . . . . . . . . . . . . . . . . . . . . . . . 6 61 3.2.1 Case: Test-MAPS-1 . . . . . . . . . . . . . . . . . . . 6 62 3.2.2 Case: Test-MAPS-2 . . . . . . . . . . . . . . . . . . . 7 63 3.2.3 Case: Test-MAPS-3 . . . . . . . . . . . . . . . . . . . 8 64 3.3. Endpoint Property Service . . . . . . . . . . . . . . . . 9 65 3.3.1 Case: Test-EPS-1 . . . . . . . . . . . . . . . . . . . 10 66 3.3.2 Case: Test-EPS-2 . . . . . . . . . . . . . . . . . . . 10 67 3.3.3 Case: Test-EPS-3 . . . . . . . . . . . . . . . . . . . 11 68 3.3.4 Case: Test-EPS-4 . . . . . . . . . . . . . . . . . . . 12 69 3.4. Protocol Errors . . . . . . . . . . . . . . . . . . . . . 12 70 3.4.1 Case: Test-ERR-1 . . . . . . . . . . . . . . . . . . . 13 71 3.4.2 Case: Test-ERR-2 . . . . . . . . . . . . . . . . . . . 13 72 3.4.3 Case: Test-ERR-3 . . . . . . . . . . . . . . . . . . . 14 73 3.4.4 Case: Test-ERR-4 . . . . . . . . . . . . . . . . . . . 15 74 4. Optional Cases . . . . . . . . . . . . . . . . . . . . . . . . 16 75 4.1. Map-Filtering Service . . . . . . . . . . . . . . . . . . 16 76 4.1.1 Case: Test-FILTER-1 . . . . . . . . . . . . . . . . . . 16 77 4.1.2 Case: Test-FILTER-2 . . . . . . . . . . . . . . . . . . 17 78 4.1.3 Case: Test-FILTER-3 . . . . . . . . . . . . . . . . . . 18 79 4.2. Endpoint cost service . . . . . . . . . . . . . . . . . . 19 80 4.2.1 Case: Test-ECS-1 . . . . . . . . . . . . . . . . . . . 19 81 4.2.2 Case: Test-ECS-2 . . . . . . . . . . . . . . . . . . . 20 82 4.2.1 Case: Test-ECS-3 . . . . . . . . . . . . . . . . . . . 22 83 5. Security Considerations . . . . . . . . . . . . . . . . . . . 23 84 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 85 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 23 86 7.1. Normative References . . . . . . . . . . . . . . . . . . . 23 87 7.2. Informative References . . . . . . . . . . . . . . . . . . 23 88 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 24 90 1. Overview 92 The Application-Layer Traffic Optimization (ALTO) protocol is 93 designed to allow entities with knowledge about the network 94 infrastructure to export such information to applications that need 95 to choose one or more endpoints to connect to among large sets of 96 logically equivalent ones. 98 This document contains a set of messages that may be used to test the 99 functionality and interoperability of an ALTO client and an ALTO 100 server. 102 This document is informational and is NOT NORMATIVE on any aspects of 103 the ALTO protocol. The normative behavior of ALTO entities is 104 prescribed in [RFC7285]. 106 The key ALTO services include Information Resource Directory 107 retrieval, Map Service, Map-Filtering Service, Endpoint Property 108 Service, and Endpoint Cost Service. Some services MUST be provided by 109 an ALTO server, and other services MAY be provided by an ALTO server. 110 In [RFC7285], some services are defined as "MUST", others are defined 111 as "MAY", this document categorizes the test cases into mandatory 112 cases (MUST cases) and optional (MAY cases). The aim of the document 113 is to focus on areas that highlight the key offerings of the ALTO 114 protocol, rather than giving all possible cases. 116 Note that it is not expected that an ALTO client and server 117 implementation generate requests and responses in the same format as 118 shown in this document. The syntax related to representing each 119 request or response is left to each individual implementation as long 120 as the payload is syntactically valid and semantically equivalent to 121 any other representation of the same payload. 123 In the test cases of this document, an ALTO server is assumed to be 124 available at the URL http://alto.example.com. Requests are directed 125 towards it. This document assumes that the ALTO server URL has been 126 discovered by the ALTO discovery protocol, however, it does not 127 provide further details on the discovery protocol itself. Wherever 128 possible, relevant HTTP headers are shown in the test cases, however, 129 for the sake of brevity not all headers are depicted. 131 2. Maps: Network Map and Cost Map 133 To uniformly interpret the contents of the ALTO messages, a default 134 topology is presented below. This topology is divided into a network 135 map and a cost map. The network map contains a series of PIDs, a 136 provider-defined network location identifier as specified in 137 [RFC7285]. In the test cases of this document, this network map is 138 represented as "my-default-network-map". 140 PID IP Address Block 141 ------------------------------- 142 mypid1 10.0.0.0/8, 15.0.0.0/8 143 mypid2 192.168.0.0/16 144 mypid3 192.168.10.0/24 145 peeringpid1 128.0.0.0/16 146 peeringpid2 130.0.0.0/16, 2001:DB8::/32 147 transitpid1 132.0.0.0/16 148 transitpid2 135.0.0.0/16 149 defaultpid 0.0.0.0/0, ::/0 151 Figure 1: A Default Network Map 153 A cost map corresponding to the above network map is shown below. The 154 cost map defines path costs amongst sets of source and destination 155 network locations. path cost is the end-to-end cost from the source 156 to the destination. Path costs have Cost Metric and Cost Mode as 157 their attributes. In this cost map, cost metrics are routingcost, 158 cost modes are numerical and ordinal. 160 Source Destination Cost Mode 161 PID PID Numerical Ordinal 162 --------------------------------------------- 163 mypid1 mypid1 0 1 164 " mypid2 0 1 165 " mypid3 0 1 166 " peeringpid1 0 1 167 " peeringpid2 0 1 168 " transitpid1 5 3 169 " transitpid2 10 7 170 " defaultpid 4 2 171 mypid2 mypid1 0 1 172 " mypid2 0 1 173 " mypid3 0 1 174 " peeringpid1 0 1 175 " peeringpid2 0 1 176 " transitpid1 7 5 177 " transitpid2 8 6 178 " defaultpid 4 2 179 mypid3 mypid1 0 1 180 " mypid2 0 1 181 " mypid3 0 1 182 " peeringpid1 0 1 183 " peeringpid2 0 1 184 " transitpid1 8 6 185 " transitpid2 8 6 186 " defaultpid 5.1 4 188 Figure 2: Corresponding Cost Map 190 Note that the above represents a sparse cost map, i.e., the ALTO 191 server is not defining a path cost from each source PID to each 192 destination PID. It is only defining the costs that it is interested 193 in serving. 195 3. Mandatory Cases 197 Mandatory cases are corresponding to the services that MUST be 198 provided in [RFC7285]. 200 3.1. Information Resource Directory 202 3.1.1 Case: Test-IRD-1 204 The Information Resource Directory (IRD) enumerates URIs at which an 205 ALTO server offers Information Resources to an ALTO client. 207 GET /directory HTTP/1.1 208 Host: alto.example.com 209 Accept: application/alto-directory+json,application/alto-error+json 211 HTTP/1.1 200 OK 212 Content-Length: **** 213 Content-Type: application/alto-directory+json 215 { 216 "meta" : { 217 "cost-types": { 218 "num-routing": { 219 "cost-mode" : "numerical", 220 "cost-metric": "routingcost" 221 }, 222 "ord-routing": { 223 "cost-mode" : "ordinal", 224 "cost-metric": "routingcost" 225 } 226 }, 227 "default-alto-network-map" : "my-default-network-map" 228 }, 229 "resources" : { 230 "my-default-network-map" : { 231 "uri" : "http://alto.example.com/networkmap", 232 "media-type" : "application/alto-networkmap+json" 234 }, 235 "numerical-routing-cost-map" : { 236 "uri" : "http://alto.example.com/costmap/num/routingcost", 237 "media-type" : "application/alto-costmap+json", 238 "capabilities" : { 239 "cost-type-names" : [ "num-routing" ] 240 }, 241 "uses": [ "my-default-network-map" ] 242 }, 243 "ordinal-routing-cost-map" : { 244 "uri" : "http://alto.example.com/costmap/ord/routingcost", 245 "media-type" : "application/alto-costmap+json", 246 "capabilities" : { 248 "cost-type-names" : [ "ord-routing" ] 249 }, 250 "uses": [ "my-default-network-map" ] 251 }, 252 "endpoint-property" : { 253 "uri" : "http://alto.example.com/endpointprop/lookup", 254 "media-type" : "application/alto-endpointprop+json", 255 "accepts" : "application/alto-endpointpropparams+json", 256 "capabilities" : { 257 "prop-types" : [ "my-default-network-map.pid"] 258 }, 259 }, 260 "endpoint-cost" : { 261 "uri" : "http://alto.example.com/endpointcost/lookup", 262 "media-type" : "application/alto-endpointcost+json", 263 "accepts" : "application/alto-endpointcostparams+json", 264 "capabilities" : { 265 "cost-constraints" : true, 266 "cost-type-names" : [ "num-routing", "ord-routing"] 267 } 268 } 269 } 270 } 272 3.2. Maps Service 274 3.2.1 Case: Test-MAPS-1 276 An ALTO client retrieves a complete network map from an ALTO server. 278 GET /networkmap HTTP/1.1 279 Host: alto.example.com 280 Accept: application/alto-networkmap+json,application/alto-error+json 282 HTTP/1.1 200 OK 283 Content-Length: *** 284 Content-Type: application/alto-networkmap+json 286 { 287 "meta" : { 288 "vtag": { 289 "resource-id": "my-default-network-map", 290 "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" 291 } 292 }, 293 "network-map" : { 294 "mypid1" : { 295 "ipv4" : [ "10.0.0.0/8", "15.0.0.0/8" ] 296 }, 297 "mypid2" : { 298 "ipv4" : [ "192.168.0.0/16" ] 299 }, 300 "mypid3" : { 301 "ipv4" : [ "192.168.10.0/24" ] 302 }, 303 "peeringpid1" : { 304 "ipv4" : [ "128.0.0.0/16" ] 305 }, 306 "peeringpid2" : { 307 "ipv4" : [ "130.0.0.0/16" ], 308 "ipv6" : [ "2001:DB8::/32"] 309 }, 310 "transitpid1" : { 311 "ipv4" : [ "132.0.0.0/16" ] 312 }, 313 "transitpid2" : { 314 "ipv4" : [ "135.0.0.0/16" ] 315 }, 316 "defaultpid" : { 317 "ipv4" : [ "0.0.0.0/0" ], 318 "ipv6" : [ "::/0" ] 319 } 320 } 321 } 322 } 324 3.2.2 Case: Test-MAPS-2 325 An ALTO client retrieves a complete cost map for the numerical cost 326 mode from an ALTO server. In the response, the version tag of the 327 cost map ("dependent-vtag") corresponds to the network map of the 328 same version shown in test case Test-MAPS-1. In this document, assume 329 that all version tags correspond to the same network map. 331 GET /costmap/num/routingcost HTTP/1.1 332 Host: alto.example.com 333 Accept: application/alto-costmap+json,application/alto-error+json 335 HTTP/1.1 200 OK 336 Content-Length: *** 337 Content-Type: application/alto-costmap+json 339 { 340 "meta" : { 341 "dependent-vtags" : [ 342 {"resource-id": "my-default-network-map", 343 "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" 344 } 345 ], 346 "cost-type" : {"cost-mode" : "numerical", 347 "cost-metric": "routingcost" 348 } 349 }, 350 "cost-map" : { 351 "mypid1": { "mypid1" : 0, "mypid2" : 0, "mypid3" : 0, 352 "peeringpid1" : 0, "peerinpid2" : 0, 353 "transitpid1" : 5, "transitpid2" : 10, 354 "defaultpid" : 4}, 355 "mypid2": { "mypid1" : 0, "mypid2" : 0, "mypid3" : 0, 356 "peeringpid1" : 0, "peerinpid2" : 0, 357 "transitpid1" : 7, "transitpid2" : 8, 358 "defaultpid" : 4}, 359 "mypid3": { "mypid1" : 0, "mypid2" : 0, "mypid3" : 0, 360 "peeringpid1" : 0, "peerinpid2" : 0, 361 "transitpid1" : 8, "transitpid2" : 8, 362 "defaultpid" : 5.1} 363 } 364 } 365 } 367 3.2.3 Case: Test-MAPS-3 369 An ALTO client retrieves a complete cost map for the ordinal cost 370 mode. In the response, the version tag of the cost map ("dependent- 371 vtag") corresponds to the network map of the same version shown in 372 test case Test-MAPS-1 374 GET /costmap/ordinal/routingcost HTTP/1.1 375 Host: alto.example.com 376 Accept: application/alto-costmap+json,application/alto-error+json 378 HTTP/1.1 200 OK 379 Content-Length: *** 380 Content-Type: application/alto-costmap+json 382 { 383 "meta" : { 384 "dependent-vtags" : [ 385 {"resource-id": "my-default-network-map", 386 "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" 387 } 388 ], 389 "cost-type" : {"cost-mode" : "ordinal", 390 "cost-metric": "routingcost" 391 } 392 }, 393 "cost-map" : { 394 "mypid1": { "mypid1" : 1, "mypid2" : 1, "mypid3" : 1, 395 "peeringpid1" : 1, "peeringpid2" : 1, 396 "transitpid1" : 3, "transitpid2" : 7, 397 "defaultpid" : 2}, 398 "mypid2": { "mypid1" : 1, "mypid2" : 1, "mypid3" : 1, 399 "peeringpid1" : 1, "peeringpid2" : 1, 400 "transitpid1" : 5, "transitpid2" : 6, 401 "defaultpid" : 2}, 402 "mypid3": { "mypid1" : 1, "mypid2" : 1, "mypid3" : 1, 403 "peeringpid1" : 1, "peeringpid2" : 1, 404 "transitpid1" : 6, "transitpid2" : 6, 405 "defaultpid" : 4} 406 } 407 } 408 } 410 3.3. Endpoint Property Service 411 Endpoint Property Service provides information about endpoint 412 properties to ALTO clients. An ALTO server MUST define "pid" endpoint 413 property type. Note that the longest prefix match is used to retrieve 414 the corresponding PID property. 416 3.3.1 Case: Test-EPS-1 418 An ALTO client retrieves a PID for IPv4 address 192.168.1.23 from an 419 ALTO Server. 421 POST /endpointprop/lookup HTTP/1.1 422 Host: alto.example.com 423 Content-Length: *** 424 Content-Type: application/alto-endpointpropparams+json 425 Accept: application/alto-endpointprop+json,application/alto-error+json 427 { 428 "properties" : [ "my-default-network-map.pid" ], 429 "endpoints" : [ "ipv4:192.168.1.23" ] 430 } 432 HTTP/1.1 200 OK 433 Content-Length: *** 435 { 436 "meta" : { 437 "dependent-vtags" : [ 438 {"resource-id": "my-default-network-map", 439 "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" 440 } 441 ] 442 }, 443 "endpoint-properties": { 444 "ipv4:192.168.1.23" : {"my-default-network-map.pid": "mypid2"} 445 } 446 } 448 3.3.2 Case: Test-EPS-2 450 An ALTO client retrieves a PID for IPv4 address 192.168.10.23 from an 451 ALTO server. 453 POST /endpointprop/lookup HTTP/1.1 454 Host: alto.example.com 455 Content-Length: *** 456 Content-Type: application/alto-endpointpropparams+json 457 Accept: application/alto-endpointprop+json,application/alto-error+json 458 { 459 "properties" : [ "my-default-network-map.pid" ], 460 "endpoints" : [ "ipv4:192.168.10.23" ] 461 } 463 HTTP/1.1 200 OK 464 Content-Length: *** 466 { 467 "meta" : { 468 "dependent-vtags" : [ 469 {"resource-id": "my-default-network-map", 470 "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" 471 } 472 ] 473 }, 474 "endpoint-properties": { 475 "ipv4:192.168.10.23" : { "my-default-network-map.pid": "mypid3" } 476 } 477 } 479 3.3.3 Case: Test-EPS-3 481 An ALTO client retrieves a PID for IPv4 address 201.1.13.12 from an 482 ALTO server. 484 POST /endpointprop/lookup HTTP/1.1 485 Host: alto.example.com 486 Content-Length: *** 487 Content-Type: application/alto-endpointpropparams+json 488 Accept: application/alto-endpointprop+json,application/alto-error+json 490 { 491 "properties" : [ "my-default-network-map.pid" ], 492 "endpoints" : [ "ipv4:201.1.13.12" ] 493 } 495 HTTP/1.1 200 OK 496 Content-Length: *** 497 Content-Type: application/alto-endpointprop+json 499 { 500 "meta" : { 501 "dependent-vtags" : [ 502 {"resource-id": "my-default-network-map", 503 "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" 504 } 506 ] 507 }, 508 "endpoint-properties": { 509 "ipv4:192.168.10.23" : { "my-default-network-map.pid": "mypid3" } 510 } 511 } 513 3.3.4 Case: Test-EPS-4 515 An ALTO client retrieves a PID for an IPv4 and IPv6 address from an 516 ALTO server. 518 POST /endpointprop/lookup HTTP/1.1 519 Host: alto.example.com 520 Content-Length: *** 521 Content-Type: application/alto-endpointpropparams+json 522 Accept: application/alto-endpointprop+json,application/alto-error+json 524 { 525 "properties" : [ "my-default-network-map.pid" ], 526 "endpoints" : [ "ipv6:1234::192.168.1.23", 527 "ipv4:132.0.10.12" ] 528 } 530 HTTP/1.1 200 OK 531 Content-Type: application/alto-endpointprop+json 532 Content-Length: *** 534 { 535 "meta" : { 536 "dependent-vtags" : [ 537 {"resource-id": "my-default-network-map", 538 "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" 539 } 540 ] 541 }, 542 "endpoint-properties": { 543 "ipv6:1234::192.168.1.23" : { 544 "my-default-network-map.pid" : "defaultpid" }, 545 "ipv4:132.0.10.12" : {"my-default-network-map.pid" : "transitpid1"} 546 } 547 } 549 3.4. Protocol Errors 550 3.4.1 Case: Test-ERR-1 552 An ALTO client sends a parsing error body in the request --- a 553 missing closing brace ('}'). 555 POST /endpointprop/lookup HTTP/1.1 556 Host: alto.example.com 557 Content-Length: *** 558 Content-Type: application/alto-endpointpropparams+json 559 Accept: application/alto-endpointprop+json,application/alto-error+json 561 { 562 "properties" : [ "my-default-network-map.pid" ], 563 "endpoints" : [ "ipv4:192.168.10.23" ] 565 The server returns an HTTP response code of 400 with ALTO error code 566 of E_SYNTAX (c.f., Table 1 [RFC7285]). 568 HTTP/1.1 400 Bad Request 569 Content-Type: application/alto-error+json 570 Content-Length: *** 572 { 573 "code": "E_SYNTAX" 574 } 576 3.4.2 Case: Test-ERR-2 577 An ALTO client sends a malformed request --- the "properties" member 578 for the Endpoint Property service is missing. 580 POST /endpointprop/lookup HTTP/1.1 581 Host: alto.example.com 582 Content-Length: *** 583 Content-Type: application/alto-endpointpropparams+json 584 Accept: application/alto-endpointprop+json,application/alto-error+json 586 { 587 "properties" : [ ], 588 "endpoints" : [ "ipv4:192.168.10.23" ] 589 } 591 The server returns an HTTP response code of 400 with ALTO error code 592 of E_JSON_FIELD_MISSING (c.f., Table 1 [RFC7285]). 594 HTTP/1.1 400 Bad Request 595 Content-Type: application/alto-error+json 596 Content-Length: *** 598 { 599 "code": "E_JSON_FIELD_MISSING" 600 } 602 3.4.3 Case: Test-ERR-3 603 An ALTO client sends a request with an unexpected type for a JSON 604 value. 606 POST /endpointprop/lookup HTTP/1.1 607 Host: alto.example.com 608 Content-Length: *** 609 Content-Type: application/alto-endpointpropparams+json 610 Accept: application/alto-endpointprop+json,application/alto-error+json 612 { 613 "properties" : [ "my-default-network-map.pid" ], 614 "endpoints" : "ipv4:192.168.10.23" 615 } 617 The server returns an HTTP response code of 400 with ALTO error code 618 of E_INVALID_FIELD_TYPE(c.f., Table 1 [RFC7285]). 620 HTTP/1.1 400 Bad Request 621 Content-Type: application/alto-error+json 622 Content-Length: *** 624 { 625 "code": "E_INVALID_FIELD_TYPE" 626 } 628 3.4.4 Case: Test-ERR-4 630 An ALTO client sends a request with a wrong value for a correct 631 field. 633 POST /endpointprop/lookup HTTP/1.1 634 Host: alto.example.com 635 Content-Length: *** 636 Content-Type: application/alto-endpointpropparams+json 637 Accept: application/alto-endpointprop+json,application/alto-error+json 639 { 640 "properties" : [ "my-default-network-map.pid" ], 641 "endpoints" : [ "192.168.10.23" ] 642 } 644 The server returns an HTTP response code of 400 with ALTO error code 645 of E_INVALID_FIELD_VALUE (c.f., Table 1 [RFC7285]). 647 HTTP/1.1 400 Bad Request 648 Content-Length: *** 649 Content-Type: application/alto-error+json 651 { 652 "code": "E_INVALID_FIELD_VALUE" 653 } 655 4. Optional Cases 657 Optional cases are corresponding to the services that MAY be provided 658 in [RFC7285]. 660 4.1. Map-Filtering Service 662 4.1.1 Case: Test-FILTER-1 664 An ALTO client sends a request to get a filtered network map of PID 665 mypid2 from an ALTO server. 667 POST /networkmap/filtered HTTP/1.1 668 Host: alto.example.com 669 Content-Length: *** 670 Content-Type: application/alto-networkmapfilter+json 671 Accept: application/alto-networkmap+json,application/alto-error+json 673 { 674 "pids": [ "mypid2" ] 675 } 677 HTTP/1.1 200 OK 678 Content-Length: 255 679 Content-Type: application/alto-networkmap+json 681 { 682 "meta" : { 683 "vtag" : { 684 "resource-id": "my-default-network-map", 685 "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" 686 }, 687 "network-map" : { 688 "mypid2" : { 689 "ipv4" : [ "192.168.0.0/16" ] 690 } 691 } 692 } 693 } 695 4.1.2 Case: Test-FILTER-2 697 An ALTO client sends a request to get a filtered cost map from 698 asource PID to a set of destination PIDs. 700 POST /costmap/filtered HTTP/1.1 701 Host: alto.example.com 702 Content-Type: application/alto-costmapfilter+json 703 Content-Length: *** 704 Accept: application/alto-costmap+json,application/alto-error+json 706 { 707 "cost-type" : {"cost-mode" : "numerical", 708 "cost-metric" : "routingcost", 709 }, 710 "pids" : { 711 "srcs" : [ "mypid1", "mypid3" ], 712 "dsts" : [ "mypid2", "peeringpid1", "transitpid2" ] 713 } 714 } 716 HTTP/1.1 200 OK 717 Content-Length: *** 718 Content-Type: application/alto-costmap+json 720 { 721 "meta" : { 722 "dependent-vtags" : [ 723 {"resource-id": "my-default-network-map", 724 "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" 725 } 727 ], 728 "cost-type": {"cost-mode" : "numerical", 729 "cost-metric" : "routingcost" 730 } 731 }, 732 "cost-map" : { 733 "mypid1": { "mypid2": 0, "peeringpid1": 0, 734 "transitpid2": 10 }, 735 "mypid3": { "mypid2": 0, "peeringpid1": 0, 736 "transitpid2": 8 } 737 } 738 } 740 4.1.3 Case: Test-FILTER-3 742 An ALTO client sends a request to get the cost map subject to certain 743 constrains from an ALTO server. 745 POST /costmap/filtered HTTP/1.1 746 Host: alto.example.com 747 Content-Type: application/alto-costmapfilter+json 748 Content-Length: *** 749 Accept: application/alto-costmap+json,application/alto-error+json 751 { 752 "cost-type" : {"cost-mode" : "numerical", 753 "cost-metric" : "routingcost", 754 }, 755 "constrains" : ["gt 0", "le 10"], 756 "pids" : { 757 "srcs" : [ "mypid1", "mypid3" ], 758 "dsts" : [ "mypid2", "peeringpid1", "transitpid2" ] 759 } 760 } 762 HTTP/1.1 200 OK 763 Content-Length: *** 764 Content-Type: application/alto-costmap+json 766 { 767 "meta" : { 768 "dependent-vtags" : [ 769 {"resource-id": "my-default-network-map", 770 "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" 771 } 772 ], 773 "cost-type": {"cost-mode" : "numerical", 774 "cost-metric" : "routingcost" 776 } 777 }, 778 "cost-map" : { 779 "mypid1": { "transitpid2": 10 }, 780 "mypid3": { "transitpid2": 8 } 781 } 782 } 784 4.2. Endpoint cost service 786 4.2.1 Case: Test-ECS-1 788 An ALTO client requests cost information between individual endpoints 789 from an ALTO server. 791 POST /endpointcost/lookup HTTP/1.1 792 Host: alto.example.com 793 Content-Length: *** 794 Content-Type: application/alto-endpointcostparams+json 795 Accept: application/alto-endpointcost+json,application/alto-error+json 797 { 798 "cost-type": {"cost-mode" : "numerical", 799 "cost-metric" : "routingcost" }, 800 "endpoints" : { 801 "srcs": [ "ipv4:10.0.0.0", "ipv4:192.168.11.0", 802 "ipv4:192.168.10.0"], 803 "dsts": [ 804 "ipv4:10.0.0.0", 805 "ipv4:15.0.0.0", 806 "ipv4:192.168.11.0", 807 "ipv4:192.168.10.0", 808 "ipv4:128.0.0.0", 809 "ipv4:130.0.0.0", 810 "ipv4:0.0.0.0", 811 "ipv4:132.0.0.0", 812 "ipv4:135.0.0.0" 813 ] 814 } 815 } 817 HTTP/1.1 200 OK 818 Content-Length: *** 819 Content-Type: application/alto-endpointcost+json 821 { 822 "meta": { 823 "cost-type": {"cost-mode" : "numerical", 824 "cost-metric" : "routingcost" 825 }, 826 "endpoint-cost-map": { 827 "ipv4:10.0.0.0": { 828 "ipv4:10.0.0.0": 0.000000, 829 "ipv4:15.0.0.0": 0.000000, 830 "ipv4:192.168.11.0": 0.000000, 831 "ipv4:192.168.10.0": 0.000000, 832 "ipv4:128.0.0.0": 0.000000, 833 "ipv4:130.0.0.0": 0.000000, 834 "ipv4:0.0.0.0": 4.000000, 835 "ipv4:132.0.0.0": 5.000000, 836 "ipv4:135.0.0.0": 10.000000 837 }, 838 "ipv4:192.168.11.0": { 839 "ipv4:10.0.0.0": 0.000000, 840 "ipv4:15.0.0.0": 0.000000, 841 "ipv4:192.168.11.0": 0.000000, 842 "ipv4:192.168.10.0": 0.000000, 843 "ipv4:128.0.0.0": 0.000000, 844 "ipv4:130.0.0.0": 0.000000, 845 "ipv4:0.0.0.0": 4.000000, 846 "ipv4:132.0.0.0": 7.000000, 847 "ipv4:135.0.0.0": 8.000000 848 }, 849 "ipv4:192.168.10.0": { 850 "ipv4:10.0.0.0": 0.000000, 851 "ipv4:15.0.0.0": 0.000000, 852 "ipv4:192.168.11.0": 0.000000, 853 "ipv4:192.168.10.0": 0.000000, 854 "ipv4:128.0.0.0":0.000000, 855 "ipv4:130.0.0.0": 0.000000, 856 "ipv4:0.0.0.0": 5.100000, 857 "ipv4:132.0.0.0": 8.000000, 858 "ipv4:135.0.0.0": 8.000000 859 } 860 } 861 } 863 4.2.2 Case: Test-ECS-2 865 An ALTO client requests the ranking service for a source host to a 866 set of destination hosts from an ALTO server. 868 POST /endpointcost/lookup HTTP/1.1 869 Host: alto.example.com 870 Accept: application/alto-endpointcost+json,application/alto-error+json 871 Content-Type: application/alto-endpointcostparams+json 872 Content-Length: *** 874 { 875 "cost-type": {"cost-mode" : "ordinal", 876 "cost-metric" : "routingcost"}, 877 "endpoints" : { 878 "srcs": [ "ipv6:2001:DB8::ABCD:6789", "ipv4:192.168.10.1" ], 879 "dsts": [ 880 "ipv6:2001:DB8::2345:5678", 881 "ipv4:135.0.29.1", 882 "ipv4:192.168.10.23" 883 ] 884 } 885 } 887 The server response is shown below. Note that the source IP adress 888 of "ipv6:2001:DB8::ABCD:6789", which occurs in PID "peeringpid2", is 889 omitted in the response. This reflects the fact that the ALTO server 890 does not know the source costs from the "peeringpid2" PID. 892 HTTP/1.1 200 OK 893 Content-Type: application/alto-endpointcost+json 894 Content-Length: *** 896 { 897 "meta": { 898 "cost-type": {"cost-mode" : "ordinal", 899 "cost-metric" : "routingcost"}, 900 "endpoint-cost-map": { 901 "ipv4:192.168.10.1": { 902 "ipv4:192.168.10.23": 1, 903 "ipv6:2001:DB8::2345:5678": 1, 904 "ipv4:135.0.29.1": 6 905 } 906 }, 907 } 909 4.2.1 Case: Test-ECS-3 911 An ALTO client requests the cost service subject to certain 912 constraints from an ALTO server. 914 POST /endpoints/cost HTTP/1.1 915 Host: alto.example.com 916 Content-Length: *** 917 Content-Type: application/alto-endpointcostparams+json 918 Accept: application/alto-endpointcost+json,application/alto-error+json 920 { 921 "cost-type": {"cost-mode" : "numerical", 922 "cost-metric" : "routingcost"}, 923 "constraints": ["le 5", "ge 4"], 924 "endpoints": { 925 "dsts": [ 926 "ipv4:10.0.0.0", 927 "ipv4:15.0.0.0", 928 "ipv4:192.168.11.0", 929 "ipv4:192.168.10.0", 930 "ipv4:128.0.0.0", 931 "ipv4:130.0.0.0", 932 "ipv4:0.0.0.0", 933 "ipv4:132.0.0.0", 934 "ipv4:135.0.0.0" 935 ], 936 "srcs": [ 937 "ipv4:10.0.0.0", 938 "ipv4:192.168.11.0", 939 "ipv4:192.168.10.0" 941 ] 942 } 943 } 945 HTTP/1.1 200 OK 946 Content-Length: *** 947 Content-Type: application/alto-endpointcost+json 948 { 949 "meta": { 950 "cost-type": {"cost-mode" : "numerical", 951 "cost-metric" : "routingcost"}, 952 "endpoint-cost-map": { 953 "ipv4:10.0.0.0": { 954 "ipv4:0.0.0.0": 4, "ipv4:132.0.0.0": 5 955 }, 956 "ipv4:192.168.11.0": {"ipv4:0.0.0.0": 4} 957 } 958 } 960 5. Security Considerations 962 This document does not present any new security considerations above 963 and beyond what is documented in the ALTO protocol [RFC7285]. 965 6. IANA Considerations 967 This document does not require any action from IANA. 969 7. References 971 7.1. Normative References 973 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 974 Requirement Levels", BCP 14, RFC 2119, March 1997. 976 7.2. Informative References 978 [RFC7285] Almi, R., Penno, R., Yang, Y., Kiesel, S., Previdi, S., 979 Roome, W., Shalunov, S., and R. Woundy, "Application-Layer 980 Traffic Optimization (ALTO) Protocol", RFC 7285, September 981 2014. 983 Authors' Addresses 985 Huaming Guo 986 China Academy Information and Communication Technology 988 Email: guohuaming@caict.ac.cn