Subject: [core] HTTP/IPv4 clients accessing CoAP/IPv6 resources

From: "Angelo P. Castellani" <[email-masked]>
Date: Thu, 3 Mar 2011 15:08:04 +0100

HTTP clients usually have IPv4 connectivity, CoAP clients are expected
to prefer IPv6 connectivity (probably using 6LoWPAN adaptation layer).

CoAP design should be optimized to handle this mapping scenario where
we have HTTP/IPv4 on the Internet and CoAP/IPv6-6lowpan on the
constrained network.

( I am assuming that CoAP on IPv4 or IPv6 w/o 6LoWPAN have lower
relevance.. Do we agree on this? )

I was wondering if a simple solution to interoperate can exist and I
got to a possible solution, which I share with the WG for early
discussion.

Given that discussing complex arguments in a mail seems difficult to
me, a more detailed discussion of this method will probably follow in
http-coap-mapping-01.

######
POSSIBLE SOLUTION

A CoAP/HTTP proxy can exploit HTTP/1.1 virtual hosting capabilities in
conjunction with DNS to tunnel access to IPv6 hosts using only HTTP
and IPv4.

Suppose to have the following DNS entries:
- node1.coap.something.net AAAA record containing the IPv6 of my node1
- node1.coap.something.net A record containing the IPv4 of the CoAP/HTTP proxy

If an HTTP/IPv4 client wants to GET "/temperature" resource on node1,
it can simply do the following request using HTTP:

GET / HTTP/1.1
Host: node1.coap.something.net

The request will be received by the proxy and translated to CoAP,
because subdomain ".coap.something.net" is known to talk CoAP (Open
issue #1).

Since an IPv6 resolution for node1.coap.something.net is available,
the request MUST be also translated to IPv6.

#####
OPEN ISSUE #1:

Who deploys the proxy needs to know which subnets has to be mapped to
CoAP, in this scenario a deployment near the constrained network is
simpler.

Otherwise we need to discuss how to understand whether a request has
to be mapped to CoAP.

Can we use DNS again to understand which protocol a subdomain is talking?

On which DNS record can we save this information?

#####

Any comment on this?

Best,
Angelo

---

From: "Angelo P. Castellani" <[email-masked]>
Date: Thu, 3 Mar 2011 15:15:17 +0100

I missed a trivial mistake in the HTTP request.

To GET "/temperature" the request has to be:

GET /temperature HTTP/1.1
Host: node1.coap.something.net

Otherwise we get the "/" resource.

However, the actual resource involved has no relevance with the
discussed method.

Best,
Angelo