美文网首页程序员大数据
【转载】URL中的文本IPv6地址的格式RFC2732

【转载】URL中的文本IPv6地址的格式RFC2732

作者: 木木与呆呆 | 来源:发表于2019-01-08 09:17 被阅读2次

RFC2732规范中URL中的文本IPv6地址的格式,
截取其中重要部分原文如下:

RFC 2732 Format for Literal IPv6 Addresses in URL's

December 1999

Abstract

This document defines the format for literal IPv6 Addresses in URL's
for implementation in World Wide Web browsers. This format has been
implemented in the IPv6 versions of several widely deployed browsers
including Microsoft Internet Explorer, Mozilla, and Lynx. It is also
intended to be used in the IPv6 version of the service location
protocol.

This document incudes an update to the generic syntax for Uniform
Resource Identifiers defined in RFC 2396 [URL]. It defines a syntax
for IPv6 addresses and allows the use of "[" and "]" within a URI
explicitly for this reserved purpose.

1.Introduction

The textual representation defined for literal IPv6 addresses in
[ARCH] is not directly compatible with URL's. Both use ":" and "."
characters as delimiters. This document defines the format for
literal IPv6 Addresses in URL's for implementation in World Wide Web
browsers. The goal is to have a format that allows easy "cut" and
"paste" operations with a minimum of editing of the literal address.

The format defined in this document has been implemented in the IPv6
versions of several widely deployed browsers including Microsoft
Internet Explorer, Mozilla, and Lynx. It is also intended to be used
in the IPv6 version of the service location protocol.

1.1.Requirements

The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, if and where they appear
in this document, are to be interpreted as described in [KEYWORDS].

World Wide Web browsers SHOULD implement the format of IPv6 literals
in URL's defined in this document. Other types of applications and
protocols that use URL's MAY use this format.

2.Literal IPv6 Address Format in URL's Syntax

To use a literal IPv6 address in a URL, the literal address should be
enclosed in "[" and "]" characters. For example the following
literal IPv6 addresses:

   FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
   1080:0:0:0:8:800:200C:4171
   3ffe:2a00:100:7031::1
   1080::8:800:200C:417A
   ::192.9.5.5
   ::FFFF:129.144.52.38
   2010:836B:4179::836B:4179

would be represented as in the following example URLs:

   http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
   http://[1080:0:0:0:8:800:200C:417A]/index.html
   http://[3ffe:2a00:100:7031::1]
   http://[1080::8:800:200C:417A]/foo
   http://[::192.9.5.5]/ipng
   http://[::FFFF:129.144.52.38]:80/index.html
   http://[2010:836B:4179::836B:4179]

3.Changes to RFC 2396

This document updates the generic syntax for Uniform Resource
Identifiers defined in RFC 2396 [URL]. It defines a syntax for IPv6
addresses and allows the use of "[" and "]" within a URI explicitly
for this reserved purpose.

The following changes to the syntax in RFC 2396 are made:
(1) change the 'host' non-terminal to add an IPv6 option:

   host          = hostname | IPv4address | IPv6reference
   ipv6reference = "[" IPv6address "]"

where IPv6address is defined as in RFC2373 [ARCH].

(2) Replace the definition of 'IPv4address' with that of RFC 2373, as
it correctly defines an IPv4address as consisting of at most three
decimal digits per segment.

(3) Add "[" and "]" to the set of 'reserved' characters:

   reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
                 "$" | "," | "[" | "]"

and remove them from the 'unwise' set:

   unwise      = "{" | "}" | "|" | "\" | "^" | "`"

4.Security Considerations

The use of this approach to represent literal IPv6 addresses in URL's
does not introduce any known new security concerns.

顺便说下,里面的英文还是比较简单的,别怕还有在线翻译工具呢~

原文链接

RFC 2732 Format for Literal IPv6 Addresses in URL's

相关文章

  • 【转载】URL中的文本IPv6地址的格式RFC2732

    RFC2732规范中URL中的文本IPv6地址的格式,截取其中重要部分原文如下: RFC 2732 Format ...

  • URL地址格式

    1.传统形式的URL 格式: schema://host:port/path?query#fragment -sc...

  • 适配IPv6二:IPV6/IPV4概述

    一、IPV6 IPv6地址格式 IPv6的地址长度是128位(bit)。 将这128位的地址按每16位划分为一个段...

  • 网络相关

    一.HTTP HTTP是超文本传输协议 1.请求报文的格式 请求行:方法(get、post)、url(请求的地址)...

  • URL中使用IPv4,IPv6和主机名

    在浏览器的Http请求的URL中如何使用IPv4,IPv6和主机名,因为IPv6的地址需要加[],导致用法有点区别...

  • ajax请求进入error的情况

    转载地址1.URL地址错误。 2.dataType 定义类型和返回类型是否一致,比如json格式数据。例如:{su...

  • Promise

    一:前后端交互概述与url地址格式1.1接口调用方式 1.2url格式1.2.1传统的url格式 1.2.2Res...

  • OC网络相关

    一.URL{1. 格式:协议头://主机地址/路径2. 协议头:{a. HTTP:// 超文本传输协议b. FTP...

  • Contiki相关协议的研究

    IPv6 寻址方式和 IPv4 中的点分十进制格式不同,IPv6 的 128 位地址以 16 位为一组,每个 16...

  • Socket编程框架

    1. Socket地址数据类型及相关函数 IPv4和IPv6的地址格式定义在netinet/in.h中 IPv4地...

网友评论

    本文标题:【转载】URL中的文本IPv6地址的格式RFC2732

    本文链接:https://www.haomeiwen.com/subject/jlzmrqtx.html