跳到主要内容

特殊地址

IP 地址共有五类: A 类到 E 类 [119]. 其中, E 类地址保留用于实验. 未参与这些实验的网关必须忽略所有以 E 类目的 IP 地址为目的地址的数据报. 收到此类数据报时, 不得产生 ICMP 目的不可达 (Destination Unreachable) 或 ICMP 重定向 (Redirect) 消息.

IP 地址存在一些特殊情况 [11]. 结合前面用于 IP 地址的记法, 可以将这些特殊情况简要概括如下:

IP 地址:​

         IP-address ::=  { <Network-number>, <Host-number> }

or

IP-address ::= { <Network-number>, <Subnet-number>,
<Host-number> }

如果我们还使用记号 "-1" 表示相应字段的所有位均为 1, 则一些常见的特殊情况如下:

         (a)   {0, 0}

This host on this network. Can only be used as a source
address (see note later).

(b) {0, <Host-number>}

Specified host on this network. Can only be used as a
source address.

(c) { -1, -1}

Limited broadcast. Can only be used as a destination
address, and a datagram with this address must never be
forwarded outside the (sub-)net of the source.

(d) {<Network-number>, -1}

Directed broadcast to specified network. Can only be used
as a destination address.

(e) {<Network-number>, <Subnet-number>, -1}

Directed broadcast to specified subnet. Can only be used as
a destination address.



(f) {<Network-number>, -1, -1}

Directed broadcast to all subnets of specified subnetted
network. Can only be used as a destination address.

(g) {127, <any>}

Internal host loopback address. Should never appear outside
a host.